CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException:this.waitForCondition不是函数

时间:2010-10-26 09:17:43

标签: exception selenium

user-extensions.js中定义的简单函数:

Selenium.prototype.doGetThis = function(){
    var errors = "";
    if (browserVersion.isChrome) {
        errors = true;
    } else {
        throw new SeleniumError("TODO: Non-FF browser...");
    }
    return errors;
}

Selenium.java文件:

String getThis() {
    return this.commandProcessor.doCommand("getThis", EMPTY_STRING_ARRAY);
}

运行测试会抛出SeleniumException:

CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException: this.waitForCondition is not a function

可以避免这种例外吗?

设置:

  • selenium server 2.0a5
  • firefox 3.6.11

我加了之后;我仍然有同样的例外。

Selenium.prototype.doGetThis = function(){
    var errors = "";
    if (browserVersion.isChrome) {
        errors = true;
    } else {
        throw new SeleniumError("TODO: Non-FF browser...");
    }
    return errors;
};

1 个答案:

答案 0 :(得分:0)

您似乎需要在;功能的末尾添加doGetThis

Selenium.prototype.doGetThis = function(){
    var errors = "";
    if (browserVersion.isChrome) {
        errors = true;
    } else {
        throw new SeleniumError("TODO: Non-FF browser...");
    }
    return errors;
};