title: PhantomJS queryselector().textcontent returns nothing
body: <p>I am trying to get a number from a webpage: <a href="https://www.svenskaspel.se/resultat/keno" rel="nofollow">https://www.svenskaspel.se/resultat/keno</a> with phantomjs, but evaluate() returns nothing.</p>
  
  <p>there are 20 numbers on the page like this:</p>
  
  <pre><code>&lt;span class="result-ball-number "&gt;28&lt;/span&gt;
  </code></pre>
  
  <p>one of the numbers is "crowned" (two classes in span-tag)</p>
  
  <pre><code>&lt;span class="result-ball-number result-ball-number-kungkeno"&gt;47&lt;/span&gt;
  </code></pre>
  
  <p>In phantomjs I get an array/list of all numbers with:</p>
  
  <pre><code>list = document.querySelectorAll(".result-ball-number");
  </code></pre>
  
  <p>but getting the 'crowned' number fails whatever i try.</p>
  
  <pre><code>document.querySelector(".result-ball-number-kungkeno").textContent;
  </code></pre>
  
  <p>This works:</p>
  
  <pre><code>var ua = page.evaluate(function() {
      var list = [];
      ll = document.getElementsByClassName("result-ball-number");
      for(i=0;i&lt;20;i++) {
          list.push(ll[i].textContent);
      }
      return list;
  });
  </code></pre>
  
  <p>This fails:</p>
  
  <pre><code>var ua = page.evaluate(function() {
      var tmp = document.querySelector(".result-ball-number-kungkeno").textContent;
      return tmp;
  });
  </code></pre>
  
  <p>Is the problem the 'span'-tag with two classes?</p>
  
  <p>In the firefox webinspector I get the number in several ways without issues,</p>
  
  <pre><code>document.querySelectorAll(".result-ball-number-kungkeno")[0].textContent
  document.querySelector(".result-ball-number-kungkeno").textContent
  </code></pre>
  
  <p>or</p>
  
  <pre><code>k = document.getElementsByClassName("result-ball-number-kungkeno")
  k[0].textContent
  </code></pre>
  
  <p>..gives me the number.</p>
  
  <p>In PhantomJS, it just doesn't work.</p>