Javascript 如何在用户扩展中调用Selenium命令(即echo)?
在使用Selenium用户扩展时,如何调用Selenium命令? 调试Selenium用户扩展时,如何回显/console.logJavascript 如何在用户扩展中调用Selenium命令(即echo)?,javascript,selenium-ide,Javascript,Selenium Ide,在使用Selenium用户扩展时,如何调用Selenium命令? 调试Selenium用户扩展时,如何回显/console.log 可以在internet上找到答案,所以我在下面发布我自己的答案要在user-extension.js中调用Selenium命令,需要使用以下语法 this.doCommandName(param) 我打电话给echo Selenium.prototype.doMyFunction = function(){ this.doEcho("This info
可以在internet上找到答案,所以我在下面发布我自己的答案要在user-extension.js中调用Selenium命令,需要使用以下语法
this.doCommandName(param)
我打电话给echo
Selenium.prototype.doMyFunction = function(){
this.doEcho("This info will show on logs");
}
也许这样效果更好。现在,用户扩展的调试消息与“内置”命令的调试和信息消息类似
Selenium.prototype.doYourCommand = function(strTarget, strValue) {
LOG.debug("begin: doBaseURL | " + strTarget + " | " + strValue + " |");
LOG.info(strValue);
LOG.debug("end: doBaseURL | " + strTarget + " | " + strValue + " |");
}