【发布时间】:2020-06-15 13:12:51
【问题描述】:
我想知道是否可以这样做:
if( "#in bitbucket pipeline" ):
options = Options()
options.headless = True
cls.selenium = WebDriver(options=options)
else:
cls.selenium = WebDriver()
仅仅是因为我需要在 bitbucket 上以 headless 模式运行我的测试,而不是 localy..
Python 3.6
django 3
【问题讨论】:
-
查看建议的解决方案here
标签: python selenium webdriver bitbucket-pipelines xvfb