sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #23664
Re: [Question #242702]: dragDrop not working correctly
Question #242702 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242702
RaiMan posted a new comment:
--- error] TypeError ( offset(): expected 2 args; got 1 )
ref = find(image.png).getCenter()
now ref is a Location object and it's offset() function is defined as
getting x and y directly:
dragDrop(ref.offset(150, 390), ref.offset(335, 125))
--- your workaround
dragdrop is a convenience feature, that internally is implemented nearly exactly as your workaround.
So it would help me a lot to understand what is happening in your case: could you send me a screenshot silently to my mail at https://launchpad.net/~raimund-hocke?
BTW:
Settings.MoveMouseDelay = 5
I doubt that this has any effect on the dragging. The only possibility (I have to check in the implementation code) is that it inserts a longer first wait after mouseDown at the beginning.
So you might try instead:
hover(ref.offset(Location(150, 390)))
mouseDown(Button.LEFT)
wait(0.5) # Settings.MoveMouseDelay = 5
mouseMove(ref.offset(Location(335, 125)))
mouseUp()
Many GUIs have a short timeout so that a mouseDown is only accepted as a
drag start after this time has elapsed.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.