undetected-chromedriver icon indicating copy to clipboard operation
undetected-chromedriver copied to clipboard

How to disable chrome's "save password" popup

Open M-Zubair10 opened this issue 2 years ago • 12 comments

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?

M-Zubair10 avatar May 22 '22 11:05 M-Zubair10

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 .

sebdelsol avatar May 22 '22 12:05 sebdelsol

chrome_options.add_argument('--password-store=basic')

Change the password-store setting to your liking.

gigacodr avatar May 30 '22 19:05 gigacodr

@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...

sebdelsol avatar May 30 '22 20:05 sebdelsol

That exact code snippet seems to still show the password popup for me. Did something change under the hood?

frankhuurman avatar Nov 27 '22 23:11 frankhuurman

No. I've just tested it and works like a charm.

fudandori avatar Jan 28 '23 00:01 fudandori

@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.

Arcoth avatar Jun 11 '23 09:06 Arcoth

@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.

nicolopadovan avatar Jun 13 '23 10:06 nicolopadovan

@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?

psybers0ul avatar Jul 19 '23 18:07 psybers0ul

@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?

psybers0ul avatar Jul 19 '23 18:07 psybers0ul

Can confirm this error occurs for me as well

g3th avatar Aug 03 '23 01:08 g3th

@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 ??

NCLnclNCL avatar Aug 24 '23 18:08 NCLnclNCL

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().

blurrred avatar Apr 23 '24 16:04 blurrred