Wait for object to be displayed
I use this code to wait for an object: wait(Pattern(
After 20 seconds object is present, but it doesn't wait for it and next operation is not executed, just starts new iteration in the loop.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Sikuli Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2019-01-23
- Last reply:
- 2019-01-23
RaiMan (raimund-hocke) said : | #1 |
The value is seconds, hence 30
Akos Kovacs (plaidshirtakos) said : | #2 |
Thanks, I corrected value, but still not working correctly. It doesn't wait for the end of period, new iteration is started.
RaiMan (raimund-hocke) said : | #3 |
Not clear what you are doing
Paste more code
Akos Kovacs (plaidshirtakos) said : | #4 |
I click to another object before this and there is just one other command after that:
click("
text.each_line do |line|
click()
paste()
click()
wait(Pattern(
click(
end
RaiMan (raimund-hocke) said : | #5 |
Where do you catch a possible FindFailed?
you said you changed this:
wait(Pattern(
????
Akos Kovacs (plaidshirtakos) said : | #6 |
Sorry, I changed it, but copied line from question. It doesn't wait for 35 seconds, gives FindFailed for object in click() method.
Manfred Hampl (m-hampl) said : | #7 |
My guess:
Your code is:
wait(Pattern(
click("
The wait statement looks for an image with similarity of 70% (which probably exists), but the click statement requires 100% similarity (which probably is not there).
Suggestion: try with click() without parameters or click(getLastMa
Can you help with this problem?
Provide an answer of your own, or ask Akos Kovacs for more information if necessary.