Creating a Selenium Virtual User Script from a Selenium IDE Recording

Selenium IDE is a Firefox extension that provides an IDE for Selenium. It allows you to record and playback Selenium scripts, and to export the recorded scripts as Java JUnit 4 WebDriver scripts. It is then a simple matter to convert the JUnit java code into an Eggplant Performance Selenium script. The instructions below will guide you through the process of installing Selenium IDE, recording a simple script, and then converting that script into an Eggplant Performance Selenium script.

  1. Launch the Firefox browser and then navigate to
  2. Click to download the latest version of Selenium IDE:
  3.  Selenium download page

  4. Click Allow to allow the Selenium IDE to be installed.
  5. Click Restart Now to restart Firefox .
  6. Launch the Selenium IDE by navigating to Web Developer > Selenium IDE
  7. When Selenium IDE starts, it automatically begins recording your actions within Firefox. The example below shows a recording where we navigated to and entered a search for "testplant":

     Selenium IDE interface

  8. To convert the Selenium recording into a Java JUnit test case, go to File > Export Test Case As > Java / JUnit 4 / WebDriver:

    Export test case dialog

  9. Choose a location to save the java source code file. The java code can then be copied and pasted into an Eggplant Performance Selenium script with only very minor changes. For example, the JUnit test case for our simple Google search looks like this:

    import org.openqa.selenium.By;



    public void testGoogleSearch() throws Exception


    driver.get(baseUrl + "/");




    Within an Eggplant Performance Selenium script this would become:

    import org.openqa.selenium.By;



    public void script() throws Exception







This topic was last updated on May 19, 2021, at 04:16:28 PM.

Eggplant icon | Documentation Home | User Forums | Support | Copyright © 2021 Eggplant