Created
December 19, 2018 15:23
-
-
Save thureos/2db0bc44589669a00c22a86503c80bbb to your computer and use it in GitHub Desktop.
Selenium Remote Webdriver set Chrome User Agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
capabilities = webdriver.common.desired_capabilities.DesiredCapabilities.CHROME.copy() | |
capabilities['javascriptEnabled'] = True | |
options = webdriver.ChromeOptions() | |
options.add_argument('--user-agent=<YOUR USER AGENT HERE>') | |
driver = webdriver.Remote(command_executor='http://<YOUR SELENIUM HUB HERE>:4444/wd/hub',desired_capabilities=capabilities, options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment