dragDrop not working reliably
dragDrop is not working consistently for me. I am using Sikuli r930 on a 64bit Windows7 PC.
I'm trying to capture the label of a checkbox in Sikuli. The function creates a list of all checkboxes on a screen (omitting specifc ones) then individually checks a single checkbox at a time and captures it's label (by selecting the label's text and copying it using type("c", KEY_CTRL)). The copying works perfectly as long as dragDrop selects the correct text. The problem is that the text selecting/
I notice as the program continues and starts misbehaving, when it selects (checks) a checkbox the mouse does not move to the point over the checkbox (as it did in the beginning when it properly highlighted the text). The mouse pointer was farther over to the right (as in 3.5 inches over, even though my debug print showed it was the right coordinates). It's as if the start point for the mouse was incorrect. hover(item.
I tried applying a possible solution related to speed/mouse issues described in questions 133497 AND 148465 to no avail.
[133497 caused the mouse to initially drag upward and subsequently downward on the next execution]
The basic code that worked part of the time:
def copy(begin, end):
dragDrop(begin, end)
type("c", KEY_CTRL)
Then.....:
def copy(begin, end):
mouseMove(
mouseDown(
mouseMove(end); wait(0.8)
mouseUp()
type("c", KEY_CTRL)
(as well as those recommendations from 133497 AND 148465).
These are called using match or location objects.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask dpel for more information if necessary.