我们正在针对现有代码库运行Selenium回归测试,我们的Web应用程序中的某些屏幕使用弹出窗口作为中间步骤。
目前,我们在测试中使用以下命令:
// force new window to open at this point - so we can select it later
selenium().getEval("this.browserbot.getCurrentWindow().open('', 'enquiryPopup')");
selenium().click("//input[@value='Submit']");
selenium().waitForPopUp("enquiryPopup", getWaitTime());
selenium().selectWindow("enquiryPopup");
...它在大多数情况下都有效。偶尔会在waitForPopUp()
行上失败测试。
com.thoughtworks.selenium.SeleniumException: Permission denied
有人能建议更好、更可靠的方法吗?
此外,我们主要在IE6和7上运行这些测试。