0

I wrote a code in which multiple URL is opening in Mozilla browser. But all URL have required login details. To avoid login code in my script, I used 'Saved Password' tactics. Before running to script I opened all URL and fill credential and marked as saved password. Assuming when I will run script then It would not ask any login. Unfortunately this is not working. When I am running script then login is required at that time too.

Please suggest where I am missing.

1 Answers1

0

Every time a selenium-powered browser is fired up - it starts with a complete clean session by default. What you save and configure in your actual browser manually would not automagically be applied there.

What you need to do is to let your driver know that you want to use an existing profile via FirefoxProfile. Here is a great HOWTO.

In short: locate the existing profile directory and point your FirefoxProfile instance to it:

profile = webdriver.FirefoxProfile('/path/to/profile/directory')
driver = webdriver.Firefox(profile)
Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195