【发布时间】:2013-05-29 06:00:48
【问题描述】:
我正在使用 phpunit selenum 测试在 yii 中编写 Web 应用程序,这里是我的登录表单测试用例
public function testHasLoginForm()
{
$this->open('site/login');
$this->assertTextPresent('Login');
$this->assertElementPresent('name=LoginForm[username]');
$this->assertElementPresent('name=LoginForm[password]');
$this->assertTextPresent('Remember me next time');
$this->assertTextPresent('Reset Password?');
$this->assertElementPresent('name=Login');
$this->type('name=LoginForm[username]','pradeep@techanveshan.com');
$this->type('name=LoginForm[password]','password');
$this->clickAndWait("//input[@value='Login']"); //this line cause the error
}
除非我输入这个命令,否则一切正常 $this->clickAndWait("//input[@value='Login']");
这一行给了我这样的错误:
Invalid response while accessing the Selenium Server at "http://localhost:4444/s
elenium-server/driver/:" ERROR: Command execution failure. Please search the use
r group at https://groups.google.com/forum/#!forum/selenium-users for error deta
ils from the log window. The error message is: Value does not implement interfa
ce Event.
有人知道为什么会这样吗?
【问题讨论】:
-
尝试按名称点击:$this->clickAndWait('//input[name="LoginForm[username]"]');
标签: php selenium yii phpunit selenium-webdriver