htmlunit-driver
htmlunit-driver copied to clipboard
Unable to open html file using disk path
When I call
driver.get("C:\\Users\\User\\Path\\HtmlUnit-tests\\src\\test\\resources\\scrollTable.html");
I get
java.io.IOException: Unable to create URI from URL: c:\Users\User\Path\HtmlUnit-tests\src\test\resources\scrollTable.html (reason: Illegal character in path at index 5: c:///\Users\User\Path\HtmlUnit-tests\src\test\resources\scrollTable.html)
Running on Windows.
The Firefox driver can open this path without issues.
@skyhirider thanks for reporting this, i can reproduce this but i have to think a bit about a possible fix
as a workaround you can use the file: protocol
Thanks, the workaround does work
driver.get("file://C:\\Users\\User\\Path\\HtmlUnit-tests\\src\\test\\resources\\scrollTable.html")