HomeSelenium

New Selenium IDE – Using ‘mouse down at’, ‘mouse move at’ and ‘mouse up at’ commands for dragging and dropping

New Selenium IDE – Using ‘mouse down at’, ‘mouse move at’ and ‘mouse up at’ commands for dragging and dropping

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

mouse down at, mouse move at and mouse up at are commands in Selenium IDE.

The purpose of the mouse down at command is to perform mouse left click operation at the given x & y coordinate position, mouse move at command is to move the holder UI element to the target element at the given x & y coordinate position and the mouse up command is to release the mouse click to release the so far held UI element to the desired element at given x & y coordinate position in Selenium IDE.

In this article, I am going to practically demonstrate mouse down at, mouse move at and mouse up at commands in Selenium IDE for performing the drag and drop operations on the below-shown elements:

up and down Selenium IDE - demo two

 

Let’s get started.

New Selenium IDE – mouse down at, mouse move at and mouse up at commands

Follow the below steps for practicing mouse down at, mouse move at and mouse up at  commands in Selenium IDE along with me:

1) There is a dedicated command in Selenium IDE for dragging and dropping a UI element to the target UI element known as drag and drop to object

But if in case, the drag and drop to object command in Selenium IDE is not working, we can use an alternative way of dragging and dropping using mouse down atmouse move at and mouse up at commands in Selenium IDE.

2) Now let’s write the below code in Selenium IDE to perform the drag and drop operation using mouse down at, mouse move at and mouse up at commands:

Note: We have to use ‘select frame‘ command as the draggable and droppable UI elements are inside a frame.

Command Target Value
open https://jqueryui.com/droppable/
select frame index=0
mouse down at id=draggable 10,20
mouse move at id=droppable 11,15
mouse up at id=droppable 8,13

 

After incorporating the commands in the above table, Our Selenium IDE should look like below:

up move down at Selenium IDE - typings

 

3) Click on ‘Run current test’ option as shown below:

up move down at Selenium IDE - run

 

4) Observe that the test will be passed and the drag and drop operation will be performed by the mouse down at, mouse move at and mouse up at commands in Selenium IDE as shown below:

up move down at Selenium IDE - execute

Here concludes the practical demonstration of mouse down at, mouse move at and mouse up at commands in Selenium IDE for performing drag and drop operation.

In the next article, I will practically demonstrate another Selenium IDE command.

Next Steps:

  • > Check complete Selenium Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning ?

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

Refer the article New Selenium IDE – Commands (Selenese), for the complete list of Selenium IDE commands and their practical demonstrations.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp