我想以登录的 chrome 用户身份使用 chrome webdriver,它通常作为一个没有任何 cookie 的普通 chrome 实例启动,并且未登录到 google。 在java上下文中可以找到类似的问题here 。
最佳答案
在Python中:
chrome_options = Options()
chrome_options.add_argument("user-data-dir=/location/to/chrome/profile")
driver = webdriver.Chrome(chrome_options=chrome_options,executable_path='/location/to/chromedriver')
关于python - 如何使用 python selenium 包打开 chrome webdriver,登录默认用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39398436/