[英]How do I handle a Windows Authentication using Selenium
I am attempting to automate a process using selenium with Java. 我正在尝试使用硒与Java来自动化过程。 I am trying to navigate to a URL, which the test does do.
我正在尝试导航到URL,测试确实做到了。 A screen pops out over the top of Firefox asking for a user name and password.
Firefox顶部弹出一个屏幕,询问用户名和密码。 When this screen pops out, firebug stops working and I cannot get any information about this screen.
当此屏幕弹出时,萤火虫停止工作,并且我无法获得有关此屏幕的任何信息。
How do I handle a modal dialogue with Selenium, when I cannot find anything about it? 当我找不到与硒有关的模态对话时,该如何处理?
I guess, that you are trying to get to HTTP Authentification protected page. 我想,您正在尝试访问受HTTP身份验证保护的页面。 Try getting here like this:
尝试像这样到达这里:
driver.get("http://username:password@your-site.com");
Where driver
is assumed as healthy and living instance of WebDriver
假设
driver
是WebDriver
健康存在实例
This actually did not work, the dialog still displays. 这实际上不起作用,对话框仍然显示。 Instead of running the tests in Firefox as I had wanted I ran them in IE which was using NTLM so I didn't need to input my information.
而不是像我希望的那样在Firefox中运行测试,而是在使用NTLM的IE中运行了这些测试,因此无需输入信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.