March 17, 2018
Webdriver | Drag And Drop Using Testmate | Action
Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/pkq2w3icktox/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383
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() |