问题
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