def test_forgot_password_alert(self, set_capabilities, setup_logging): """ Scenarios: Verify tapping 'Forgot your password?' will load 'Reset Password' alert Verify following contents are visible on 'Reset Password' alert, Alert Title, Alert Message, Email edit field, Cancel & OK buttons Verify tapping 'Cancel' will close 'Reset Password' alert Verify tapping 'Ok' will show make email field requied and show email format alert message. """ android_login_page = AndroidLogin(set_capabilities, setup_logging) android_login_page.get_forgot_password_alert() assert android_login_page.get_forgot_password_alert_title( ).text == strings.LOGIN_RESET_PASSWORD_ALERT_TITLE get_forgot_password_alert_msg = android_login_page.get_forgot_password_alert_msg( ).text assert get_forgot_password_alert_msg == strings.LOGIN_RESET_PASSWORD_ALERT_MSG_ANDROID assert android_login_page.get_forgot_password_alert_ok_button( ).text == strings.LOGIN_RESET_PASSWORD_ALERT_OK forgot_password_alert_cancel_button = android_login_page.get_forgot_password_alert_cancel_button( ).text assert forgot_password_alert_cancel_button == strings.LOGIN_RESET_PASSWORD_ALERT_CANCEL_ANDROID android_login_page.get_forgot_password_alert_ok_button().click() assert android_login_page.get_reset_password_alert_input_error().text \ == strings.LOGIN_WRONG_CREDENTIALS_ALERT_MSG assert android_login_page.get_reset_password_alert_input_error().text \ == strings.LOGIN_WRONG_CREDENTIALS_ALERT_MSG android_login_page.get_forgot_password_alert_cancel_button().click()
def test_login_forgot_password_alert(self, set_capabilities, setup_logging): """ Scenarios: Verify tapping 'Forgot your password?' will load 'Reset Password' alert Verify following contents are visible on 'Reset Password' alert, Alert Title, Alert Message, Email edit field, Cancel & OK buttons Verify tapping 'Cancel' will close 'Reset Password' alert """ android_login_page = AndroidLogin(set_capabilities, setup_logging) android_login_page.get_forgot_password_alert() assert android_login_page.get_forgot_password_alert_title( ).text == strings.LOGIN_RESET_PASSWORD_ALERT_TITLE android_login_page.get_forgot_password_alert_msg() # get_forgot_password_alert_msg = android_login_page.get_forgot_password_alert_msg().text # assert get_forgot_password_alert_msg == strings.LOGIN_RESET_PASSWORD_ALERT_MSG_ANDROID assert android_login_page.get_forgot_password_alert_ok_button( ).text == strings.LOGIN_RESET_PASSWORD_ALERT_OK forgot_password_alert_cancel_button = android_login_page.get_forgot_password_alert_cancel_button( ).text assert forgot_password_alert_cancel_button == strings.LOGIN_RESET_PASSWORD_ALERT_CANCEL_ANDROID assert android_login_page.close_forgot_password_alert()