I am trying to log messages to Selenium RC's log through Javascript. For example
seleniumRc.log('Statement')开发者_高级运维;
Is it possible?
Thanks! DashK
FYI, in Selenium IDE 1.3.0, the Selenium object has a doEcho function, which is very useful. It also writes to the Selenium IDE log.
If you ever find yourself writing a User extension, the following syntax can be used:
Selenium.prototype.getSomething = function(location,text) {
this.doEcho(text);
return "Something";
}
I'd use Selenium's internal logger. The only question is where the LOG object is located, but I think it's on the "selenium" object. Try selenium.LOG.info('blah blah blah')
, or perhaps window.top.LOG.info('blah blah blah')
.
精彩评论