问题
I'm using robotframework with the Selenium2Library. And i've been having some trouble on handling popup windows in IE8.
Try Popup
Open Browser To PageXYZ
Click Element XYZ
Select Window name=POPUPXYZ
Page Should Contain X
Page Should Contain Y
Page Should Contain Z
Close Window
Get Window Identifiers
Any command I use after the 'Close Window' fails and i get the same exception NoSuchWindowException.
(That shouldn't happen for the Get Window command IMO)
Any help?
Ty
回答1:
I agree with you that it should not happen but it does. From what I have seen, it is as if WebDriver needs a cool-off period (Sleeps will get rid of the error). As a workaround I use Wait Until Keyword Succeeds in combination with a Selenium2Library keyword that should pass before I resume testing.
来源:https://stackoverflow.com/questions/16687499/nosuchwindowexception-after-close-window