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?
-
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.VitorMM– VitorMM2018-06-22 14:57:59 +00:00Commented Jun 22, 2018 at 14:57
Add a comment
|
1 Answer
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
1 Comment
J.Johnson
Thank you. I have it together now.