tryolabs/requestium

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

gordianbahri opened this issue · 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?

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)