被测应用程序是一个内部站点。当我在 IE 中运行测试时,我无法选择新窗口。这是我的测试中出现错误的部分
Run report
input text txtSearchKey TestProduct
click element searchButton
click element xpath=//*[@id='tblProductSelect']/tbody/tr[1]/td
wait until element is not visible loadingDiv
click button id=btnRunReport
wait until element is not visible loadingDiv
get window identifiers
get window names
select window Product Report
单击 btnRunReport 时,应用程序将在新选项卡中打开并显示报告。当用户进入应用程序并在 chrome 或 IE 中生成报告时,就会发生这种情况。
当我运行这个测试时,它在 Chrome 中运行良好。报告在新选项卡中打开,我可以选择该选项卡。在 IE 中,它在新窗口中打开,这是预期的行为(参考:https ://github.com/SeleniumHQ/selenium/issues/5108 )。
我在新窗口中打开它没有问题,但我无法选择那个新窗口。我收到此错误 - ValueError: Unable to locate window with handle or name or title or URL 'Product Report'
“获取窗口标识符”和“获取窗口名称”仅获取 1 个浏览器。它似乎不认识第二个。此外,在 Suite Teardown 中,第二个窗口没有关闭。
谢谢。我希望有一个人可以帮助我。
这是我的系统规格:
- 操作系统 - Windows 7
- 浏览器 - IE11
- 机器人框架版本 - 3.0.2
- IEDriverServer 版本 - 3.4
- Selenium2Library 版本 - 1.8.0