I'm making my first acceptance test with Codeception.
When I run my test with wait()
or waitForElement()
, I get this message:
[RuntimeException] Call to undefined method AcceptanceTester::wait
Here is my 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'
And here is my test:
$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);
I got it from official doc
I also made sure to execute:
vendor/bin/codecept build
What's the problem?