Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've used a PhantomJS, ChromeDriver and FirefoxDriver for functional testing. <strong>The difference between PhantomJS and others is that PhantomJS driver don't wait for page to be loaded</strong> and returns control to the test program (your python code). Please check this out!</p> <p>I think this is not a correct behaviour of PhantomJS driver. I found in WebDriver's api documentation: <a href="http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#get(java.lang.String)" rel="nofollow">http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.html#get(java.lang.String)</a> the following method of WebDriver which opens a given URL</p> <pre><code>void get(java.lang.String url) </code></pre> <p>The description is:</p> <blockquote> <p>Load a new web page in the current browser window. This is done (...) and the method will block until the load is complete. </p> </blockquote> <p>So it is possible that (and here I agree with @Ashley comment)</p> <ul> <li>in Firefox a page is fully rendered before test code tries to access an element</li> <li>in PhantomJS the test code tries to interact with a page earlier when not yet ready</li> </ul> <p>You can find it easy if you "sleep" your test code for a, let's say, 2 seconds, just before you access first element in your test.</p> <p>If this is it, you can try to resolve this issue by waiting for page to load (instead of 2 seconds) by checking some condition on your page, e.g. page title should be "My Form". Try it in loop until condition is true. Then run rest of your test.</p> <p><em>Note: You can always take a screenshots, also in headless PhantomJS driver implementation! It will give you a possibility to debug a problem</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload