-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Guys, I've added your tool to my test, I need my test waits and checks Visibility of 2 buttons then finishes the test.
In my test:
ConditionWatcher.waitForCondition(new BtnSendVerificationInstruction());
onView(withId(R.id.btnSendVerification)).perform(click());`
The Instruction:
public class BtnSendVerificationInstruction extends Instruction {
@Override
public String getDescription() {
return "BtnSendVerification should be moved to center of activity";
}
@Override
public boolean checkCondition() {
Activity activity = ((TestApplication)
InstrumentationRegistry.getTargetContext().getApplicationContext()).getCurrentActivity();
if (activity == null) return false;
Button btnSendVerification = (Button) activity.findViewById(R.id.btnSendVerification);
boolean isDisplayed = btnSendVerification.isShown();
return btnSendVerification != null && isDisplayed;
}
}
Any idea?
Thanks
Metadata
Metadata
Assignees
Labels
No labels