Selenium RC PHPUnit测试

时间:2013-03-18 16:13:15

标签: selenium phpunit selenium-rc

我的测试用程序因以下错误而崩溃:

        $this->open("/en");
        $this->type("id=LoginForm_username", "seleniumfree");
        $this->type("id=LoginForm_password", "seleniumfree");
        $this->click("name=login");
        $this->waitForPageToLoad("30000");
        $this->click("link=Calendar");
        $this->waitForPageToLoad("30000");
        $this->click("link=Add to agenda");
        $this->type("id=UserAgenda_date", "2013-10-10");
        $this->select("id=UserAgenda_time", "label=01:00");
        $note = $this->getEval("Math.floor(Math.random()*1000)").':note';
        $this->type("id=UserAgenda_note", $note);
        $this->click("name=yt0");
        sleep(5);
        try { //also tried with integer
            $this->assertEquals("2", $this->getXpathCount("//input[@value='"+ $note + "']"));
        } catch (PHPUnit_Framework_AssertionFailedError $e) {
            array_push($this->verificationErrors, $e->toString());
        }


 Invalid response while accessing the Selenium Server at 'http://localhost:4444/selenium-server/driver/':
 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: The expression cannot be converted to return the specified type.

在firefox IDE中,播放测试运行正常。还有另一种方法可以按值计算输入吗?

0 个答案:

没有答案