selenium IDE “selectPopUpAndWait” and “Close” commands with example

Selenium IDE is very useful regression testing tool in software industry. Selenium IDE has many built in commands and you can also extend it using extensions files. Let me describe you more 2 commands of Selenium IDE.


“selectPopUpAndWait” command
You can read my post about “selectPopUp” command before understanding “selectPopUpAndWait” command. As name suggests, “selectPopUpAndWait” is combination of two commands – 1) “selectPopUp” and 2) “waitForPageToLoad”. “selectPopUp” command will select targeted popup window and

“waitForPageToLoad” command will pause selenium until page get reloaded successfully.

“close” Command
You can use “close” command for closing window. It has not any other function. Let we see both commands with example as bellow.
New Test
Command Target Value
open http://www.w3schools.com/tags/tryit.asp?
filename=tryhtml_a_target
verifyTextPresent Open link in a new window or tab
click link=Visit W3Schools!
pause 2000
selectPopUpAndWait W3Schools Online Web Tutorials
verifyTextPresent Learn to Create Websites
close

In above example, “selectPopUpAndWait” command will select new opened popup and then it will wait for page to load. Next command will be not executed until page loading is in process. once page reloaded successfully, Next command will be executed.
Last “Close” command will simply close the new opened popup window with title “W3Schools Online Web Tutorials”. Run above script yourself to understand both commands better.

6 thoughts on “selenium IDE “selectPopUpAndWait” and “Close” commands with example

  1. Getting below error for click command

    [warn] Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank31328
    [error] Unexpected Exception: TypeError: result is null.

  2. even i to got the below error

    [warn] Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank31328
    [error] Unexpected Exception: TypeError: result is null. –

    plz help

  3. Even i too got the below error for click command

    [warn] Link has target '_blank', which is not supported in Selenium! Randomizing target to be: selenium_blank31328
    [error] Unexpected Exception: TypeError: result is null.

    plz help

Leave a Reply

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