HomeSelenium

New Selenium IDE – Using ‘store window handle’ command

New Selenium IDE – Using ‘store window handle’ command

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

store window handle is one of the commands in Selenium IDE.

The purpose of the store window handle command is to store the window using its locator i.e. tab index or title.

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

Let’s get started.

New Selenium IDE – Using ‘store window handle’ command

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

1) Let’s write the below code in Selenium IDE to store a window using store window handle command by using title locator as shown below:

Command Target Value
open http://omayo.blogspot.com/
click xpath=//a[text()=’Open a popup window’]
store window handle title=omayo (QAFox.com) x
select window x

2) We can also use store window handle command and tab index value to store a window using it 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’]
store window handle tab=1 x
select window x

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 store window handle command in Selenium IDE for storing the 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 *