no such window exception after close window

心不动则不痛 提交于 2019-12-13 05:00:10

问题


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.

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


回答1:


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

Then to switch to that window:

Switch Browser    Window1

Hope that helps!



来源:https://stackoverflow.com/questions/26594924/no-such-window-exception-after-close-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!