当前位置: 首页>>代码示例>>Python>>正文


Python HelpNavigateCheckMethods.element_is_present方法代码示例

本文整理汇总了Python中tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods.element_is_present方法的典型用法代码示例。如果您正苦于以下问题:Python HelpNavigateCheckMethods.element_is_present方法的具体用法?Python HelpNavigateCheckMethods.element_is_present怎么用?Python HelpNavigateCheckMethods.element_is_present使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods的用法示例。


在下文中一共展示了HelpNavigateCheckMethods.element_is_present方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: check_incorrect_passwd_or_phone

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
    def check_incorrect_passwd_or_phone(self, driver):
        """ Проверяем форму при вводе не корректного пароля.
        :param driver: ссылка на драйвер
        """

        self.check_error(driver)
        HelpNavigateCheckMethods.element_is_present(driver, self.set_text_xpath_error(self.TEXT_CHECK_PHONE_OR_PASS))
开发者ID:Maksim1988,项目名称:test,代码行数:9,代码来源:class_front.py

示例2: good_card_short

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def good_card_short(driver, good):
     """
     Метод получает объект короткая карточка товара по заданным данным
     :param good: данные товара
     :return:
     """
     main_picture = good["content"][u'pictures'][u'value'][0].encode('utf-8')
     title = good["content"][u'title'][u'value'].encode('utf-8')
     min_stock = good["content"][u'min_stock'][u'value']
     try:
         price = str(good["content"][u'price'][u'value'][u'significand'])
         if 3 < len(price) < 7:
             price = price[:-3] + " " + price[-3:]   # здесь в кавычках неразрывные пробелы
         elif len(price) >= 7:
             price = price[:-6] + " " + price[-6:-3] + " " + price[-3:]
     except Exception:
         price = "---"
     g_card = {
         "card": Navigate.element_is_present(driver, Navigate.click_search.GOOD_CARD_BY_ID % good["ware_id"]),
         "picture": Navigate.element_is_present(driver, Navigate.click_search.GOOD_PICTURE % (good["ware_id"],
                                                                                              main_picture)),
         "title": Navigate.element_is_present(driver, Navigate.click_search.GOOD_TITLE % (good["ware_id"], title)),
         "price": Navigate.element_is_present(driver, Navigate.click_search.GOOD_PRICE % (good["ware_id"], price)),
         "min_stock": Navigate.element_is_present(driver, Navigate.click_search.GOOD_MIN_STOCK % (good["ware_id"],
                                                                                                  min_stock)),
     }
     service_log.put("Короткая карточка товара найдена. Id: %s" % good["ware_id"])
     return g_card
开发者ID:Maksim1988,项目名称:test,代码行数:30,代码来源:class_search.py

示例3: is_user_logged

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def is_user_logged(self, driver, user):
     """
     Проверка, что пользователь залогинен. Корректность имени пользователя в хедере
     :param user:
     :return:
     """
     Navigate.element_is_present(driver, Navigate.click_main.MENU_PROFILE_NAME % user['display_name'])
开发者ID:Maksim1988,项目名称:test,代码行数:9,代码来源:class_authorization.py

示例4: check_instruction_not_receiver_passwd

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
    def check_instruction_not_receiver_passwd(self, driver):
        """ Проверка текста со списком инструкций, если пароль не пришел.
        :param driver: ссылка на драйвер
        """

        HelpNavigateCheckMethods.element_is_present(driver, self.CHECK_OBJ_INSTRUCT_NOT_PASSWD % self.CHECK_INSTRUCT_NOT_PASSWD)
        for index in self.LIST_INSTRUCT_NOT_PASSWD:
            HelpNavigateCheckMethods.element_is_present(driver, self.OBJ_NOT_RECEIVER_PASSWD % index)
开发者ID:Maksim1988,项目名称:test,代码行数:10,代码来源:class_front.py

