What Is Automation Script In Selenium IDE and How Does It Work?

Selenium IDE

Currently, for the good quality of the website, Selenium IDE is used for regression testing. Everyone has to face problem to make an IDE script in below cases:-

  • Pagination
  • Mouseover
  • Drag And Drop

Here, we have described the usage of commands on your website for the above cases.

Steps to test pagination on your website with the Selenium IDE:

Scenario: These are the no. of pages or a Pagination, on which user wants to go.

1

Follow the below mentioned steps:

Step-1:

  • Right click on the page no.
  • Select ‘Inspect in FirePath’.
  • Select the XPath is used for page no. 2
  • Copy shown XPath.
     
2

Step-2:

  • Go to Selenium Script table and use commands.
  • Command: clickAt & Also you can use clickAndWait
  • Target: XPath of page(as described above image)
  • Value: Value of page
     
3

Or else add a command to a source file as shown below.
 

4

Steps to test Mouseover on your website with the Selenium IDE

Scenario: Here, is the popup, which is opened while hovering the button.

5

Follow the below mentioned steps:

Step-1:

  • Right click on the Start New Search button. the XPath is used the button were shown. Copy it.
  • Select ‘Inspect in FirePath’.
  • The XPath is used for the button were shown.
  • Copy shown XPath.
     
6

Step-2:

  • Go to Selenium Script table use below commands.
  • Command: mouseOver
  • Target: XPath of button(as described above image)
     
7

Or else add command in source file as shown below.

8

Steps to use dragAndDrop command to move one location to another location in any Block

Scenario: Here is the Map, which is clickable in any area on a map to find clusters or  Take other Example like Review slider.

9

Step-1:

  • Drag anywhere on Map to check the clusters at any place. 
  • Select ‘Inspect in FirePath’.
  • Copy the XPath of Map which is used to move from one place to another place on a map.
     
10

Step-2:

  • Go to Selenium Script table use below commands.
  • Command: dragAndDrop
  • Target : XPath of page(as described above image)
  • Value : Value of page  [(x-pixels),(y-pixels)]
     
11
12

Check below examples for more:

  • The Value of page (x-pixels and y-pixels) is the location to drag and drop the locator from one location to another location.
  • We can use the Value as - 
  1. 20,30 which moves the location to 20 pixels right and 30 pixels upper on ma a in your system screen. 
     
13

2. 20,-30  which moves the location to 20 pixels right and -30 pixels down on Map in your system screen.

14

3. -20,30  which moves the location to -20 pixels left and 30 pixels upper on Map in your system screen.

15

4. -20,-30  which moves the location to -20 pixels left and -30 pixels down on Map in your system screen. 
 

16

Hope you find this info.regarding Selenium helpful and need more QA assistance then contact us now. Feel free to give your reviews on it.