Php seeInField查找元素,而fillField不';t-编码接受
我对CodeCeption一无所知。我的身体里有下面的htmlPhp seeInField查找元素,而fillField不';t-编码接受,php,unit-testing,acceptance-testing,codeception,Php,Unit Testing,Acceptance Testing,Codeception,我对CodeCeption一无所知。我的身体里有下面的html <div><input type="text" name="content_id" id="contentId" maxlength="10" value="123"></div> 在CodeCeption验收测试中,我有一个下面的代码 `<?php $I = new AcceptanceTester($scenario); $I->wantTo('fillfield test
<div><input type="text" name="content_id" id="contentId" maxlength="10" value="123"></div>
在CodeCeption验收测试中,我有一个下面的代码
`<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('fillfield test');
$I->amOnPage('/');
$I->seeInField('#contentId', 123);
$I->fillField('#contentId', 222397);
?>`
``
参见内场测试成功通过,但菲尔菲尔德抛出错误
抱歉,我无法填写字段“#contentId”,222397InvalidArgumentException:当前节点列表为空
这使我无法继续前进。帮我解决这个问题。终于找到了我自己问题的答案。我使用PhpBrowser模块进行测试,它不允许用户填写表单之外的字段。他们在文件中提到的其他东西是 常见的PhpBrowser缺点:
您使用Codeception进行JS交互的解决方案是什么?谢谢。我试图在没有表单的情况下填充输入字段。