Selenium IDE “open”and “openWindow” commands with example

 “open” Command

“Open” command in selenium IDE software testing tool is mostly used command in selenium IDE software testing tool. “Open” command opens the URL whatever you want to open in your current selected browser window or tab.

In bellow given sample script, it will open “https://www.google.com” URL into your currently selected browser window.

New Test
Command Target Value
open https://www.google.com

VIEW EXAMPLE OF HOW TO OPEN URL IN WEBDRIVER.

“openWindow” Command

“openWindow” is useful to open your URL in new window. If you have not entered URL in target, It will
open just blank window.

In bellow given example, “openWindow” command will open “https://www.yahoo.com” in new browser tab. Please note, it firefox has blocked popup window then selenium IDE software testing tool will show you error. In this case please allow browser to open popups.

New Test
Command Target Value
open https://www.google.com
openWindow https://www.yahoo.com My_ID

Try both these example by your self to understand it better. You can try it for your software web application for better exercise.

VIEW MORE EXAMPLES ON SELENIUM IDE

10 thoughts on “Selenium IDE “open”and “openWindow” commands with example

  1. Once you prepare the script and save it, then if you again run the same script, then no need to URL (if you open the right window), so why this command is used ?

  2. If you use the script somewhere else such as HiSoftware Compliance Sheriff, then there's no internal self reference for the site and it needs to be explicitly stated.

  3. Hi Sir,
    I have executed the above command openWindow but it is showing an error
    Unexpected Exception: TypeError: result is null.
    Can you help me for the same as i m just a beginner..

  4. Let's chat on Hangouts!
    [error] Unexpected Exception: TypeError: result is null. fileName -> chrome://selenium-ide/content/recorder.js, lineNumber -> 74

Leave a Reply

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