Forum Discussion

jsc's avatar
jsc
Regular Contributor
12 years ago

Scrolling with grabbed object?

Hi all,



how can I implement this behaviour in Keyword Tests, recording it does not work.



Setup:

I got a list containing many entries so that I have to scroll to the bottom. In this list I can grab entries with the mouse and move them up and down with drag&drop.



What I want to do:

I can grab the last entry in a list and drag it to the top of the list. When I reach the top of the list I do not release the mousebutton and the list scrolls to the top.



Problem:

recording this in TestComplete just moves this entry to the top of the screen and releases the object there. The test does not scroll at all. The action recorded is:

.drag(110, 1157, 24, -544)



Question:

How can I make the test scroll with the grabbed object?



Thanks a lot

Joachim
  • I think you should simulate mouse events yourself using TestComplete LLPlayer object. Something like this:

    LLPlayer.MouseDown(MK_LBUTTON, 110, 1157, 100);

    LLPlayer.MouseMove(MK_LBUTTON, 110-24, 1157-544, 100);

    LLPlayer.MouseUp(MK_LBUTTON, 110-24, 1157-544, 2000);