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)
评论列表
文章目录