-
Notifications
You must be signed in to change notification settings - Fork 66
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
How can I set the user-agent for Chromedriver? #184
Comments
https://docs.rs/thirtyfour/latest/thirtyfour/common/capabilities/chrome/struct.ChromeCapabilities.html let mut caps = DesiredCapabilities::chrome();
caps.add_chrome_arg("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36").expect("Unable to set user agent"); |
There is a method for this in the docs
And continue with your usage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I know for Firefox I there is a method
set_user_agent()
: https://docs.rs/thirtyfour/latest/src/thirtyfour/common/capabilities/firefox.rs.html#239-241or for python one can do something like:
But how can it be done with Rust and the Chromedriver option?
Thanks in advance!
The text was updated successfully, but these errors were encountered: