Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gordianbahri opened this issue Mar 26, 2022 · 1 comment
Open

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

gordianbahri opened this issue Mar 26, 2022 · 1 comment

Comments

@gordianbahri
Copy link

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?

@lordjabez
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants