CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException:this.waitForCondition不是函数
user-extensions.js中定义的一个简单函数:CHECKPOINT-FAIL com.thoughtworks.selenium.SeleniumException:this.waitForCondition不是函数,exception,selenium,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.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服务器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;
};
似乎您需要添加一个
代码>至数据的末尾此
功能:
Selenium.prototype.doGetThis = function(){
var errors = "";
if (browserVersion.isChrome) {
errors = true;
} else {
throw new SeleniumError("TODO: Non-FF browser...");
}
return errors;
};
通过使用访问器而不是操作解决了此问题: