article_common.py 文件源码

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

项目:directory-tests 作者: uktrade 项目源码 文件源码
def go_to_article(driver: webdriver, title: str):
    with selenium_action(driver, "Could not find article: %s", title):
        article = driver.find_element_by_link_text(title)
        if "firefox" not in driver.capabilities["browserName"].lower():
            logging.debug("Moving focus to '%s' article link", title)
            action_chains = ActionChains(driver)
            action_chains.move_to_element(article)
            action_chains.perform()
    with assertion_msg(
            "Found a link to '%s' article but it's not visible", title):
        assert article.is_displayed()
    article.click()
    take_screenshot(driver, "After going to the '{}' Article".format(title))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号