我正在编写web应用程序在yii与phpunit selenum测试这是我的测试用例登录表单
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("//输入[@ value = '登录']");
这行给我的错误是这样的:
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.
有人知道为什么会发生这种情况吗?
clickAndWait() is not available in RC or webdriver.
你可以用
代替$this->click("//input[@value='Login']");
$this->waitforpagetoload("30000");