Tips and Tricks While Using Selenium IDE


Selenium IDE is a Firefox Add-on developed originally by Shinya Kasatani as a way to use the original Selenium Core code without having to copy Selenium Core onto the server. Selenium Core is the key JavaScript modules that allow Selenium to drive the browser. It has been developed using JavaScript so that it can interact with DOM (Document Object Model) using native JavaScript calls. There are a few facts that one should keep in mind while creating any scenario based script using Selenium basics:

  • Tests should have a starting point.
  • Tests should not rely upon any other tests to run.
  • Test should only be testing one thing at a time.

Although these rules apply to any form of test automation but they need to be adhered specially when creating tests using a user interface. To start selenium IDE, start Mozilla Firefox > tools / web developer drop > selenium IDE. Once loaded the IDE is ready to record the testing event (make sure the record button is engaged). Following are the steps to be followed to create a script:

  • In record mode, navigate to starting point for example: www. Sample. com
  • Perform the action to be tested.
  • Stop recording and play the test, once successful, the  test may look like this:

Jmeter can be used to test and record the performance of any web application. While running any recorded Jmeter script, the components/ recorded files are loaded virtually and end user scenarios are not replicated. Hence to replicate user scenarios, one has to make use of Selenium Webdriver through Jmeter. Following are the steps required to configure Jmeter with Selenium Script:

  • Open Jmeter from command prompt.
  • Right click on the test plan > add > select thread group.
  • Right click on Thread Group > Add > Config Element > Select jp@gc- FirefoxDriver Config.
  • Right click on Thread Group > Add > Sampler > jp@gc- WebDriver Sampler.
  • In the Script section we need to define the selenium script in Java script format.
  • Add the listerner for reporting purpose, Right click on Thread Group > add > Listners > View Results Tree and Summary Report.
  • Now Save the Test Plan as .jmx file

Generatingselenium reports using TestNG-xslt through Ant is quite easy.TestNG-xslt relies upon apache ant to Generate selenium reports.Apache Ant is a Java library andcommand-line tool capable to drive processes described in build filesas targets and extension points dependent upon each other. Primaryuse of Ant is the build of Java applications. Ant supplies a numberof built-in tasks allowing to compile, assemble, test and run Javaapplications. Ant can also be used effectively to build.

About Author

Having more than 12 years of experience in the software industry, I have been working on various roles and responsibilities for Software development to Senior Project Manager. Currently I am working as a Senior Project Manager and have successfully delivered several web and desktop based projects. I am involved in System design and development, Client Interaction, Validating the requirements, planning and execution of Organization and Project level processes.

Related Topics
Web Scraping: Roadmap to The Process and Its Types

Posted: May 17 2022

Web Scraping: Roadmap to The Process and Its Types

Let’s say you want to write an article on the life of Steve Jobs. What do you do? You open Wikipedi...

Jeevanjot Kaur

Jeevanjot Kaur

Everything about OTT Streaming Services Like Netflix

Posted: Apr 05 2022

Everything about OTT Streaming Services Like Netflix

The past years have shown much in many contexts, and the world fell into hard times. The coronavirus ...

Smriti Sharma

The Economic Times Digital Roundtable: Spotlight on Mr. Ganesh Verma

Posted: Mar 16 2022

The Economic Times Digital Roundtable: Spotlight on Mr. Ganesh Verma

It's an honor and privilege for Seasia Infotech to chair as panel member at the economic times-digita...

Shreyasi Prasad