Close a newly opened tab or window in Selenium IDE Close a newly opened tab or window in Selenium IDE selenium selenium

Close a newly opened tab or window in Selenium IDE


I had same problem and found a solution:

  1. click on link that opens the new tab
  2. add command waitForPopUp
  3. set focus to new tab via command selectPopUp
  4. make your verifications or other commands regarding to your content in new tab
  5. use command close to close tab
  6. use command selectWindow to set focus to the old window

Screenshot of my Selenium IDE commands:

Selenium IDE switch tabs

That works for me.


Use selectWindow(windowID) command to switch to new window in Se IDE. You can select new window by its windowID/name/title.

Hope this helps...


Agreed with surya use selectWindow(windowID), you can get the window title by right click on the page check the option verifyTitle and in front of that you have your Title. Hope it helps out.