0

我正在使用 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>

i.fa.fa-user当我运行浏览器时,我提供的 xpath正在工作。
你能建议一个解决方案吗?

4

0 回答 0