Support socket proxy with ghostdriver #558
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference ariya/phantomjs#15196 (comment)
I'm trying to use Phantomjs with ghostdriver (seleniumhq - java), everything works fine but I have one scenario where we have a socket proxy (not http proxy) but it throws an exception
[ERROR - 2017-11-17T17:06:36.126Z] RouterReqHand - _handle.error - {"stack":"_getProxySettingsFromCapabilities@phantomjs://code/session.js:133:60\nSession@phantomjs://code/session.js:165:62\n_postNewSessionCommand@phantomjs://code/session_manager_request_handler.js:75:49\n_handle@phantomjs://code/session_manager_request_handler.js:44:35\n_handle@phantomjs://code/router_request_handler.js:70:37","line":133,"sourceURL":"phantomjs://code/session.js"}
phantomjs://platform/console++.js:263 in error
org.openqa.selenium.WebDriverException: Unable to parse remote response: TypeError - undefined is not an object (evaluating 'proxyCapability["httpProxy"].split')
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:01:39.354Z'
System info: host: 'ubuntu', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.13.0-16-generic', java.version: '1.8.0_152'
Driver info: driver.version: PhantomJSDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:111)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.phantomjs.PhantomJSCommandExecutor.execute(PhantomJSCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at org.openqa.selenium.phantomjs.PhantomJSDriver.(PhantomJSDriver.java:116)
at org.openqa.selenium.phantomjs.PhantomJSDriver.(PhantomJSDriver.java:105)