开发者

Selenium - Log messages to selenium RC log through Javascript - Possible?

开发者 https://www.devze.com 2023-03-29 00:33 出处:网络
I am trying to log messages to Selenium RC\'s log through Javascript. Forexample seleniumRc.log(\'Statement\')开发者_高级运维;

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').

0

精彩评论

暂无评论...
验证码 换一张
取 消