Perform action on image when it appears dynamically without using sleep
We have an application where the expected image will appear faster sometimes and delays sometimes(may take too long time or less)
I am using eclipse with java
Initially tried with thread.sleep(time) if the image appears faster execution is taking more time.
Pattern pattern = new Pattern("Image location");
screen.
Thread.
//wait for next image to appear
Tried with below approaches but still not working
Approach1:
Screen screen = new Screen();
Pattern pattern1 = new Pattern("Image location ");
if(exists(
Approach2:
screen.
As soon as the image appears action is not performed but it is waiting again
Approach3:
while(screen.
When the application will open it takes time for image to appear and hence this will fail.
Approach4:
screen.wait("Image location");
Again, this will say image not found since its tries to find image before it appears
Approach5:
screen.
This is working similar to thread.sleep(89000)
I am new to sikuli Please help in finding a solution as soon as the image appears it should perform operation and should not wait till the time specified. Something like “explicit Wait” that we use in selenium. To avoid unnecessary delay while execution.
Referred below links:
https:/
https:/
https:/
and referred few more .
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 ShrilekhaGowda for more information if necessary.