本文整理汇总了Python中tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods.go_to_main_page方法的典型用法代码示例。如果您正苦于以下问题:Python HelpNavigateCheckMethods.go_to_main_page方法的具体用法?Python HelpNavigateCheckMethods.go_to_main_page怎么用?Python HelpNavigateCheckMethods.go_to_main_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods
的用法示例。
在下文中一共展示了HelpNavigateCheckMethods.go_to_main_page方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_authorization_by_phone_incorrect_user_disabled
# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import go_to_main_page [as 别名]
def test_authorization_by_phone_incorrect_user_disabled(self, type_password="CORRECT"):
"""
Title: Я не могу войти в систему по телефону, если мой пользователь в статусе DISABLED
(пользователь Заблокирован)
Description:
* Отображается соответствующее сообщение
"""
service_log.run(self)
status = "DISABLED"
user = databases.db1.accounting.get_not_enabled_user(status=status)[0]
AccountingMethods.save_user_password(user_id=user["id"], hash_passwd=user["code_value"])
# Устанавливаем новый пароль для пользователя
default_new_passwd = AccountingMethods.get_default_password()
hash_res_new = generate_sha256(default_new_passwd, user["salt"])
databases.db1.accounting.update_user_password(user["id"], hash_res_new)
# Переходим на страницу авторизации
self.go_authorization_page(self.driver)
obj_phone, obj_password, obj_submit_button = self.get_data_authorization(self.driver)
changed_passwd = self.get_password(type_passwd=type_password, source_passwd=default_new_passwd)
changed_phone = self.get_phone(type_phone=self.type_phone, source_phone=user["phone"])
# Вводим данные на авторизацию
self.send_password(password_object=obj_password, password_number=changed_passwd)
self.send_phone(phone_object=obj_phone, phone_number=changed_phone)
# Нажатие на кнопку авторизации
self.submit_button(obj_submit_button)
# Проверка блокировки пользователя
Navigate.get_element_navigate(self.driver, self.check_auth.ERR_CHECK_DISABLED)
Navigate.go_to_main_page(self.driver)
self.check_header_widget_visitor(self.driver)