sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34756
Re: [Question #271722]: [1.1.0] How to control the inner timing of dragDrop()
Question #271722 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/271722
Status: Open => Answered
RaiMan proposed the following answer:
If mouse actions generally work with your target app/GUI, the this is
usually a timing problem (the sequence of mouse actions done by SikuliX
are too fast).
a drag drop in terms of basic mouse actions is like this:
# dragDrop(from, to)
hover(from)
wait(beforeMouseDown)
mouseDown(Button.LEFT)
wait(beforeDrag)
hover(to)
wait(beforeDrop)
mouseUp()
the wait times beforeMouseDown, beforeDrag, beforeDrop can be adjusted, to fulfill the GUI's requirements.
Usually small values between 0.2 and 0.5 are sufficient.
I just revised the dragDrop() in version 1.1.0.
Beginning with tomorrow's build the following is available:
- the timing parameters beforeMouseDown, beforeDrag, beforeDrop in the standard are 0.3 seconds each
- using Settings.beforeMouseDown, Settings.beforeDrag, Settings.beforeDrop they can individually be set for the next following dradDrop() (after completion of the dragDrop they will be reset to the default value)
example:
Settings.beforeMouseDown = 0.4
Settings.beforeDrag = 0.5
Settings.beforeDrop = 0.1
dragDrop(from, to)
the values are used accordingly with drag() and dropAt() also.
The docs will be revised tomorrow also.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.