When running code:
PhantomJsDriverManager.getInstance().forceCache().setup();
Or:
PhantomJsDriverManager.getInstance().setup();
I get a certificate exception when the driver is being downloaded:
java.lang.RuntimeException: javax.net.ssl.SSLPeerUnverifiedException: Host name 'bbuseruploads.s3.amazonaws.com' does not match the certificate subject provided by the peer (CN=*.s3.amazonaws.com, O=Amazon.com Inc., L=Seattle, ST=Washington, C=US)
at io.github.bonigarcia.wdm.BrowserManager.manage(BrowserManager.java:262)
at io.github.bonigarcia.wdm.BrowserManager.setup(BrowserManager.java:765)
at io.github.bonigarcia.wdm.BrowserManager.setup(BrowserManager.java:725)
This also happens for other drivers like OperaDriverManager and FirefoxDriverManager
I tested:
- io.github.bonigarcia webdrivermanager 1.6.2
- io.github.bonigarcia webdrivermanager 1.7.0
This certificate problem is probably out of control for the plugin.
My question is: How can I ensure the downloads always work? Can I add the browser driver downloads to my local Maven Nexus repository to avoid such problems causing my builds to fail?
Or do I need to setup a local webserver and adapt the webdrivermanager.properties file and adapt: wdm.phantomjsDriverUrl=https://bitbucket.org/ariya/phantomjs/downloads/ wdm.phantomjsDriverTaobaoUrl=http://npm.taobao.org/mirrors/phantomjs