selenium-ide

Getting started with selenium-ide

Remarks#

This section provides an overview of what selenium-ide is, and why a developer might want to use it.

It should also mention any large subjects within selenium-ide, and link out to the related topics. Since the Documentation for selenium-ide is new, you may need to create initial versions of those related topics.

How to export the testcase as Java class from selenium IDE

Lets take fb login as testcase,will see how to capture and export as JAVA class

  • Click on the selenium IDE icon on top right corner of your browser
  • Enter the url https://facebook.com
  • Click on Record button , as shown in the screenshot

enter image description here

  • Export the usecase as java file

enter image description here

  • Save the file in you local machine with .java extension
  • Open that file it will looks like this:

enter image description here

  • Now you can import this file into any IDE
  • Assume that we are going to user eclispe,create a new package com.example.tests
  • Just copy this file and paste there
  • Add the required jar files (Selenium jar + TesgNG jar)

Now you are ready to run the test.

Setup for selenium IDE in Firefox.

Installation :

  • Open Firefox browser.click on menu and select Add-ons

enter image description here

  • Search for selenium IDE
  • Install selenium IDE Add-on in firefox.
  • Restart the Firefox.
  • If the selenium IDE is installed successfully then you can see the icon on top of the browser

enter image description here

  • By clicking on this icon, you can launch the selenium IDE.

Recording and Executing a script

  • After launching the IDE, Click on record button to record a script.

enter image description here


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow