Ejemplo n.º 1
0
    def test_start_register_smoke(self, set_capabilities, setup_logging):
        """
        Scenario:
            Verify Register screen is loaded successfully
        """

        setup_logging.info('-- Starting {} Test Case'.format(TestAndroidRegister.__name__))

        android_new_landing_page = AndroidNewLanding(set_capabilities, setup_logging)
        android_register_page = AndroidRegister(set_capabilities, setup_logging)

        android_new_landing_page.load_register_screen()
        assert android_register_page.on_screen() == Globals.REGISTER_ACTIVITY_NAME
Ejemplo n.º 2
0
    def back_and_forth_register(self):
        """
        Load register screen and get back to previous screen

        Returns:
             bool: Returns True if app is back on Register screen
        """

        android_new_landing_page = AndroidNewLanding(self.driver, self.log)

        if self.driver.current_activity == Globals.REGISTER_ACTIVITY_NAME:
            self.driver.back()

            if (self.driver.current_activity
                    == Globals.DISCOVERY_LAUNCH_ACTIVITY_NAME
                    and android_new_landing_page.load_register_screen()
                    == Globals.REGISTER_ACTIVITY_NAME):
                self.log.info('Register screen is successfully loaded')
            else:
                self.log.error('New Landing screen is not loaded')
                self.global_contents.flag = False
        else:
            self.log.error('Register screen is not loaded')
            self.global_contents.flag = False

        return self.global_contents.flag