按这个手册的例子用方法submitForm,执行后报InvalidArgumentException: Could not find a form that has submit button [submit].
断点后是在\vendor\symfony\dom-crawler\Crawler.php
public function form(array $values = null, $method = null)
{
if (!count($this)) {
throw new \InvalidArgumentException('The current node list is empty.');
}
这里终止了,打印$this确实有值,不知为什么count($this)会为0
单元测试的代码为$this->visit('crm/member/form')->submitForm('submit', ['test' => 'test'])->see('hello');
最佳答案