SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

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

7 comments:

  1. Good content presentation! Thanks for putting the efforts on gathering useful content and sharing here. You can find more Selenium testing related question and answers in the below forum.

    Selenium testing question and answers

    ReplyDelete
  2. add information [about : the JavaScript window ID of the window to select] with example.

    ReplyDelete
  3. Curious...what do you do when Selenium IDE running openWindow will not invoke a new window?

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

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

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

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

    ReplyDelete