I am trying to use selenium in python with PhantomJS. I am running a selenium hub server so am using webdriver.Remote
to start a webdriver.
The normal way to pass a proxy to PhantomJS is:
service_args = [
'--proxy=127.0.0.1:9999',
'--proxy-type=socks5',
]
browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args)
This won't workthough for
webdriver.Remote(service_args=service_args)
As webdriver.Remote takes only desired_capabilities, not service args, as a parameter.
Is there any way to pass a proxy to PhantomJS as a desired_capibility?
The typical way one would do so with a Firefox webdriver does not work.