开发者

Select a tab in Selenium by window name

开发者 https://www.devze.com 2023-03-18 07:47 出处:网络
I can open new tabs with openWindow(url,windowID) in Selenium(Java) but I can not switch back to them. I have tried with selectWindow and selectPopup but nothing happened. I have studied that I开发者_

I can open new tabs with openWindow(url,windowID) in Selenium(Java) but I can not switch back to them. I have tried with selectWindow and selectPopup but nothing happened. I have studied that I开发者_如何学C can do that by pressing(virtually) CTRL + tab number. I haven't tried because this is not good enough for me because I need more than 10 tabs. How can a switch between tabs?


if you want to return to return to your original window, meaning the one your selenium test actually opened, just select "null" as the target id/ title. In addition, you can avoid clutter in different windows and tabs with the wd.close(); command, in case you didn't know. This will not close all the tabs in your window, so you should be able to continue testing within these targets,

0

精彩评论

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

关注公众号