예제 #1
0
class ProfileTest(unittest.TestCase):
    def setUp(self):
        self.driver = chrome_browser()
        self.account = Account(self.driver)
        self.profile = Profile(self.driver)
        self.common = Common(self.driver)
        self.common.open_browser()

    @data(*logindata)
    def test_MyAccount(self, data):
        """测试profile-my account界面的检查"""
        try:
            self.account.login_with_facebook(data['face_email'],
                                             data['face_pw'])
            self.profile.enter_profile()
            self.profile.enter_myaccount()
            self.profile.update_myaccount()
            self.profile.change_my_password()
            self.profile.manage_guest_profiles()
            logger.info("Result Success Rate Is 100%")
        except Exception as result:
            self.driver.get_screenshot_as_file(
                "./screenshot/check_hotels_page_err.png")
            logger.info(
                "%s unknown error during checking profile-account page" %
                result)
            raise

    def tearDown(self):
        self.driver.quit()

    if __name__ == '__main__':
        unittest.main()
예제 #2
0
 def setUp(self):
     self.driver = chrome_browser()
     self.account = Account(self.driver)
     self.profile = Profile(self.driver)
     self.common = Common(self.driver)
     self.common.open_browser()
예제 #3
0
class ProfileTest(unittest.TestCase):
    def setUp(self):
        self.driver = chrome_browser()
        self.account = Account(self.driver)
        self.profile = Profile(self.driver)
        self.common = Common(self.driver)
        self.common.open_browser()

    @data(*logindata)
    def test_Dashboard(self, data):
        """测试profile-dashboard界面的检查"""
        try:
            self.account.login_with_facebook(data['face_email'],
                                             data['face_pw'])
            self.profile.enter_profile()
            self.profile.check_profile_dashboard_my_points()
            self.profile.check_profile_dashboard_earn_points()
            self.profile.check_reward_section()
            self.profile.check_upcoming()
            self.profile.check_mm_bottom()
            logger.info("Result Success Rate Is 100%")
        except Exception as result:
            self.driver.get_screenshot_as_file(
                "./screenshot/check_hotels_page_err.png")
            logger.info("%s unknown error during checking profile-dashboard" %
                        result)
            raise

    def tearDown(self):
        self.driver.quit()

    if __name__ == '__main__':
        unittest.main()