我有一个selenium2测试,由junit4,FireFox3.5,当键入一些注册信息,然后点击一个按钮提交,它将转向HTTPS认证所需弹出。如何处理这个安全弹出输入用户名和密码。然后,它将转到https页面并注册成功。像这样的形象
public void testUntitled() throws Exception {
selenium.open("/");
selenium.waitForPageToLoad("30000");
selenium.select("year", "label=2014");
selenium.select("day", "label=03");
selenium.type("firstName", "asd");
selenium.type("lastName", "df");
selenium.click("//div[@id='page-body']/div[1]/input");
Thread.sleep(30000);发布于 2011-09-29 02:27:28
好的,您可以使用AutoIT脚本来处理这个弹出窗口。
AutoIT脚本
WinWaitActive("Authentication Required")
Send("username")
Send("{TAB}")
Send("password")
Send("{ENTER}")通过这个脚本,我希望你能处理好。
https://stackoverflow.com/questions/6288746
复制相似问题