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
CommandTargetValue
openhttp://www.w3schools.com/tags/tryit.asp?
filename=tryhtml_a_target

verifyTextPresentOpen link in a new window or tab
clicklink=Visit W3Schools!
pause2000
selectPopUpAndWaitW3Schools Online Web Tutorials
verifyTextPresentLearn 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 comments:

  1. i got element link=Visit W3Schools! not found. Please, help.

    ReplyDelete
    Replies
    1. I got the one like this when the pop-up windows were not allowed in browser.

      Delete
    2. I got the one like this when the pop-up windows were not allowed in browser

      Delete
  2. 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.

    ReplyDelete
  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

    ReplyDelete
  4. 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



    ReplyDelete