Post Your Answer
6 years ago in Research Methods By Ritesh Tomar
Drag And Drop in selenium
How to create an action chain for the purpose of dragging & dropping a selenium?
All Answers (3 Answers In All)
By Mehak Chaudhary Answered 7 years ago
Create a new Selenium WebDriver project in intellij
Create a class and test the codes . Click to avail the codes.https://www.softwaretestingmaterial.com/drag-and-drop-using-actions-class-in-selenium/
Run a test
Here we need to create an Action object and create a chain of events. When a chain is built, we call build(). When perform() is called, the items are popped out and run in order.
Reply to Mehak Chaudhary
By Lalit Mudra Answered 6 years ago
1. “Sourcelocator”, an element which we require to drag
2. “Destinationlocator”, an element which we require to drop the first element
In dragAndDropBy method we pass the 3 parameters.
First parameter, “Sourcelocator” is the element which we drag
Second parameter is the x-axis pixel value of the 2nd element.
The third parameter is y-axis pixel value of the 2nd element.
Reply to Lalit Mudra
By Fern G Answered 6 years ago
Reply to Fern G
Related Questions