I am getting this error on ubuntu when we use XVFB to load WCT test. The test goes through fine the first time however, when we run the second time it fails. Looks like its missing HTMLunit Driver. I tried installing unit driver but could not fix.
-
As a extra, if this is non-automated, you can ssh with X tunneled and it will run the browser as if it were local. You can view everything in the browser without xvfb. – dman Oct 13 '16 at 04:43
1 Answers
I did following 3 things to make this working. They may not be the perfect solution because it is a little bit hacky.
Download https://selenium-release.storage.googleapis.com/2.52/selenium-server-standalone-2.52.0.jar and copy it to /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/.selenium/selenium-server/2.52.0-server.jar (you may need to change path to fit your server).
Modify /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/lib/default-config.js to change selenium standalone server version from 2.53.1 to 2.52.0 (this will solve HtmlUnitDriver not registered problem)
Modify /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/lib/check-started.js to change "var maxRetries = 60 * 1000 / retryInterval;" to be "var maxRetries = 600 * 1000 / retryInterval;" (this will solve timeout problem)
After making above hack, you can run wct or xvfb-run wct. Just need to wait a little bit longer, you will see your test results.

- 46
- 1
- 6
-
1Brilliant @Qiang Ji. Thank you, this issue drove me crazy. – Srikanth Kondaparthy Oct 13 '16 at 03:17
-
Just a note, this means you'd have issues with Firefox as mentioned in [WCT issue 24] ( https://github.com/Polymer/wct-local/issues/24) – Srikanth Kondaparthy Oct 13 '16 at 03:22
-