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:
[su_table alternate=”no”]
Command | Target | Value |
---|---|---|
open | http://omayo.blogspot.com/ | |
click | xpath=//a[text()=’Open a popup window’] | |
select window | title=Basic Web Page Title |
[/su_table]
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.
[su_table alternate=”no”]
Command | Target | Value |
---|---|---|
open | http://omayo.blogspot.com/ | |
click | xpath=//a[text()=’Open a popup window’] | |
select window | tab=1 |
[/su_table]
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 ?
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.
Hello I just want to share this blog which helped me able to run the Selenium IDE script in a new window. https://corevo.io/the-difficulties-of-select-window/
Selenium IDE v3 has “Modify new window configuration” option beside the Command field.
In Modify new window configuration, set the Window Name to newWindow
Here is the command sequence
Click | linkText=
select window | handle=${newWindow}
proceed with the process/transaction you want to do.