2

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

        $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 中,播放测试运行良好。还有其他方法可以按值计算输入吗?

4

0 回答 0