from selenium.webdriver.common.by import By from appium.webdriver.common.mobileby import MobileBy class LoginLocators: LOGO_IMG = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeOther[`label == \"Welcome to Real Time Insights\"`]/XCUIElementTypeOther") EMAIL_FIELD = (MobileBy.ACCESSIBILITY_ID, "Email") PASSWORD_FIELD = (MobileBy.ACCESSIBILITY_ID, "Password") LOGIN_BTN = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeButton[`name == \"Log In\"`]") LOGIN_LB = (MobileBy.ACCESSIBILITY_ID, "Login to your account.") LOIN_IN_RTI_BTN = {"en": (MobileBy.ACCESSIBILITY_ID, "Log In"), "en-GB": (MobileBy.ACCESSIBILITY_ID, "Log in"), "es": (MobileBy.ACCESSIBILITY_ID, "Iniciar sesión"), "de": (MobileBy.ACCESSIBILITY_ID, "Anmelden"), "fr": (MobileBy.ACCESSIBILITY_ID, "Connexion"), "it": (MobileBy.ACCESSIBILITY_ID, "Accedi"), "pt": (MobileBy.ACCESSIBILITY_ID, "Iniciar Sessão")} SEND_EMAIL_BTN = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeButton[`label == \"Send email\"`]") WRONG_CREDS_MSG = (By.NAME, "WRONG EMAIL OR PASSWORD.") BLANK_EMAIL_MSG = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeStaticText[`label == \"Email can't be blank\"`]") BLANK_PW_MSG = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeStaticText[`label == \"Password can't be blank\"`]") INVALID_EMAIL_MSG = (By.NAME, "Email is invalid") FORGOT_PW_MSG = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeStaticText[`label == \"Please enter your email " "address and we will send you a link to reset your password.\"`]") FORGOT_PW_LINK = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeStaticText[`label == \"Forgot your password?\"`]") RESET_PW_LB = (MobileBy.IOS_CLASS_CHAIN, "**/XCUIElementTypeStaticText[`label == \"Reset your password\"`]")