← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #690084]: Sikulixapi-2.0.4 not working after creating a jar of my Java SWt desktop application

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- Its not even evaluating this "if
(screen.exists(createFullPathOfPatternImages(OKAY_DIALOG_AFTER_EXECUTION))
!= null)" condition

How do you know, that it is not executing the if....  ?

I guess your problem when running the jar is, that the images cannot be
located correctly in the file system, in which case the exists() simply
does nothing and returns false.

change your code so:

String image = createFullPathOfPatternImages(OKAY_DIALOG_AFTER_EXECUTION)
System.out.println("OKAY_DIALOG_AFTER_EXECUTION is: " + image)
if (screen.exists(image) != null)" condition

This will show you the generated filename.
So you can check, wether it is valid.

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