Drag and Drop Annoying QTP Behavior - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Drag and Drop Annoying QTP Behavior (/Thread-Drag-and-Drop-Annoying-QTP-Behavior) |
Drag and Drop Annoying QTP Behavior - ShaneP - 07-02-2014 Hello all! So, I'm trying to drag and drop elements on a page. The script seems to work ONLY if the elements are visible on the screen. QTP does find the element but when it drags, the page automatically scrolls to the top, and it can't scroll back down to where it needs to drop the dragged element. So my questions are: Is there a way to scroll to the specified element and LOCK the scrolling? Is there a way to stop QTP from jumping to the top of the page when it clicks on something? Here is some code that I'm using. Ignore the numbers in SS_DragConstantSum, they will become variables later once I'm done testing. Also, both of these elements are not visible until I manually scroll down on the page. QTP 11.53 P1 Chrome 30 Windows 7 Thank you Code: 'SS_DragFlags An example with CardSort on what happens if I want to put the card into Choice C: Code centers the screen perfectly, but once the drag is executed... It scrolls to the top of the page where it can't drop it in Choice C. This only happens when using drag, drop. I want to avoid using coordinates as much as possible as they can obviously not be reliable depending on the contents of the page. RE: Drag and Drop Annoying QTP Behavior - Nj_Acc - 08-21-2015 I am facing the same issue, were you able to resolve it? Please do share information related to this. Version - UFT12.02 Browser - Google Chrome Summary of Issue - there is a tree panel where all values can be uniquely identified as webelements. As there are many values there is a scrollbar, I am able to drag the values which are at the top but if I try to drag the values for which scrolling is required UFT behaves weirdly i.e. it comes down automatically to drag the required webelemt and then automatically moves to the top! And also throws an error: "Invalid procedure call or argument". Only object.Drag and object.drop work for me. I have tried things like mercury Device replay (MouseDown, MouseUp, DragandDrop) Tried insight recording, visual relation identifier, does not help. |