0

I've just started using Selenium and implemented the ChromeDriver, but when going to the page I want, chrome gives it own prompt box, similar to " save password for this site always", it pretty much has the site asking to store data on my pc, and I have to verify that.. but it interferes with my script.

Is there anyway for Selenium to click " OK "? or am I able to import some sort of session ID so it's already allowed permission to save files rather than prompt me everytime?

enter image description here

Yi Zeng
  • 30,504
  • 12
  • 92
  • 119
user3255841
  • 103
  • 1
  • 2
  • 8
  • http://cdn-static.zdnet.com/i/r/story/70/00/019074/chrome-save-password-584x156.jpg%3Fhash%3DA2L2AGWyZG%26upscale%3D1 uses same promptbox as the one shown in image – user3255841 Jan 31 '14 at 07:46

1 Answers1

0

First, I don't think this can interfere with the tests in any way, because it's a browser level thing. " it pretty much has the site asking to store data on my pc, and I have to verify that.", wrong. It has nothing to do with "save files". You don't need to worry about this prompt at all.

Second, I somehow can't reproduce your issue, so I can only provide the logic as below.

Chrome has a switch called "--enable-save-password-bubble", which enables save password prompt bubble. You can try set it to false when starting your 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)
Yi Zeng
  • 30,504
  • 12
  • 92
  • 119