Skip to main content
 首页 » 编程设计

python之如何禁用 "Save Password for this website"Selenium Python 语法

2024年08月20日46dyllove98

我想在 Python 中用 selenium 禁用这个弹出窗口。 popup image

我看到了很多说明如何在 java 中执行此操作的答案,但我很难在 python 中实现它。

请您参考如下方法:

Python 实现您想要使用 selenium 完成的任务。

from selenium import webdriver 
from selenium.webdriver.chrome.options import Options 
 
chrome_options = Options() 
chrome_options.add_experimental_option('prefs', { 
    'credentials_enable_service': False, 
    'profile': { 
        'password_manager_enabled': False 
    } 
}) 
driver = webdriver.Chrome(chrome_options=chrome_options)