Question #681126 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/681126

Sahil Doshi posted a new comment:
I have a wrapper over method.

public Match custWaitForImage(final Pattern image, final double waitInMinute)
                        throws FindFailed, InterruptedException {
                try {
                        double endTime = System.currentTimeMillis() + 
(waitInMinute * 60 * 1000);

                        screen.saveScreenCapture(loggingFolder,
"log_before");

                        screen.wait(image, waitInMinute * 60);

                        while (System.currentTimeMillis() <= endTime && 
!screen.has(image)) {
                                TimeUnit.SECONDS.sleep(1);
                        }

                        if (!screen.has(image)) { // at this line has returns 
false
                                throw new 
FindFailed(FindFailed.createErrorMessage(this, image.getImage()));
                        }

                        return screen.getLastMatch();
                } finally {
                        screen.saveScreenCapture(loggingFolder, "log_after");
                }
        }

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to