开发者

How to force selenium to detect open window?

js gets downloaded to browser cache. js contains functionA that constructs the url and calls the window.Open to open the url. i call the functionA to open the window. selenium doesnt detect th开发者_如何学JAVAe window at all. i did getAllWindowTitles and getAllWindowNames, etc. But do not see window at all.

by the way the reason i had to this is because when i click on button that has an onclick='calltofunction()', the window is not detected either.

it would be better actually if i can force selenium to see the open window after i click the button.

Thanks!


The straight forward answer that I can think of right now is to move on to Selenium 2.31.0, which has an updated support for WebDriver, and can be used in parallel to Selenium.

Then, it is easy to do ALT+TAB (for Windows, or CTRL+TAB for tabs), and WebDriver picks up the new tab/window and reads off of it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