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:
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 at, mouse 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:
3) Click on ‘Run current test’ option as shown below:
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:
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 ?
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.