Skip to content

Instantly share code, notes, and snippets.

@a12b
Last active October 24, 2019 04:59
Show Gist options
  • Save a12b/64974a5dd12dd64dbacab253679ca2a1 to your computer and use it in GitHub Desktop.
Save a12b/64974a5dd12dd64dbacab253679ca2a1 to your computer and use it in GitHub Desktop.
How detect selenium, remove navigator.webdriver flag
In browser console:
> navigator.webdriver
true
#Python change
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("excludeSwitches", ['enable-automation'])
After (in browser console):
> navigator.webdriver
undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment