Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

javascript toolbar shows function code in 1 line

70 views
Skip to first unread message

ejv

unread,
Aug 29, 2011, 7:51:24 AM8/29/11
to
I don't kow why the script toolbar shows functions well formatted and
others unformatted (inlined). This means I can't debug the unformatted
functions.

For example, in the following extract of the same JS file, the
Selenium constructor appears well formatted, but the
decorateFunctionWithTimeout function is inlined.

Anyone knows the reason?


function Selenium(browserbot) {
this.browserbot = browserbot;
this.optionLocatorFactory = new OptionLocatorFactory;
this.page = function () {return browserbot;};
this.defaultTimeout = Selenium.DEFAULT_TIMEOUT;
this.mouseSpeed = Selenium.DEFAULT_MOUSE_SPEED;
if (bot && bot.locators && bot.locators.add) {
bot.locators.add("xpath", {single: function (target, opt_root) {return
browserbot.locateElementByXPath(target, opt_root);}, many: function
(target, opt_root) {return browserbot.locateElementsByXPath(target,
opt_root);}});
bot.locators.add("css", {single: function (target, opt_root) {return
browserbot.locateElementByCss(target, opt_root);}, many: function
(target, opt_root) {return eval_css(target, opt_root);}});
}
}
Selenium.DEFAULT_TIMEOUT = 30000;
Selenium.DEFAULT_MOUSE_SPEED = 10;
Selenium.RIGHT_MOUSE_CLICK = 2;
Selenium.decorateFunctionWithTimeout = function (f, timeout, callback)
{if (f == null) {return null;}var timeoutTime =
getTimeoutTime(timeout);return function () {if ((new Date).getTime() >
timeoutTime) {if (callback != null) {callback();}throw new
SeleniumError("Timed out aftmr " + timeout + "ms");}return f();};};


Max Imovic

unread,
Sep 5, 2011, 4:21:37 PM9/5/11
to

Max Imovic

unread,
Sep 5, 2011, 4:31:21 PM9/5/11
to
On Aug 29, 1:51 pm, ejv <enricj...@yahoo.es> wrote:
0 new messages