-1

If I open up a Firefox session manually and navigate to the particular site, I'm able to bypass the login screen due to my having saved the login credentials and selected the "keep me signed in" option.

However, when I open a new session with selenium/geckodriver, I'm being treated like a new user and asked to log in.

Any workaround other than manually logging in? (I signed up via Google so I can't simply send_keys("username"/"pass))

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125
shbooms
  • 83
  • 1
  • 10
  • Possible duplicate of [Selenium use of firefox profile](https://stackoverflow.com/questions/37247336/selenium-use-of-firefox-profile) – JeffC Sep 16 '17 at 01:39

2 Answers2

0

You have to put login tests in Your automated tests so they can be run from any machine and also from CI/CD system.

Sanja Paskova
  • 1,110
  • 8
  • 15
0

Everytime you runs the script, WebDriver opens the browser in a new session.Hence you wont see/use the previously saved credentials of login page. If you want to bypass this i.e the login , you can create a Firefox profile and perform all the actions once with the new profile of Firefox manually and tsaved it. Then use the newly created Firefox profile in your automation script.

You can create firefox profile by hitting " Firefox -p" command in run window.

Follow the link for firefox profile creation.

workspace
  • 368
  • 1
  • 6
  • 16