【发布时间】:2022-10-23 23:41:20
【问题描述】:
我正在尝试在 python3 和 Selenium 中使用密码会话打开 chrome 浏览器 这是我的代码:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
options = Options();
options.add_argument(r"--user-data-dir=/home/username/.config/google-chrome/")
options.add_argument(r'--profile-directory=User Profile')
service = Service('/opt/google/chrome/chromedriver')
driver = webdriver.Chrome(service=service, options=options)
它用我的个人资料打开了我的 chrome,但删除了所有 cookie 和密码连接。
如何使用保存的密码和会话打开 chrome?
【问题讨论】:
标签: python selenium-webdriver selenium-chromedriver