requestium icon indicating copy to clipboard operation
requestium copied to clipboard

Why can't I use request features also in selenium?

Open gordianbahri opened this issue 2 years ago • 1 comments

If I start a requestium instance using a proxy applied for the request session like: s.proxies.update({'http': 'https://10.11.4.254:3128', 'https': 'https://10.11.4.252:3128'})

The proxy does not seem to apply for the selenium instance. Why is that? I thought the whole point of requestium was to merge requests and selenium together. Am I doing something wrong?

gordianbahri avatar Mar 26 '22 22:03 gordianbahri

The current mechanism for passing state between the requests and Selenium objects does not copy proxy configuration. I do not imagine implementing such a feature would be difficult, but I don't have a lot of time for new features right now.

As a workaround, you can set your proxy config on both separately, using the code you posted for requests, and then doing the same on the Selenium webdriver using chrome_options (see https://www.browserstack.com/guide/set-proxy-in-selenium)

lordjabez avatar Apr 10 '22 04:04 lordjabez