php - seeInField finds the element, while fillField doesn't - CodeCeption -
i totally new codeception. have below html within body,
<div><input type="text" name="content_id" id="contentid" maxlength="10" value="123"></div> in codeception acceptance test have 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, fillfield throws error
sorry, couldn't fill field "#contentid", 222397 invalidargumentexception: current node list empty
this stops me proceed further. help me out on this.
finally got reply own question. used phpbrowser module testing, won't allow user fill fields not within form. , other stuffs mentioned in docs are,
common phpbrowser drawbacks:
you can click on links valid urls or form submit buttons you can't fill fields not within form you can't work javascript interactions: modal windows, datepickers, etc., php unit-testing acceptance-testing codeception
No comments:
Post a Comment