For loop not breaking in java
I am trying to delete rows in a queue via an iOS app. I press edit and the trash icon appear, and then I have sikuli select those icons to remove. Seems pretty straight forward and sikuli is really good at doing that . The trick in my case is that the list is dynamic and I never know how many rows will be visible in that queue so I created a For loop in java.
The loop does not seem to be breaking, Here is my code:
@Test
public void testDeleteTrash
for (int i = 0; i < 10; i++) {
s.wait(
s.click(
if (s.exists(
break;
}
}
}
So here is the scenario in this one instance:
-there is a 2 rows displaying trash icon
-the loop I have set can delete up to 10
- the method above does not recognize the IF statement in the loop and gives me "FindFailed: can not find imgs/TrashIcon.png because its still trying to finish all 10
can someone tell me where I have written this incorrectly? or another way to have sikuli loop until another image appears using java?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: