我在 Yii2 上使用 codeception,我的配置如下:
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'http://ucms.ac.ir/admin/index-test.php/'
browser: chrome
- tests\codeception\common\_support\FixtureHelper
- Yii2
config:
Yii2:
configFile: '../config/backend/acceptance.php'
测试运行,并且它们成功完成,但是 selenium 打开的新浏览器选项卡上没有任何显示。我看过一些教程,在这些教程中,浏览器实际上显示了测试过程。另外,当发生错误并且codeception截取屏幕截图以供以后引用时,它也只是一个白色的空白页面。
我使用的是 ubuntu 14.10、selenium 2.47.1 和 chrome 45。当我使用 Firefox 而不是 chrome 时也会发生这种情况。
最佳答案
我在 codeception's github repo 中问了同样的问题这是答案:
Don't use Yii2 and WebDriver in the same suite.
我的错,这是更正的配置:
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'http://ucms.ac.ir/admin/index-test.php/'
browser: chrome
- tests\codeception\common\_support\FixtureHelper
关于selenium - 使用 selenium 和 codeception 进行验收测试,浏览器显示空白页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33064862/