article_common.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:directory-tests 作者: uktrade 项目源码 文件源码
def get_read_counter(driver: webdriver) -> int:
    with selenium_action(driver, "Could not find Article Read Counter"):
        counter = driver.find_element_by_css_selector(ARTICLES_TO_READ_COUNTER)
        if "firefox" not in driver.capabilities["browserName"].lower():
            logging.debug("Moving focus to Article Read Counter")
            action_chains = ActionChains(driver)
            action_chains.move_to_element(counter)
            action_chains.perform()
    with assertion_msg("Article Read Counter is not visible"):
        assert counter.is_displayed()
    return int(counter.text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号