Webdriver | Drag And Drop Using Testmate | Action

The action class in selenium is used for emulating complex user gestures.
The sample of action using Testmate, performing drag and drop operation is as below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'Initialize the driver
 Call wd.InitializeFireFoxDriver("C:\Users\jaska\Desktop\selenium")
 
'Navigate to the requireed URL
 Call wd.NavigateToUrl("https://jqueryui.com/droppable/")
 
'Switch to the frame using xpath as identifier
 Call wd.SwitchToFrame("xpath::.//*[@id='content']/iframe")
 
'Initialize Action object
 Call wd.InitializeAction()
 
'Add an action to the initialized action object
 Call wd.DragAndDrop_Action("id::draggable","id::droppable")
 
'Performa the action
 Call wd.BuildAndPerform_Action()
 
'Quit The driver
 Call wd.Quit()

Add a Comment

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