conftest.py 文件源码

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

项目:micromasters 作者: mitodl 项目源码 文件源码
def driver():
    """
    Selenium driver fixture
    """
    # Start a selenium server running chrome
    capabilities = DesiredCapabilities.CHROME.copy()
    capabilities['chromeOptions'] = {
        'binary': os.getenv('CHROME_BIN', '/usr/bin/google-chrome-stable'),
        'args': ['--no-sandbox'],
    }
    driver = Remote(
        os.getenv('SELENIUM_URL', 'http://chrome:5555/wd/hub'),
        capabilities,
    )
    driver.implicitly_wait(10)
    yield driver
    driver.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号