← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #693582]: Is there way in sikuli to wait for an element until its visible ? ? ?

 

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

    Status: Answered => Open

Kogul is still having a problem:
Thanks for the reply, I like to give you a clear picture.

In my application, the text changes dynamically on the screen. the text
I need to capture is Success and failure. If the application works,
success text will appear on the screen/app, if the application crashed,
failure text will appear on the screen/app. The challenge here am facing
is I need to wait for the (Success/Failure) text to capture and write
the steps in the log. The challenge here is I'm not sure about the exact
time for the text to appear on the screen/app. Either Success or failure
text will appear on the screen so I used the below code using the If
condition.

if(screen.exists("statusCompleted.png",3600)!=null){
System.out.println("project created successful");
}

else if(screen.exists("failed.png",3600)!=null){
System.out.println("project created was unsuccessful");
}

The issue here I faced is if the application succeeds, the Sikuli is
waiting until the (success )text is visible & entered into the if
condition and I can print the  System.out.println("project created
successfully");  but if the application crashed the control remains in
the If condition and waiting for 3600 seconds and the control not moving
to else if part. I don't need to be a wait if the text is not present on
the screen.

I need a solution to break this barrier. my concern is as soon as the
image is not present in if condition, the control should change to else
condition

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