I am using the latest version of Codeception on the WAMP platform. My adoption is very simple, but works fine (see below):
$I = new WebGuy($scenario); $I->wantTo('Log in to the website'); $I->amOnPage('/auth/login'); $I->fillField('identity','admin@admin.com'); $I->fillField('password','password'); $I->click('Login');
In a nutshell - he checks that the "auth / login" page fills in 2 form fields and presses the login button. This works without a problem.
Here is my identical functional test:
$I = new TestGuy($scenario); $I->wantTo('perform actions and see result'); $I->amOnPage('/auth/login'); $I->fillField('identity','admin@admin.com'); $I->fillField('password','password'); $I->click('Login');
When I run this from the command line, I get the following error (not a complete error, but enough to understand the problem):
1) Couldn't <-[35;1mperform actions and see result<- [0m in <-[37;1LoginCept.php<-[0m <-41;37mRuntimeException: Call to undefined method TestGuy::amOnPage<-[0m.......
The phpBrowser and WebHelper modules are included in my receiving package, the functional package includes FileSystem and TestHelper (in the files accept.suite.yml and functional.suite.yml).
Obviously, the amOnPage () function is a problem - however, am I convinced that amOnPage () should work on acceptance and functional testing? Or am I mistaken - also - can someone explain what numbers mean, for example '<- [35; 1m 'that appear
UPDATE: I tried adding the "WebHelper" module to the functional.suite.yml function, but I donβt see that amOnPage () was automatically generated in the TestGuy.php file - any ideas?
My configuration files are below:
Webguy
class_name: WebGuy modules: enabled: - PhpBrowser - WebHelper config: PhpBrowser: url: 'http://v3.localhost/'
Testguy
class_name: TestGuy modules: enabled: [Filesystem, TestHelper, WebHelper]