Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 功能测试单击并等待不工作_Php_Selenium_Yii_Phpunit_Selenium Webdriver - Fatal编程技术网

Php 功能测试单击并等待不工作

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]');

我正在用yii编写带有phpunit selenum测试的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.
有人知道为什么会这样吗

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]”);