我需要登录我的本地网站进行测试。这是 Behat 的测试功能:
Feature: test
In order to log in
As a test user
I need to get positive results
@javascript
Scenario: Logging in using Behat
Given I am on "/app_dev.php/"
When I press "singin"
Then I should see "Sign in now"
我正在使用 Selenium Driver v2.33 进行测试。我总是从驱动程序中得到一个错误,下面是控制台日志:
Unexpected response from Selenium server : ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Value does not implement interface Event.
这是硒的日志:
..18:27:58.626 INFO - Command request: click[xpath=(//html/.//a[./@href][(((./@id = 'singin' or contains(normalize-space(string(.)), 'singin')) or contains(./@title, 'singin')) or .//img[contains(./@alt, 'singin')])] | .//*[./@role = 'link'][((./@id = 'singin' or contains(./@value, 'singin')) or contains(./@title, 'singin') or contains(normalize-space(string(.)), 'singin'))])[1], ] on session cc4ec3ebb5084d5ba518168f54be332e..
这是我不明白的。它询问标题“singin”或相同的 id 等,并告诉我没有这样的按钮。但它是,这是我的那个按钮的 HTML 代码块:
<a id="singin" role="button" data-toggle="modal" href="#signin_modal"> … </a>