HomeSelenium

New Selenium IDE – Using ‘select window’ command

New Selenium IDE – Using ‘select window’ command

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

select window is one of the commands in Selenium IDE.

The purpose of the select window command is to select or switch to another window.

We can either use the window title or window tab index to select a window using the select window command.

Though it is practically not possible (i.e. now working) to use select window command in Selenium IDE to select or switch to another window using title or tab index, I will explain in this article about the syntax for using the select window in selecting or switching a window.

Let’s get started.

New Selenium IDE – Using ‘select window’ command

Follow the below steps for practicing select window command in Selenium IDE along with me:

1) Let’s write the below code in Selenium IDE to select a window using select window command and title as shown below:

Command Target Value
open http://omayo.blogspot.com/
click xpath=//a[text()=’Open a popup window’]
select window title=Basic Web Page Title

2) We can also use select window command and tab index value for selecting or switching to a window by using the below sample code:

Note: tab=0 stands for the main window, tab=1 stands for first tab window to the right, tab=2 stands for second tab window to the right, tab=-1 stands for first tab window to the left of the main window and so on.

Command Target Value
open http://omayo.blogspot.com/
click xpath=//a[text()=’Open a popup window’]
select window tab=1

I tried in all ways and am unable to demonstrate the above-given sample codes as they are not working in my machine.

Feel free to comment in this post, if you are successful in executing any of the above tables.

Here concludes the practical demonstration of select window command in Selenium IDE for selecting or switching to a window.

In the next article, I will practically demonstrate another Selenium IDE command.

Next Steps:

  • > Check complete Selenium Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning 🙂

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

If you like this article, share it on LinkedIn using the below button:

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *