本文整理汇总了Python中tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods.find_element_by_xpath_fast方法的典型用法代码示例。如果您正苦于以下问题:Python HelpNavigateCheckMethods.find_element_by_xpath_fast方法的具体用法?Python HelpNavigateCheckMethods.find_element_by_xpath_fast怎么用?Python HelpNavigateCheckMethods.find_element_by_xpath_fast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods
的用法示例。
在下文中一共展示了HelpNavigateCheckMethods.find_element_by_xpath_fast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: see_content
# 需要导入模块: from tests.front_office.not_sorted.classes.class_navigate import HelpNavigateCheckMethods [as 别名]
# 或者: from tests.front_office.not_sorted.classes.class_navigate.HelpNavigateCheckMethods import find_element_by_xpath_fast [as 别名]
def see_content(driver, see_time, wait=5):
"""
Метод проверяет наличие активной кнопки домой
:param driver:
:return:
"""
flag_fast_pass = True
do_time = time.time()
while time.time() - do_time < wait:
try:
Navigate.find_element_by_xpath_fast(driver, Navigate.check_main.MAIN_MENU_HOME_ACTIVE)
work_time = Navigate.work_time(do_time)
fail = 0
break
except NoSuchElementException:
flag_fast_pass = False
work_time = wait
fail = 1
if flag_fast_pass is True:
return see_time, fail
else:
return work_time, fail