Automation

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.

Pagination

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.

Step-2:

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

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

HTML code

Steps to test Mouseover on your website with the Selenium IDE

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

est Mouseover on

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.
     
FirePath

Step-2:

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

Or else add command in source file as shown below.

HTML code

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.

Map Image

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.
Map Image 2

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)]
Script Table
HTML code

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. 
cmd

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

cmd

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

CMD

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

Selenium

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.

Frequently Asked Questions

Floating Icon 1Floating Icon 2