检测是否在Bitbucket管道中运行硒测试

问题描述 投票:0回答:1

我想知道是否可以做这样的事情:

if( "#in bitbucket pipeline" ):

        options = Options()
        options.headless = True
        cls.selenium = WebDriver(options=options)

else:
        cls.selenium = WebDriver()

仅因为我需要在bitbucket上以无头方式运行测试,而不是本地语言。。

Python 3.6

django 3

我想知道是否有可能做这样的事情:if(“ #in bitbucket pipe”]:options = Options()options.headless = True cls.selenium = WebDriver(options = ...

python selenium webdriver bitbucket-pipelines xvfb
1个回答
0
投票

我能够通过一种检查测试是否在Docker容器中运行的方法来克服它

© www.soinside.com 2019 - 2024. All rights reserved.