Skip to content

getCurrentWindow side effect

August 25, 2012

Today I discovered that Browserbot.getCurrentWindow set newPageLoaded to false.
Unfortunatley Selenium.doWaitForCondition calls such a function so if you do

function myConditionCheck (selenium) {
    var c= checkCondition();
    var np= selenium.browserbot.isNewPageLoaded();

    return np && c;
}

Selenium.prototype.doMyAction = function (p1, p2) {
    this.doType("abc","text");
    this.doClick("button");
    return this.doWaitForCondition("myConditionCheck(selenium)",
                                   this.defaultTimeot);
}

then that won’t work.
Why?
Cause each time myConditionCheck is called getCurrentWindow is called as well and newPageLoaded is each time set to false.
Other straregy to be found: soon on this pages.

From → Technology

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: