示例#1
0
    def nexar_onboarding(self):

        os.system(st.reset_perm_script)  #RESET ALL NEXAR PERMISSIONS BY SCRIPT

        self.nexar_driver.start_session(
            tb.nexar_appium_desired_capadibilties())

        self.pass_nexar_permissions()

        self.enter_login_details()

        self.otp_extractor_from_notifications("into Nexar")

        self.nexar_driver.press_keycode(4)

        self.nexar_driver.background_app(0.1)

        try:
            self.enter_login_details()
        except Exception as err:
            self.wait.until(ec.element_to_be_clickable((By.ID, bt.RESEND_OTP)))

        self.nexar_driver.find_element_by_id(st.PIN_CODE_UI).send_keys(
            self.value)

        self.nexar_driver.find_element_by_id(bt.LOGIN_BUTTON).click()

        self.wait.until(ec.element_to_be_clickable((By.XPATH, bt.AGREE_TOS)))

        self.nexar_driver.find_element_by_xpath(bt.AGREE_TOS).click()