Very new to Automated testing.
Need the SWITCH option to be selected.
Struggling to write the code for it (Android).
Build failed due to this pop-up. "Switch" option needs to be selected.
CODE:
main.page.notification.icon.after.login.android.optional = xpath: (//android.view.ViewGroup[3])[1]
go.click.switch.option = xpath: //*[@text='SWITCH']
ELSE Statement:
private String switchBtn = getElDef(strStartsWith + ".click.switch.option");
@Given("^I navigate to Notification Center after login$")
public void iNavigateToNotificationCenterAfterLogin() throws Exception {
if (elementExists(notificationIconAfterLogin)) {
loopClickUntilFound(notificationIconAfterLogin, notificationHeader);
} else {
loopClickUntilFound(notificationIconAfterLoginAndroidOptional, switchBtn);
}
waitFor(3);
screenshot(); // Cap screen in notification center
}
My "switchBtn" just doesn't work. Need help to fix the code.
where am I going wrong???


Aucun commentaire:
Enregistrer un commentaire