title: WebDriver window resize | Chrome Driver 2.28 | Chrome 57
body: <p>I have used set position to change the browser window size in my webdriver automation.
  When I run the code with Chrome driver 2.28, it throws below exception</p>
  
  <pre class="lang-none prettyprint-override"><code>**Exception starting line:**
  
  driver.manage().window().setPosition(new Point(pos_x, pos_y));
  
  
  **Trace:**
  
  **Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension**
  
  
  from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
    **(Session info: chrome=57.0.2987.110)
    (Driver info: chromedriver=2.28.455520** (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 10.21 seconds
  Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
  
  
  System info: host: 'TESTVM', ip: 'xx.xx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
  
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.28.455520 (cc17746adff54984afff480136733114c6b3704b), userDataDir=C:\Users\xxxxx\AppData\Local\Temp\scoped_dir21364_25403}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, **version=57.0.2987.110**, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
  Session ID: 2af85eb51f31434f8df972a737b82bd4
  </code></pre>
  
  <p>The actual use case is to open multiple Chrome windows and make all the windows to be in focus. Now, I'm not able to resize the window.</p>
  
  <p>Final ChromeOptions options = new ChromeOptions();
          final String adminToolURL =
              "<a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a>";
          options.addArguments("--disable-extensions");</p>
  
  <pre><code>    final WebDriver driver = new ChromeDriver(options);
      driver.manage().window().setSize(new Dimension(500, 600));
  
      driver.get(adminToolURL);
      driver.getWindowHandles();
      final String adminToolHandle = driver.getWindowHandle();
      int x = 0, y = 30;
      String window = "win";
      for (int i = 1; i &lt;= 3; i++) {
          window = window + String.valueOf(i);
          System.out.println(x);
          System.out.println(y);
          ((JavascriptExecutor) driver)
          .executeScript("window.open('https://www.google.com','"
              + window + "',height=" + x + ",width=" + y + ");");
          final String handle = driver.getWindowHandle();
  
          driver.switchTo().window(handle.toString());
          // driver.manage().window().setPosition(new Point(pos_x, pos_y));
          pos_x = pos_x + 180;
          if ((i % 7) == 0) {
              pos_y = pos_y + 160;
              pos_x = 0;
          }
          x += 30;
          y += 40;
          Thread.sleep(2000);
          final Set&lt;String&gt; customerWindow = driver.getWindowHandles();
          customerWindow.removeAll(customerWindow);
          driver.switchTo().window(adminToolHandle);
      }
      Thread.sleep(600000);
      driver.quit();
  }
  </code></pre>