Like us on Facebook

LightBlog

April 26, 2013

WebDriver Playback in Selenium IDE

April 26, 2013 23
WebDriver Playback in Selenium IDE
Selenium IDE:

As we all know selenium IDE is a plug-in for Firefox and we can record play back in Firefox only but from now on wards we have to modify that statement because test recorded in Firefox can be run in IE and Chrome and other browsers also.


Download the latest version of Selenium IDE (2.9.0)

Below is the Release Notes:


Selenium IDE - Release Notes

  • Enh - Schedule tests for automatic playback at a certain time or periodic intervals. (http://blog.reallysimplethoughts.com/2015/03/09/selenium-ide-scheduler-has-arrived-part-1/)
  • Enh - Allow submission of diagnostic information via a gist.
  • Enh - Improved health logging, including alerts normally hidden.

  • Prerequisites:


    1. Java should be installed in your machine
    2. Download selenium server jar file.

    Set the WebDriver Playback Settings in Selenium IDE

    By default, WebDriver playback is turned off so recording and playback will work as before. To experiment with the WebDriver playback, you need to explicitly turn it on through the WebDriver tab of the Options dialog. To turn on WebDriver playback, check the option Enable WebDriver Playback.
    Then set the Browser to the one you want to use. The choices are android, chrome, firefox, htmlunit, internet explorer, iPhone, iPad and opera.
    Finally restart the Selenium IDE. A restart is required to enable or disable WebDriver Playback. Changing the browser does not require a restart.

    Set up in IDE:

    Part 1:
    1. Open selenium IDE
    2. Go to Options -->Options
    3. Select WebDriver Tab
    4. Check the Enable WebDriver Play back check box
    5. In text box type firefox or internetexplorer or chrome
    6. Click OK
    7. Record a test case in Selenium IDE or open a test case which is already recorded in Selenium IDE.

    Part 2:
    1. Start your selenium server
    2. open comand prompt and navigate to folder where you kept your selenium server and use the below commad to start your selenium server by using below command

    My selenium server jar file is kept in C\Naga\Jar...

    C:\Naga\Jar>java -jar selenium-server-standalone-2.31.0.jar

    Your selenium server will start.

    Then, In Selenium IDE click the run button. Based on the syntax give in options--options---Webdriver your browser will open and will execute the selenium IDE script in that browser.

    Its really awesome feature of Selenium IDE

    For more and detailed description please go through Samit Badle's Blog.

    Below is URL:


    Below are the Limitations:

    Limitations

    This is merely the first step in providing full WebDriver playback. Bugs and limitations are to be expected. I am aware of the following limitations:-
    • Multiple browser windows will be opened and will remain open.
    • Test may not pause or exit on errors.
    • An alert message may pop up for conditions that I have not encountered in my testing.
    • Executing a single command is not yet supported.
    • Highlighting a locator using the Find button may not work.
    • The timeout settings are ignored.
    • Screenshots may not work.
    • User extensions and plugins may not work.
    As you probably know by now, I do not use Selenium IDE myself, so I can only test it a tiny bit. Your help in reporting any issues is always most appreciated.



    NOTE: 
    IF you don't want to use this feature then you need to un check the check box(options--options---Webdriver ) and restart your selenium IDE