1

I am using two factor authentication in chrome driver for my automation tests. My first test simulates a login screen through two factor authentication. When the test is running in chromeDriver, it will simulate the login with two factor and get to the home page, but it won't go forward to my other test step definitions. Do I need to implement the login and password in every test step definition for it to simulate in chrome driver?

1
  • I've never used Selenium Chrome Driver, but usually, yes, that's the case for acceptance tests. After every test, the system, environment and/or app restart to its original state, so tests won't conflict with each other, causing false-negatives and false-positives. Commented Jun 22, 2018 at 14:57

1 Answer 1

2

If the selenium session ends after the authentication test, and your create a new session and attempt to access a page requiring authentication, yes you do need to login for every test step.

If you are attempting to perform more tests after you have performed your authentication tests in the same session and still receiving a problem, there is a logic error.

By posting your code you may be able to receive a more accurate analysis of your problem

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. I have it together now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.