mardi 11 août 2020

if condition for java sikuli is not working

I am writing scripts using java-sikuli, and trying to use if condition as below

if(screen.exists(gameIsInProgress)!= null ||
screen.exists(waitingFormorePlayer)!=null)
            {
                screen.click(settingsOnGameWindow);
                screen.click(exitRoom);
                screen.click(yes);
            }

What I am trying to do is if the image exists then click some buttons but, the issue is even if image is not exists it is searching for that button which is causing test to fail.

Aucun commentaire:

Enregistrer un commentaire