selenium - 使用 selenium 和 codeception 进行验收测试,浏览器显示空白页面

标签 selenium yii2 codeception acceptance-testing

我在 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/

相关文章:

php - 如何在 Yii2 中将接口(interface)注入(inject) Controller 的构造函数

php - 设置 Codeception 时无法连接到数据库

java - 如何选择表中包含多行不同类且每列具有相同类名的记录的链接

php - Yii2 基本背景变化

javascript - 如何在 Yii2 Asset Bundle 中使用 JSX 文件

php - seeInField 找到元素,而 fillField 没有 - CodeCeption

php - 使用 CLI 来使用 phar 文件不起作用

python Selenium : Firefox profile error

java - 如何在 JAVA 代码中获取随机元素?

Selenium Webdriver - 在 If 语句中使用 isDisplayed() 不起作用