Click the "Request Chrome" button to save the password.

I just started using Selenium and implemented ChromeDriver, but going to the page I want, chrome gives it its own help window, similar to “always save the password for this site,” pretty much the site asks to store data on my computer, and I should check this .. but it interferes with my script.

Anyway for Selenium click "OK"? or can I import some sort of session identifier so that it already allows me to save files, and not prompt me every time?

enter image description here

0
source share
1 answer

-, , - , . " , "., . "save files". .

-, - , , .

Chrome " - enable-save-password-bubble", . false Chrome.

# untested code, only the logic
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--enable-save-password-bubble=false")

driver = webdriver.Chrome(executable_path="path/to/chromedriver", chrome_options=chrome_options)
0

Source: https://habr.com/ru/post/1525792/


All Articles