undetected-chromedriver
undetected-chromedriver copied to clipboard
How to disable chrome's "save password" popup
To disable the save password popup in Google Chrome within your Selenium Tests you can use the following piece of code block:
from selenium import webdriver
chrome_opt = webdriver.ChromeOptions()
prefs = {"credentials_enable_service": False,
"profile.password_manager_enabled": False}
chrome_opt.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(chrome_options=chrome_opt, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')
driver.get("https://google.com")
What is equivalent in undetected_chromedriver?
That would be the exact same code since the new version handles 'prefs'
experimental options.
And you would get rid of this nagging popup : I tried and it works like a charm.
Please update undetected-chromedriver to get this new features :grin: : pip install undetected-chromedriver -U
.
chrome_options.add_argument('--password-store=basic')
Change the password-store setting to your liking.
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions()
options.add_argument("--password-store=basic")
options.add_experimental_option(
"prefs",
{
"credentials_enable_service": False,
"profile.password_manager_enabled": False,
},
)
driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options.
I'm still looking for the equivalent for the 'prefs'
experimental options...
That exact code snippet seems to still show the password popup for me. Did something change under the hood?
No. I've just tested it and works like a charm.
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options. I'm still looking for the equivalent for the
'prefs'
experimental options...
This leads to the following error on my end:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions
from invalid argument: unrecognized chrome option: prefs
This is on Linux. I am using your latest version.
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options. I'm still looking for the equivalent for the
'prefs'
experimental options...This leads to the following error on my end:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
This is on Linux. I am using your latest version.
Getting the same exact error, on MacOS, latest version.
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options. I'm still looking for the equivalent for the
'prefs'
experimental options...This leads to the following error on my end:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
This is on Linux. I am using your latest version.
Getting the same exact error, on MacOS, latest version.
any solution?
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options. I'm still looking for the equivalent for the
'prefs'
experimental options...This leads to the following error on my end:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
This is on Linux. I am using your latest version.
any solution?
Can confirm this error occurs for me as well
@wazoooo bạn nói đúng, bạn thực sự cần cả ba để thoát khỏi cửa sổ bật lên mật khẩu khó chịu này:
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT: Đây là danh sách đầy đủ các công tắc dòng lệnh của Chrome hay còn gọi là tùy chọn Chrome thông thường. Tôi vẫn đang tìm kiếm sự tương đương cho
'prefs'
các tùy chọn thử nghiệm...Điều này dẫn đến lỗi sau của tôi:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
Đây là trên Linux. Tôi đang sử dụng phiên bản mới nhất của bạn.
@wazoooo you're right you actually need all three to get rid of this nagging password popup :
options = uc.ChromeOptions() options.add_argument("--password-store=basic") options.add_experimental_option( "prefs", { "credentials_enable_service": False, "profile.password_manager_enabled": False, }, ) driver = uc.Chrome(options=options)
EDIT : Here's a comprehensive list of Chrome command line switches aka regular Chrome options. I'm still looking for the equivalent for the
'prefs'
experimental options...This leads to the following error on my end:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
This is on Linux. I am using your latest version.
Does it show key to save password ??
That exact code snippet seems to still show the password popup for me. Did something change under the hood?
I was having an issue, and it was from this line:
options = uc.ChromeOptions()
I had options = ChromeOptions()
, which was causing it not to work properly. Make sure you put uc.ChromOptions()
instead of just ChromeOptions()
or Options()
.