org.openqa.selenium.WebDriverException: java.net.MalformedURLException: unknown protocol: javascript
Build info: version: '2.19.0', revision: '15849', time: '2012-02-08 16:10:57'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_17'
Driver info: driver.version: HtmlUnitDriver
at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:331)
at org.openqa.selenium.htmlunit.HtmlUnitDriver$HtmlUnitNavigation.to(HtmlUnitDriver.java:1048)
at test.java.core.WebDriverSetup.setup(WebDriverSetup.java:81)
Caused by: java.net.MalformedURLException: unknown protocol: javascript
at java.net.URL.<init>(URL.java:592)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:329)
... 28 more
... Removed 26 stack frames |
Try phantomjs
I believe HtmlUnit is not known to work well with javascripts in particular. So unless the application under test is a fairly simple site I believe HtmlUnitDriver is not the best option.
On Thursday, May 2, 2013, Bill Ross wrote:
> Anyone has any experience with HtmlUnitDriver?
I have tried it twice at different jobs, and each time failed to get
login working. It seems brittle on javascript.
Bill
--