示例5: get_data_restore

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def get_data_restore(driver):
     """ Получить данные страницы восстановления пароля.
     :param driver: ссылка на драйвер
     :return: телефон, пароль, кнопка "Войти"
     """
     phone = HelpNavigateCheckMethods.element_is_present(driver, "//input[@name='phone' and @placeholder='(800) 000-00-00']")
     sent_pass_button = HelpNavigateCheckMethods.element_is_present(driver, "//span[text()='Выслать пароль']")  # кнопка Выслать пароль
     return phone, sent_pass_button
开发者ID:Maksim1988,项目名称:test,代码行数:10,代码来源:class_front.py

示例6: check_text_message

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def check_text_message(self, driver, dialog, message):
     """
     Проверить текстовое сообщение
     :param messages:
     :return:
     """
     service_log.put("Checking Text-message")
     text = message[u'text'][u'text'].encode('utf-8')
     Navigate.element_is_present(driver, Navigate.check_chat.TEXT_MSG % (dialog, text))
开发者ID:Maksim1988,项目名称:test,代码行数:11,代码来源:class_chat.py

示例7: check_picture_message

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def check_picture_message(self, driver, dialog, message):
     """
     Проверить сообщение-картинка
     :param messages:
     :return:
     """
     service_log.put("Checking Picture-message")
     picture_id = message[u'pictureId'].encode('utf-8')
     Navigate.element_is_present(driver, Navigate.check_chat.MSG_PICTURE % (dialog, picture_id))
开发者ID:Maksim1988,项目名称:test,代码行数:11,代码来源:class_chat.py

示例8: check_not_need_phone

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def check_not_need_phone(self, driver):
     """ Проверка отсутствия окна ошибки "введите телефон".
     :param driver: ссылка на драйвер
     """
     tx = None
     try:
         HelpNavigateCheckMethods.element_is_present(driver, self.set_text_xpath_error(self.TEXT_NEED_PHONE_EMAIL))
     except Exception, tx:
         pass
开发者ID:Maksim1988,项目名称:test,代码行数:11,代码来源:class_front.py

示例9: none_found

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def none_found(driver, test_string):
     """
     Метод получает форму пользователей и товаров не найдено
     :param driver:
     :param test_string:
     """
     form = {
         'title': Navigate.element_is_present(driver, Navigate.check_search.CATALOG_ALL_EMPTY % test_string),
         'description': Navigate.element_is_present(driver, Navigate.check_search.CATALOG_EMPTY_DESC),
         'btn_catalog': Navigate.element_is_present(driver, Navigate.click_search.BTN_CATALOG)
     }
     return form
开发者ID:Maksim1988,项目名称:test,代码行数:14,代码来源:class_search.py

示例10: search_form

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def search_form(driver):
     """
     Метод получает объекты формы поиска
     :param driver:
     :return: словарь объектов формы поиска
     """
     search_form = {
         "input": Navigate.element_is_present(driver, Navigate.input_main.SEARCH),
         "btn": Navigate.element_is_present(driver, Navigate.click_main.SEARCH_BTN)
     }
     service_log.put('Получены объекты формы поиска')
     return search_form
开发者ID:Maksim1988,项目名称:test,代码行数:14,代码来源:class_search.py

示例11: found_only_users

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def found_only_users(driver, test_string):
     """
     Метод получает форму товаров не найдено но найдены пользователи
     :param driver:
     :param test_string:
     :return:
     """
     form = {
         'title': Navigate.element_is_present(driver, Navigate.check_search.CATALOG_GOOD_EMPTY % test_string),
         'description': Navigate.element_is_present(driver, Navigate.check_search.CATALOG_GOOD_EMPTY_DESC),
         'btn_to_users': Navigate.element_is_present(driver, Navigate.click_search.BTN_TO_USERS % test_string)
     }
     return form
开发者ID:Maksim1988,项目名称:test,代码行数:15,代码来源:class_search.py

