简体   繁体   English

硒二因子认证

[英]selenium two factor Authentication

I am using two factor authentication in chrome driver for my automation tests. 我在chrome驱动程序中使用两因素身份验证进行自动化测试。 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. 当测试在chromeDriver中运行时,它将使用两个因素模拟登录并进入主页,但不会继续进行其他测试步骤定义。 Do I need to implement the login and password in every test step definition for it to simulate in chrome driver? 我需要在每个测试步骤定义中实现登录名和密码,以便在chrome驱动程序中进行模拟吗?

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 通过发布您的代码,您也许可以对问题进行更准确的分析

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM