05-21-2012, 10:30 AM
Hi Taran,
In order to achieve drag and drop, we shall use "Mercury.DeviceReplay" Object.Please see the example below for your reference
In order to achieve drag and drop, we shall use "Mercury.DeviceReplay" Object.Please see the example below for your reference
Code:
with Browser("..").Page("...r")
x1=.WebElement("innerhtml:=TextBox").GetROProperty("abs_x")+10
h=.WebElement("innerhtml:=Text Box").GetROProperty("height")
y1=.WebElement("innerhtml:=Text Box").GetROProperty("abs_y")+h-10
end with
Set oDeviceReplay=CreateObject( "Mercury.DeviceReplay" )
oDeviceReplay.DragAndDrop x1,y1,x2,y2, LEFT_MOUSE_BUTTON
where
(x1,y1)=drag point
(x1,y2)=drop point