def test_03(self): login_action = LoginAction(self.base_page.driver) main_page = login_action.default_login() quit_action = QuitAction(main_page.driver) login_page = quit_action.quit() actual_result = login_page.get_title() self.assertEqual(actual_result.__contains__('用户登录'), True, 'test_quit 用例不通过')
def test_logout(self): login_action = LoginAction(self.base_page.driver) login_action.default_login() quit_action = QuitAction(self.base_page.driver) login_page = quit_action.quit_action() actual_result = login_page.get_title() test_function_data = self.test_class_info['test_logout'] self.assertEqual(actual_result.__contains__(test_function_data['excepted_result']), True, test_function_data['fail_information'])
def test_quit(self): test_case_data = self.test_data['test_quit'] login_action = LoginAction(self.base_page.driver) main_page = login_action.default_login() # 默认的登陆方式 quit_action = QuitAction(main_page.driver) login_page = quit_action.quit() actual_result = login_page.get_title() self.assertTrue( actual_result.__contains__(test_case_data['expect_result']), 'test_quit用例失败')
def test_quit(self): login_action = LoginAction(self.base_page.driver) main_page = login_action.default_login() main_page.wait(3) test_function_data = self.test_class_data['test_quit'] self._testMethodDoc = test_function_data['test_name'] quit_action = QuitAction(main_page.driver) login_page = quit_action.quit() actual_result = login_page.get_title() self.assertEqual(actual_result, test_function_data['excepted_result'], 'test_quitÓÃÀý²»Í¨¹ý')
def test_quit(self): test_function_data = self.test_class_data['test_quit'] self._testMethodDoc = test_function_data['test_name'] login_action = LoginAction(self.base_page.driver) main_page = login_action.default_login() quit_action = QuitAction(main_page.driver) login_page = quit_action.quit() actual_result = login_page.get_title() self.assertEqual( actual_result.__contains__(test_function_data['excepted_result']), True, 'test_quit 用例不通过')
def add_file_menu(self): file_menu = self.menu.addMenu("&File") file_menu.addAction(OpenAction(self.window)) file_menu.addAction(QuitAction(self.window)) return file_menu