rem: selenium = Selenium.createForFrame(window.getBrowser()); 
add: selenium = Selenium.createForFrame(window.getBrowser().selectedBrowser); 
context: function start(baseURL) {	if (!stopAndDo("start", baseURL)) return;		var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);	var window = wm.getMostRecentWindow('navigator:browser');		selenium = Selenium.createForFrame(window.getBrowser());	selenium.browserbot.getCurrentPage();	selenium.baseURL = baseURL;	commandFactory = new CommandHandlerFactory();	commandFactory.registerAll(selenium);	testLoop = new TestLoop(commandFactory);			testLoop.getCommandInterval = function() { return stopping ? -1 : getInterval(); }	testLoop.nextCommand = function() {		if (testCase.debugContext.debugIndex >= 0)			editor.view.rowUpdated(testCase.debugContext.debugIndex);		var command = testCase.debugContext.nextCommand();		if (command == null) return null;		return new SeleniumCommand(command.command, command.target, command.value);	}	testLoop.firstCommand = testLoop.nextCommand; // Selenium <= 0.6 only	testLoop.commandStarted = function() {		editor.setState("playing");		editor.view.rowUpdated(testCase.debugContext.debugIndex);		editor.view.scrollToRow(testCase.debugContext.debugIndex);	}	testLoop.commandComplete = function(result) {		if (result.failed) {			testCase.debugContext.currentCommand().result = 'failed';		} else if (result.passed) {			testCase.debugContext.currentCommand().result = 'passed';		} else {			testCase.debugContext.currentCommand().result = 'done';		}		editor.view.rowUpdated(testCase.debugContext.debugIndex);	}	testLoop.commandError = function() {		LOG.debug("commandError");		testCase.debugContext.currentCommand().result = 'failed';		editor.view.rowUpdated(testCase.debugContext.debugIndex);	}	testLoop.testComplete = function() {		LOG.debug("testComplete");		editor.setState(null);		testLoop = null;		testCase.debugContext.reset();		editor.view.rowUpdated(testCase.debugContext.debugIndex);	}	testLoop.pause = function() {		editor.setState("paused");	}	testCase.debugContext.reset();	testLoop.start();}
meta: 3428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3428/ed34b0cd5b414d752a08dcb1fef34298d56118ed/selenium-runner.js/clean/src/content/selenium-runner.js