OperaPrestoDriver is a vendor-supported WebDriver implementation that enables programmatic automation of Presto-based Opera products (i.e. v12 and older).
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.
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 :)
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.
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 :)