def login_with_created_datasenders_account(self): self.driver.go_to(DATA_WINNER_ALL_DATA_SENDERS_PAGE) all_data_senders_page = AllDataSendersPage(self.driver) email = all_data_senders_page.get_data_sender_email_by_mobile_number(VALID_DATA_WITH_EMAIL[MOBILE_NUMBER_WITHOUT_HYPHENS]) global_navigation = GlobalNavigationPage(self.driver) global_navigation.sign_out() self.driver.go_to(DATA_WINNER_LOGIN_PAGE) data_sender_crendentials = {USERNAME: email, PASSWORD: "******"} login_page = LoginPage(self.driver) login_page.login_with(data_sender_crendentials) message = global_navigation.welcome_message() return email, message
def setUpClass(cls): cls.driver = setup_driver() LoginPage( cls.driver).load().do_successful_login_with(VALID_CREDENTIALS) cls.all_datasenders_page = AllDataSendersPage( TestAllDataSenders.driver) cls.datasender_id_with_web_access = cls.register_datasender( VALID_DATASENDER_WITH_WEB_ACCESS, id=TestAllDataSenders._create_id_for_data_sender()) cls.datasender_id_without_web_access = cls.register_datasender( VALID_DATASENDER_WITHOUT_WEB_ACCESS, id=TestAllDataSenders._create_id_for_data_sender()) cls.user_mobile_number = TestAllDataSenders.add_new_user(NEW_USER_DATA) cls.driver.go_to(DATA_WINNER_ALL_DATA_SENDERS_PAGE) cls.all_datasenders_page.wait_for_table_to_load() cls.all_datasenders_page.search_with(cls.user_mobile_number) cls.user_ID = cls.all_datasenders_page.get_cell_value(1, 3)
def test_successful_addition_editing_of_data_sender(self): add_data_sender_page = self.current_page add_data_sender_page.enter_data_sender_details_from(VALID_DATA) self.assertRegexpMatches(add_data_sender_page.get_success_message(), fetch_(SUCCESS_MSG, from_(VALID_DATA))) self.driver.go_to(DATA_WINNER_ALL_DATA_SENDERS_PAGE) all_data_senders_page = AllDataSendersPage(self.driver) all_data_senders_page.select_a_data_sender_by_mobile(VALID_DATA[MOBILE_NUMBER_WITHOUT_HYPHENS]) all_data_senders_page.select_edit_action() self.current_page.enter_data_sender_details_from(VALID_EDIT_DATA) self.assertRegexpMatches(self.current_page.get_success_message(), fetch_(SUCCESS_MSG, from_(VALID_EDIT_DATA)))
def setUpClass(cls): cls.driver = setup_driver() cls.driver.go_to(DATA_WINNER_LOGIN_PAGE) login_page = LoginPage(cls.driver) login_page.do_successful_login_with(VALID_CREDENTIALS) cls.page = AllDataSendersPage(cls.driver)