示例12: check_user_message

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def check_user_message(self, driver, dialog, message, link_db):
     """
     Проверить сообщение-карточка пользователя
     :param messages:
     :return:
     """
     service_log.put("Checking User-message")
     user_id = str(message[u'userId'])
     user = link_db.accounting.get_user_by_criteria_only("id=%s" % user_id)[0]
     avatar_xpath = Navigate.check_chat.USER_AVATAR % (dialog, user_id, user["avatar_id"])
     service_log.put("Find avatar xpath=%s" % avatar_xpath)
     Navigate.element_is_present(driver, avatar_xpath)
     Navigate.element_is_present(driver, Navigate.check_chat.USER_NAME % (dialog, user_id, user["display_name"]))
开发者ID:Maksim1988,项目名称:test,代码行数:15,代码来源:class_chat.py

示例13: check_message_info

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def check_message_info(self, driver, user_id, link_db_user, msg_info, read_time):
     """
     Проверить информацию о сообещнии, пользователя отправителя, время отправки , метку о прочтении если пользователь
     отправил сообщение, если получил сообщение метку не проверять
     :param driver: вебдрайвер
     :param dialog: идентификатор диалога
     :param message: идентификатор сообщения
     :param link_db_user: ссылка на БД пользователей
     :param msg_info: информация об отправителе
     :param read_time: информация о времени прочтения сообщения
     """
     user_sender_id = msg_info[u'participantId']
     user_sender = link_db_user.accounting.get_user_by_criteria_only("id=%s" % user_sender_id)[0]
     if user_sender["avatar_id"] is None:
         user_sender["avatar_id"] = 'no_ava'
     if read_time != 0:
         read_flag = Navigate.check_chat.READ_MSG
     else:
         read_flag = Navigate.check_chat.UNREAD_MSG
     send_time = self.timestamp_to_hm(msg_info[u'sendingTimestamp'])
     Navigate.element_is_present(driver, Navigate.check_chat.SENDER_AVATAR % user_sender["avatar_id"])
     Navigate.element_is_present(driver, Navigate.check_chat.SENDER_NAME % user_sender["display_name"])
     Navigate.element_is_present(driver, Navigate.check_chat.SEND_TIME % send_time)
     if user_id == user_sender_id:
         Navigate.element_is_present(driver, read_flag)
开发者ID:Maksim1988,项目名称:test,代码行数:27,代码来源:class_chat.py

示例14: get_form_call_success

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def get_form_call_success(driver):
     """
     Get popup after send message to seller as logged user.
     :param driver:
     :return:
     """
     call_success = dict(
         success=Navigate.element_is_present(driver, Navigate.check_good.P_SUCCESS_SENT),
         title=Navigate.element_is_present(driver, Navigate.check_good.P_TITLE_SENT),
         body=Navigate.element_is_present(driver, Navigate.check_good.P_BODY_SENT),
         btn_to_catalog=Navigate.element_is_present(driver, Navigate.click_good.BTN_POPUP_TO_CATALOG),
         btn_close=Navigate.element_is_present(driver, Navigate.click_good.BTN_TO_CARD_GOOD)
     )
     return call_success
开发者ID:Maksim1988,项目名称:test,代码行数:16,代码来源:class_good_page.py

示例15: get_data_authorization

# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import element_is_present [as 别名]
 def get_data_authorization(driver):
     """ Получить данные страницы авторизации.
     :param driver: ссылка на драйвер
     :return: телефон, пароль, кнопка "Войти"
     """
     phone = HelpNavigateCheckMethods.element_is_present(driver, "//input[@name='phoneOrEmail']")
     phone.is_displayed()
     phone.is_enabled()
     password = HelpNavigateCheckMethods.element_is_present(driver, "//input[@name='password']")
     password.is_displayed()
     password.is_enabled()
     submit_button = HelpNavigateCheckMethods.element_is_present(driver, "//button[@type='submit']")  # проверка кнопки Войти
     submit_button.is_displayed()
     submit_button.is_enabled()
     return phone, password, submit_button
开发者ID:Maksim1988,项目名称:test,代码行数:17,代码来源:class_front.py


注:本文中的tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods.element_is_present方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。