title: InvalidSelectorError: The result of the xpath expression is [object Text]. It should be an element
body: <p>I have the following code:</p>
  
  <pre><code>//html
  &lt;div&gt;
     &lt;span&gt;Sort Order&lt;/span&gt;
     &lt;select id="sortOrderSelect"&gt;
        &lt;option value=0&gt;Descending&lt;/option&gt;
        &lt;option value=1&gt;Ascending&lt;/option&gt;
     &lt;/select&gt;
  &lt;/div&gt;
  
  //test
  it('Check it has 2 options', function () {
     var selectCount = element.all(by.xpath('//*[@id="sortOrderSelect"]/child::node()'));
     expect(selectCount.count()).toBe(2);
  });
  </code></pre>
  
  <p>I am getting the error below. Can someone explain to me what does the error means? And how can I solve it?</p>
  
  <blockquote>
    <p>InvalidSelectorError: The result of the xpath expression
    "//*[@id="sortOrderSelect"]/child::node()" is [object Text]. It should
    be an element.</p>
  </blockquote>