Unable to record click and drag functionality
Question ID: 107270
0
0

Unable to record click and drag functionality when dragging columns in a table.

Marked as spam
Posted by (Questions: 63, Answers: 1)
Asked on November 17, 2016 6:27 pm
56 views
Answers (1)
0
Private answer

UFT does not record click and drag functions but it can be coded into the script using something like this.

x=Browser(''b'').Page(''p'').WebElement(''we'').GetROProperty(''abs_x'')
y=Browser(''b'').Page(''p'').WebElement(''we'').GetROProperty(''abs_y'')

Set dr = CreateObject(''Mercury.DeviceReplay'')

dr.DragAndDrop x,y,(x-100),(y+10),LEFT_MOUSE_BUTTON

Set dr=Nothing

Also, I have found that using wait has helped. For example;

Set dr = CreateObject(''Mercury.DeviceReplay'')
dr.MouseDown x,y,0
wait 1
dr.MouseMove x-225,y+10
wait 1
'dr.DragAndDrop x,y,(x-225),(y+10),0
dr.MouseUp x-225,y+10,0
Set dr=Nothing

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on November 17, 2016 6:30 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top