Php 功能测试单击并等待不工作
我正在用yii编写带有phpunit selenum测试的web应用程序,这里是我的登录表单测试用例Php 功能测试单击并等待不工作,php,selenium,yii,phpunit,selenium-webdriver,Php,Selenium,Yii,Phpunit,Selenium Webdriver,我正在用yii编写带有phpunit selenum测试的web应用程序,这里是我的登录表单测试用例 public function testHasLoginForm() { $this->open('site/login'); $this->assertTextPresent('Login'); $this->assertElementPresent('name=LoginForm[username]');
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.
有人知道为什么会这样吗
clickAndWait() is not available in RC or webdriver.
相反,您可以使用
$this->click("//input[@value='Login']");
$this->waitforpagetoload("30000");
相反,您可以使用
$this->click("//input[@value='Login']");
$this->waitforpagetoload("30000");
尝试按名称单击:$this->clickAndWait('//input[name=“LoginForm[username]”);尝试按名称单击:$this->clickAndWait('//input[name=“LoginForm[username]”);