>test code is: ```php $I->fillField('username', 'admin'); codecept_debug($I->grabValueFrom('[name=username]')); $I->click('Login'); ``` > run with ``--debug`` option, will get output like: ```bash I grab value from "[name=username]" I click "Login" ``` > no value ouputed here. notice that the empty line is my expected output location of value. > I found the issue in last line of method `CodeCeption\Lib\InnerBrowser::fillField`: ```php $input->getNode(0)->nodeValue = htmlspecialchars($value); ``` > the point is input field must be have no nodeValue, and `grabValueFrom` use the right way to get value. I think the right code should be like: ```php $input->getNode(0)->setAttribute('value', htmlspecialchars($value)); ``` > I tried to change to this, it works > I think a test for `CodeCeption\Lib\InnerBrowser` will be good.
Activity
Naktibalda commentedon Dec 22, 2016
Could you make a pull request?
wumouse commentedon Dec 26, 2016
My pleasure
wumouse commentedon Dec 26, 2016
#3873 PR created
fix Codeception#3866 grabValueFrom doesn't work
[-]grabValueFrom doesn't work[/-][+]grabValueFrom doesn't work with fillField[/+]