Selecting popwindow in Selenium using Index
Is there any possibility of selecting windows based on Index as done in Iframes?
Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top". You can开发者_JAVA百科 also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2".
When Selenium can get all window titles or names, is it possible to write like this?
selectWindow(getAllWindowsNames[1])
Selenium javadoc says that selectWindow requires javascript window ID. Hence window names won't work.
Have you seen another similar method getAllWindowIds()? You can use that method to select it using index like selectWindow(getAllWindowIds()[1]) :)
Hope this helps
加载中,请稍侯......
精彩评论