rem: selenium = Selenium.createForFrame(window.getBrowser()); 
add: selenium = Selenium.createForFrame(window.getBrowser().selectedBrowser); 
context: function executeCommand(baseURL, command) {	if (!stopAndDo("executeCommand", baseURL, command)) return;	// TODO refactor with start()	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 0; }	var first = true;	testLoop.nextCommand = function() {		if (first) {			first = false;			testCase.debugContext.debugIndex = testCase.commands.indexOf(command);			return new SeleniumCommand(command.command, command.target, command.value);		} else {			return null;		}	}	testLoop.firstCommand = testLoop.nextCommand; // Selenium <= 0.6 only	testLoop.commandStarted = function() {		editor.view.rowUpdated(testCase.commands.indexOf(command));	}	testLoop.commandComplete = function(result) {		if (result.failed) {			command.result = 'failed';		} else if (result.passed) {			command.result = 'passed';		} else {			command.result = 'done';		}		editor.view.rowUpdated(testCase.commands.indexOf(command));	}	testLoop.commandError = function() {		command.result = 'failed';		editor.view.rowUpdated(testCase.commands.indexOf(command));	}	testLoop.testComplete = function() {		testLoop = null;		testCase.debugContext.reset();		editor.view.rowUpdated(testCase.commands.indexOf(command));	}	testLoop.pause = function() {		editor.setState("paused");	}	testLoop.start();}
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/ed34b0cd5b414d752a08dcb1fef34298d56118ed/selenium-runner.js/buggy/src/content/selenium-runner.js