Skip to content

Commit

Permalink
Fixed up an issue with phantomjs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Nov 3, 2018
1 parent 47c2aac commit 88a3000
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ public WebDriver createWebDriver(
proxy.setProxyType(Proxy.ProxyType.MANUAL);
proxy.setHttpProxy("localhost:" + myMainProxy.getPort());
proxy.setSocksProxy("localhost:" + myMainProxy.getPort());
proxy.setSocksVersion(5);
/*
The socks version is required by chrome, but can not be set
for phantomjs otherwise there is a long to integer conversion
exception.
*/
if (!Constants.PHANTOMJS.equalsIgnoreCase(browser)) {
proxy.setSocksVersion(new Integer(5));
}
proxy.setFtpProxy("localhost:" + myMainProxy.getPort());
proxy.setSslProxy("localhost:" + myMainProxy.getPort());

Expand Down

0 comments on commit 88a3000

Please sign in to comment.