Php 痛风驱动程序不支持
我正在使用PHPBrowser模块进行测试,其中我有以下几行代码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(@
$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感谢您非常好的回答。