Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98221

Selenium webdriver.Remote driver does not work with tor proxy(webdriver.Chrome does)

$
0
0

I'm trying to use socks5 proxy on my remote driver which is hosted as a docker container on port 4444.

here is code-sample:

from selenium import webdriver

opts = webdriver.ChromeOptions()
opts.add_argument("--no-sandbox")
opts.add_argument("--disable-dev-shm-usage")
opts.add_argument("--proxy-server=socks5://127.0.0.1:9050")
driver = webdriver.Remote(command_executor="http://localhost:4444/wd/hub", desired_capabilities=opts.to_capabilities())

Then, when I try to open any page, I get error stating Check your proxy settings or contact your network administrator.

While using same code sample on regular proxy – it works just fine. When I do bold request through 9050 port – it works just fine.

And finally, when I use same code sample with webdriver.Chrome instead of webdriver.Remote it works fine!

I would appreciate any suggestions to make things work through Remote webdriver.

UPDATE: I'm using selenium==3.14.0 and RemoteDriver is getting docker image selenium/node-chrome-debug:3.141.59-radium.


Viewing all articles
Browse latest Browse all 98221

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>