New question #665044 on Sikuli:
https://answers.launchpad.net/sikuli/+question/665044

The use case I have is:
The GUI that I am writing a test case for, can at any point throw up an error 
that looks something like "Backend failure, error code xxxxxxx, click here to 
continue". As the backend takes a while to process input, a few seconds after 
any point of the test it can go to the error page, at which point I want to 
click to continue.

The current solution I have been trying is basically checking for the error 
message after each action I do, like so:

click(...)
if exists(errorMessageScreen, 5):
    click(errorContinueButton)
else:
    wait(actualExpectedGuiChange)
    click(lastMatch())

There are two problems here: if the error screen takes longer than 5 seconds to 
go up, then the script will fail as it will never find the expected GUI change 
due to the error screen being up, and that it takes an additional 5 seconds in 
between every command, which significantly slows down the test.

Is there sikuli specific functionality that I can do to handle this test case, 
something like making a handler for a particular image appearing that it checks 
every few seconds? Is there anything to do in this case other than launching 
parallel python processes that will just do the clicking on error screens as it 
comes up? 

-- 
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     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to