title: How to get the count of the number of child div element present inside a root div element in Protractor
body: <p>I am testing a web application project using Protractor . The few test cases which I have written is running fine but I am getting difficulties when I try to count the number of div elements present inside a parent div element, The structure of my div is given below</p>
  
  <pre><code>  &lt;div class="page-kontact-main"&gt;
    &lt;div class="buttons contact_page"&gt;
      &lt;a href="http://mysite.se/om-oss/" class="btn btn-default button"&gt;Om oss&lt;/a&gt;
      &lt;a href="http://mysite.se/offert-3/" class="btn btn-default button"&gt;Offert&lt;/a&gt;
      &lt;a href="http://mysite.se/tjanster/" class="btn btn-default button"&gt;Våra Tjänster&lt;/a&gt;
    &lt;/div&gt;
  
    &lt;div class="row kontact-title"&gt;
      &lt;h2&gt;Våra medarbetare&lt;/h2&gt;
      &lt;p&gt;
        Test desc &lt;span class="s47jd228h2" id="s47jd228h2_5"&gt;med&lt;/span&gt; passion och engagemang för it &amp;amp; system.  &amp;nbsp;Skicka in din ansöka
      &lt;/p&gt;
      &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div class="row clearfix"&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt; &lt;/div&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt;&lt;/div&gt;
      &lt;div class="col206"&gt; &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I have written the test case like this as given below but it is not running the error is expected undefined to equal 21.</p>
  
  <pre><code>it('Getting the count of contact names ', function() {
          driver.get("http://mysite.se/kontakt/");
          var element = driver.findElement(protractor.By.css('.clearfix .col206'));
          expect(element.length).toEqual(21);
  
      });
  </code></pre>
  
  <p>Thanks 
  Utpal</p>