I've been using the following example to maximize my windows in my WebDriver tests, I upgraded to Firefox 7, and the script quit working. I don't get an error, the window just does not maximize, wondering if anyone else has seen this or know why it's no longer working, or another way to do it..
my current code that worked before FireFox 7...
public static final String MAXIMIZE_BROWSER_WINDOW = "if (window.screen) {window.moveTo(0, 0);window.resizeTo(window.screen.availWidth,window.screen.availHeight);};";
public static Object maximizeBrowserWindow(WebDriver driver) {
return executeJavascript(driver, MAXIMIZE_BROWSER_WINDOW);
}
private static Object executeJavascript(WebDriver driver, String script){
JavascriptExecutor js=(JavascriptExecutor) driver;
return js.executeScript(script);
}