【发布时间】:2017-09-07 23:09:28
【问题描述】:
我正在使用 Codeception 进行我的第一次验收测试。
当我使用 wait() 或 waitForElement() 运行测试时,我收到以下消息:
[RuntimeException] Call to undefined method AcceptanceTester::wait
这是我的acceptance.yml
# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
class_name: WebGuy
modules:
enabled:
- WebDriver
- \Helper\Acceptance
config:
WebDriver:
url: 'http://rh.dev'
browser: 'firefox'
这是我的测试:
$I = new AcceptanceTester($scenario);
$I->wantTo('Register my profile for the first time');
$I->amOnPage('/register');
$I->fillField('name', $person->name);
$I->wait(3); // secs
$I->fillField('lastName', $person->lastName);
我从 official doc得到它
我也确保执行:
vendor/bin/codecept build
有什么问题?
【问题讨论】:
-
您的配置文件声明了 WebGuy 并使用 Codeception 2.0(或更早版本)配置样式,但您的测试中使用了 AcceptanceTester。它们不相关。
-
我不明白。我是编解码新手。能详细点吗?
标签: laravel codeception acceptance-testing