sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #17292
Re: [Question #225917]: For loop not breaking in java
Question #225917 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/225917
Status: Open => Answered
RaiMan proposed the following answer:
This simply means, that s.exists("imgs/ConfirmDeletionOfTrashIcons.png"
returns null, which means, the image is not found.
Might be a timing problem (takes time for the
"imgs/ConfirmDeletionOfTrashIcons.png" to appear.
try this:
@Test
public void testDeleteTrashIcon() throws Exception {
for (int i = 0; i < 10; i++) {
s.click(s.wait("imgs/TrashIcon.png", 10), 0); //saves one search
if (s.exists("imgs/ConfirmDeletionOfTrashIcons.png", 1) != null) { //adjust wait time accordingly
break;
}
}
}
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.