ionutcib
ionutcib

Reputation: 267

Select a tab in Selenium by window name

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 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?

Upvotes: 1

Views: 1808

Answers (1)

todd
todd

Reputation: 21

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,

Upvotes: 2

Related Questions