title: All XPaths return a non-existent error in CasperJS?
body: <p>Just to be clear I am using SpookyJS which is a library that allows for a headless CasperJS.</p>
  
  <p>I am able to click and select other XPaths just fine on all other pages,the problem is only on a particular page, the page loads perfectly but all of the XPaths return this error.</p>
  
  <blockquote>
    <p>Cannot dispatch mousedown event on nonexistent selector</p>
  </blockquote>
  
  <p>I have a screenshot taken before the function attempts to click the xPath and the screenshot shows that the page is loaded perfectly.</p>
  
  <p>if I trying using the <code>waitForSelector</code> function I get the timeout error, I've tried different XPaths on different pages and none of them work.</p>
  
  <p>Here is my code in CoffeeScript don't mind the <code>spooky.then</code> just think of it as <code>casper.then</code>:</p>
  
  <pre class="lang-coffee prettyprint-override"><code>// 3 steps occur before this and they work perfectly
  spooky.then([{x:selectXPath}, () -&gt;
    @wait(3000, () -&gt;
      eval(x) // This loads the xPath function
      @capture('server/components/spooky/img.png')
      @click(xPath('//*[@id="wp-page-header-middle"]/table/tbody/tr/td[1]/a'))
    )
  ])
  </code></pre>
  
  <p>The table I'm interested in is inside of an iframe.</p>