fixtures.py 文件源码

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

项目:maas 作者: maas 项目源码 文件源码
def setUp(self):
        super(ChromiumWebDriverFixture, self).setUp()
        # Import late to avoid hard dependency.
        from selenium.webdriver.chrome.service import Service as ChromeService
        service = ChromeService(
            "/usr/lib/chromium-browser/chromedriver", 4444)

        # Set the LD_LIBRARY_PATH so the chrome driver can find the required
        # libraries.
        self.useFixture(EnvironmentVariable(
            "LD_LIBRARY_PATH", "/usr/lib/chromium-browser/libs"))
        service.start()

        # Stop service on cleanup.
        self.addCleanup(service.stop)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号