I am totally new to CodeCeption. I have the below html inside the body,
<div><input type="text" name="content_id" id="contentId" maxlength="10" value="123"></div>
In CodeCeption acceptance test I have a this below code
`<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('fillfield test');
$I->amOnPage('/');
$I->seeInField('#contentId', 123);
$I->fillField('#contentId', 222397);
?>`
seeInField Test passes successfully, but fillField throws an error
Sorry, I couldn't fill field "#contentId", 222397
InvalidArgumentException: The current node list is empty
This stops me to proceed further. Help me out on this.
Codeception is very flexible framework that you can use to write your Selenium tests.
Codeception can be classified as a tool in the "Testing Frameworks" category, while Selenium is grouped under "Browser Testing". Selenium is an open source tool with 14.9K GitHub stars and 4.97K GitHub forks. Here's a link to Selenium's open source repository on GitHub.
Finally got answer to my own question. I used PhpBrowser module for testing, it won't allow the user to fill fields which are not inside the form. And other stuffs they mentioned in the Docs are,
Common PhpBrowser drawbacks:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With