关闭窗口后没有这样的窗口异常 [英] no such window exception after close window
问题描述
使用close window关键字关闭弹出窗口后,我无法选择主父窗口.我尝试了等到关键字成功",但仍然遇到同样的问题.
I am unable to select main parent window after closing pop-up window using close window keyword. I tried Wait until keyword succeeds but still I am getting the same issue.
此问题正在Chrome,FF,IE上发生,有人可以帮助我解决此问题.我正在使用带有机器人框架的selenium 2.43版本
This issue is happening on Chrome,FF,IE can someone please help me to get a workaround for this. I am using selenium 2.43 version with Robot Framework
关闭窗口正在关闭弹出窗口,但是在选择窗口步骤中,我没有看到这样的窗口异常.
Close window is closing pop up but at select window step I am getting no such window exception.
我还尝试了等待关键字成功,但关闭窗口"并选择了窗口,但是没有运气.
I also tried with Wait Until Keyword Succeeds with Close window and select window but no luck.
ClickElement popOutLink
afterPopOutClick Get Window Titles
popOutWindow} Get From List afterPopOutClick 1
Select Window title = popOutWindow
Close Window
Select Window title = Parent Window
请建议您是否有任何解决方法
Please suggest if you have any work around
推荐答案
我建议您为Windows提供一个唯一的标识符,该标识符将来可能会有用,并且出错的几率更大. 使用以下方法将ID添加到窗口中:
I would recommend that you give your windows a unique identifiers, may be useful in future and has a lot better chance of being error free. Add an ID to a window using:
Open Browser FF Window1 google.co.uk
然后切换到该窗口:
Switch Browser Window1
希望有帮助!
这篇关于关闭窗口后没有这样的窗口异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!