Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow-loading inline javascript causes No response in a timely fashion exception, regardless of page loading timeout #67

Open
illicitonion opened this issue Mar 10, 2012 · 1 comment

Comments

@illicitonion
Copy link
Contributor

If javascript causes a page load to take a long time, regardless of the page load timeout, a ResponseNotReceivedException will be thrown.

If the slow-loading javascript was document.write'n to the page, the get will throw during the nested switch to defaultContent.
If the slow-loading javascript is just inline in the page, the get will return cleanly, but the following command will throw.

Test cases:

WebDriver driver = new OperaDriver();
driver.get("http://illicitonion.com/sebugs/operadriver-timely1/index.html");
assertEquals("Page", driver.getTitle());

WebDriver driver = new OperaDriver();
driver.get("http://illicitonion.com/sebugs/operadriver-timely2/index.html");
assertEquals("Page", driver.getTitle());

Source of example pages is available at http://illicitonion.com/sebugs/operadriver-timely.tar - I can't work out a way to attach files to this issue, I guess you're meant to use a pull request or gist or something...

If your computer is more powerful than mine, you may need to add a few extra zeros to the hard-coded powers of 10 :)

@illicitonion
Copy link
Contributor Author

Ok, I thought a had a workaround, by waiting until the page loads and then switchTo().defaultContent()ing, but this call will also throw the exception, even if the page is fully loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant