rem:   this.buttonWindow = this.topWindow; 
add: this.buttonWindow = window; 
context: var BrowserBot = function(topLevelApplicationWindow) {    this.topWindow = topLevelApplicationWindow;    this.topFrame = this.topWindow;    this.baseUrl=window.location.href;    // the buttonWindow is the Selenium window    // it contains the Run/Pause buttons... this should *not* be the AUT window    // todo: Here the buttonWindow is not Selenium window. It will be set to Selenium window in pollForLoad.    // Change this!!!    this.buttonWindow = this.topWindow;    this.currentWindow = this.topWindow;    this.currentWindowName = null;        // We need to know this in advance, in case the frame closes unexpectedly    this.isSubFrameSelected = false;        this.altKeyDown = false;    this.controlKeyDown = false;    this.shiftKeyDown = false;    this.metaKeyDown = false;    this.modalDialogTest = null;    this.recordedAlerts = new Array();    this.recordedConfirmations = new Array();    this.recordedPrompts = new Array();    this.openedWindows = {};    this.nextConfirmResult = true;    this.nextPromptResult = '';    this.newPageLoaded = false;    this.pageLoadError = null;        this.shouldHighlightLocatedElement = false;    this.uniqueId = new Date().getTime();    this.pollingForLoad = new Object();    this.permDeniedCount = new Object();    this.windowPollers = new Array();    // DGF for backwards compatibility    this.browserbot = this;    var self = this;        objectExtend(this, PageBot.prototype);    this._registerAllLocatorFunctions();        this.recordPageLoad = function(elementOrWindow) {        LOG.debug("Page load detected");        try {            if (elementOrWindow.location && elementOrWindow.location.href) {                LOG.debug("Page load location=" + elementOrWindow.location.href);            } else if (elementOrWindow.contentWindow && elementOrWindow.contentWindow.location && elementOrWindow.contentWindow.location.href) {                LOG.debug("Page load location=" + elementOrWindow.contentWindow.location.href);            } else {                LOG.debug("Page load location unknown, current window location=" + this.getCurrentWindow(true).location);            }        } catch (e) {            LOG.error("Caught an exception attempting to log location; this should get noticed soon!");            LOG.exception(e);            self.pageLoadError = e;            return;        }        self.newPageLoaded = true;    };    this.isNewPageLoaded = function() {        if (this.pageLoadError) {            LOG.error("isNewPageLoaded found an old pageLoadError");            var e = this.pageLoadError;            this.pageLoadError = null;            throw e;        }        return self.newPageLoaded;    };};
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/79bf4dfd3a2f0ac908ce913232f83d83b08c1533/selenium-browserbot.js/clean/code/javascript/core/scripts/selenium-browserbot.js