• Ask a question
    • Topics
    • Questions
    • Users
  • Sign in
  • Home /
avatar image
Question by pumpkin · Nov 17, 2016 at 06:27 PM · uftwebmouse

Unable to record click and drag functionality

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

Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by bubblehead712 · Nov 17, 2016 at 06:30 PM

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  
 
 


Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 5 attachments (including images) can be used with a maximum of 4.2 MB each and 22.0 MB total.


Stuff we like

Orasi Software
AppDynamics

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

WebElement().Click not working on AUT. 2 Answers

FireEvent "onMouseOver" doesn't work 1 Answer

Run IE as a different user in UFT script 1 Answer

UFT not working in Firefox Browser 1 Answer

UFT 12 not recognizing objects when multiple browsers are open. 1 Answer

(c) 2015 Orasi Software, Inc.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Explore
  • Topics
  • Questions
  • Users