Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 痛风驱动程序不支持_Php_Html_Codeception - Fatal编程技术网

Php 痛风驱动程序不支持

Php 痛风驱动程序不支持,php,html,codeception,Php,Html,Codeception,我正在使用PHPBrowser模块进行测试,其中我有以下几行代码 $I->click('i.fa.fa-user'); 但我有个错误 "Sorry, I couldn't click "i.fa.fa-user": Behat\Mink\Exception\ElementException: Exception thrown by (//html/descendant-or-self::i[@class and contains(concat(' ', normalize-space(@

我正在使用PHPBrowser模块进行测试,其中我有以下几行代码

$I->click('i.fa.fa-user');
但我有个错误

"Sorry, I couldn't click "i.fa.fa-user":
Behat\Mink\Exception\ElementException: Exception thrown by (//html/descendant-or-self::i[@class and contains(concat(' ', normalize-space(@class), ' '), ' fa ') and (@class and contains(concat(' ', normalize-space(@class), ' '), ' fa-user '))])[1]
Goutte driver supports clicking on inputs and links only. But "i" provided"
这是代码行

<i class="fa fa-user" title="Login"></i>
运行浏览器时,我提供的xpath i.fa.fa-user正在工作。
您能提出解决方案吗?

根据非常明确的错误消息,您的工具无法模拟对i元素的单击。基本上,您可以在锚定或按钮中更改/包装标签,或者找到另一个允许单击其他元素的测试工具。@kuroi neko感谢您非常好的回答。