[1.0.1] How to handle FindFailed exception
1. Using Sikuli 1.0.0 sikuli-script.jar
- Created a Java class that performs a Sikuli script and import org.sikuli.
- Wrapped your Sikuli script actions in a try-catch block and catch the missing exception as follows:
import org.sikuli.
import org.sikuli.
import org.sikuli.
import org.sikuli.
Import
try {
Screen myScreen= new Screen();
...
...
....
}
catch( FindFailed e ) {
Assert.fail( "Error with Sikuli script: " + e.getMessage() );
e.
throw new AssertionError( e.getMessage() );
}
2. Upgraded to sikuli 1.0.1 sikuli-script.jar
Getting compilation error - FindFailed is never thrown in body of try statement
Please advise
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 Googoo for more information if necessary.