WebDriverException: unknown error: failed to change window state to maximized, current state is normal with...












9















We are on Macs, using Chrome Version 70.0.3538.67 (Official Build) (64-bit), ChromeDriver 2.43.600229. Chrome windows appear, but URL is stuck at "data:,". (stack trace below)



We found a work-around using Chrome version 69 w/ chromedriver 2.43, however, Chrome continues to insist on updating itself.



We are running Selenium-java 3.4, htmlunit-driver 2.27, testng 6.9.4, junit 4.7 with maven-compiler-plugin 3.6.1, maven-surefire-plugin 2.22.0.



org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal
(Session info: chrome=70.0.3538.67)
(Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 107 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'edited', ip: 'edited', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:52400}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052), userDataDir=/var/folders/cd/rrq4w8sd3gz92ygpfx5_kwtw0000gp/T/.org.chromium.Chromium.DCVcH3}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.67, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: adb51408a3b04f990288d09604daa3a9
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
at ufis.common.TestSuiteUtils.getDriver(TestSuiteUtils.java:59)
at ufis.test.cv.categories.research.independentresearch.IndependentResearchValidationTests.setUpClass(IndependentResearchValidationTests.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:517)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)









share|improve this question





























    9















    We are on Macs, using Chrome Version 70.0.3538.67 (Official Build) (64-bit), ChromeDriver 2.43.600229. Chrome windows appear, but URL is stuck at "data:,". (stack trace below)



    We found a work-around using Chrome version 69 w/ chromedriver 2.43, however, Chrome continues to insist on updating itself.



    We are running Selenium-java 3.4, htmlunit-driver 2.27, testng 6.9.4, junit 4.7 with maven-compiler-plugin 3.6.1, maven-surefire-plugin 2.22.0.



    org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal
    (Session info: chrome=70.0.3538.67)
    (Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 107 milliseconds
    Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
    System info: host: 'edited', ip: 'edited', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_131'
    Driver info: org.openqa.selenium.chrome.ChromeDriver
    Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:52400}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052), userDataDir=/var/folders/cd/rrq4w8sd3gz92ygpfx5_kwtw0000gp/T/.org.chromium.Chromium.DCVcH3}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.67, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
    Session ID: adb51408a3b04f990288d09604daa3a9
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
    at ufis.common.TestSuiteUtils.getDriver(TestSuiteUtils.java:59)
    at ufis.test.cv.categories.research.independentresearch.IndependentResearchValidationTests.setUpClass(IndependentResearchValidationTests.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:517)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
    at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)









    share|improve this question



























      9












      9








      9


      3






      We are on Macs, using Chrome Version 70.0.3538.67 (Official Build) (64-bit), ChromeDriver 2.43.600229. Chrome windows appear, but URL is stuck at "data:,". (stack trace below)



      We found a work-around using Chrome version 69 w/ chromedriver 2.43, however, Chrome continues to insist on updating itself.



      We are running Selenium-java 3.4, htmlunit-driver 2.27, testng 6.9.4, junit 4.7 with maven-compiler-plugin 3.6.1, maven-surefire-plugin 2.22.0.



      org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal
      (Session info: chrome=70.0.3538.67)
      (Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 107 milliseconds
      Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
      System info: host: 'edited', ip: 'edited', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_131'
      Driver info: org.openqa.selenium.chrome.ChromeDriver
      Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:52400}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052), userDataDir=/var/folders/cd/rrq4w8sd3gz92ygpfx5_kwtw0000gp/T/.org.chromium.Chromium.DCVcH3}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.67, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
      Session ID: adb51408a3b04f990288d09604daa3a9
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
      at ufis.common.TestSuiteUtils.getDriver(TestSuiteUtils.java:59)
      at ufis.test.cv.categories.research.independentresearch.IndependentResearchValidationTests.setUpClass(IndependentResearchValidationTests.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:517)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
      at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)









      share|improve this question
















      We are on Macs, using Chrome Version 70.0.3538.67 (Official Build) (64-bit), ChromeDriver 2.43.600229. Chrome windows appear, but URL is stuck at "data:,". (stack trace below)



      We found a work-around using Chrome version 69 w/ chromedriver 2.43, however, Chrome continues to insist on updating itself.



      We are running Selenium-java 3.4, htmlunit-driver 2.27, testng 6.9.4, junit 4.7 with maven-compiler-plugin 3.6.1, maven-surefire-plugin 2.22.0.



      org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal
      (Session info: chrome=70.0.3538.67)
      (Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 107 milliseconds
      Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
      System info: host: 'edited', ip: 'edited', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_131'
      Driver info: org.openqa.selenium.chrome.ChromeDriver
      Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:52400}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052), userDataDir=/var/folders/cd/rrq4w8sd3gz92ygpfx5_kwtw0000gp/T/.org.chromium.Chromium.DCVcH3}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, version=70.0.3538.67, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
      Session ID: adb51408a3b04f990288d09604daa3a9
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
      at ufis.common.TestSuiteUtils.getDriver(TestSuiteUtils.java:59)
      at ufis.test.cv.categories.research.independentresearch.IndependentResearchValidationTests.setUpClass(IndependentResearchValidationTests.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:517)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
      at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)






      java macos selenium google-chrome selenium-chromedriver






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 6 '18 at 11:08









      DebanjanB

      43.3k104385




      43.3k104385










      asked Oct 18 '18 at 21:48









      user2093025user2093025

      486




      486
























          4 Answers
          4






          active

          oldest

          votes


















          6














          This error message...



          org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal


          ...implies that the ChromeDriver was unable to maximize the window state of Chrome Browser client.





          Buggy Mac OSX ChromeDriver Replaced



          After Chrome version 70 was released, some of you have reported that using ChromeDriver to maximize browser window on Mac no longer works. ChromeDriver Team have investigated this issue, and created a fix for it. ChromeDriver builds with the fix are now available at the following locations:




          • If you are using Chrome version 70 (the current stable release), please download ChromeDriver version 70.0.3538.97 from https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

          • If you are using Chrome version 71 (the current beta release), please download ChromeDriver version 71.0.3578.33 from https://chromedriver.storage.googleapis.com/index.html?path=71.0.3578.33/




          Snapshot of ChromeDriver Release Email



          ChromeDriver_new





          However, your main issue is the incompatibility between the version of the binaries you are using as follows:




          • Your JDK version is 1.8.0_131 which is pretty ancient.


            • Upgrade JDK to recent levels JDK 8u181.



          • Your Selenium Client version is 3.4.0 which is almost a year older.


            • Upgrade Selenium to current levels Version 3.14.0.






          From another perspective, this issue looks like a regression issue from Feature request : ChromeDriver to support window resizing over a remote connection.



          ChromeDriver v2.43 in the Release Notes have explicitly mentioned:




          ChromeDriver to support window resizing over a remote connection




          However, as per best practices to maximize the Chrome Browser client it is suggested to use ChromeOptions class as follows:



          System.setProperty("webdriver.chrome.driver", "C:\your_directory\chromedriver.exe");
          ChromeOptions opt = new ChromeOptions();
          opt.addArguments("disable-infobars");
          opt.addArguments("--start-maximized");
          opt.addArguments("--disable-extensions");
          WebDriver driver = new ChromeDriver(opt);
          driver.get("https://google.com");




          Reference



          You can find a detailed discussion in driver.manage().window().maximize() issue with ChromeDriver 2.33





          Update(Nov 20, 2018)




          • ChromeDriver 2.44 has been released.

          • ChromeDriver 2.44 supports Chrome versions 69 to 71

          • This release is similar to ChromeDriver 2.43, but with additional bug fixes.

          • A ChromeDriver that supports chrome 72.x is expected to be released in the early December.






          share|improve this answer


























          • @user2093025 Checkout my updated answer and let me know the status.

            – DebanjanB
            Nov 6 '18 at 9:32






          • 1





            Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

            – user2093025
            Nov 8 '18 at 21:29





















          0














          Had this same thing happen using Selenium 3.14.0, Chrome 70, Chromedriver 2.43.



          The fix for me was the remove the --start-maximized flag from my chromeoptions, and after the browser is open have a call to a method that does:



              driver.manage().window().setPosition(new Point(0, 0));
          driver.manage().window().setSize(new Dimension(1920, 1080));


          We're also running our remote automation in AWS EC2 containers running CentOS.
          In Windows and Mac the above flag had no issues when running locally.






          share|improve this answer































            0














            For those facing this problem using Codeception, simply change window_size option to false.



            - Webdriver:
            url: 'http://localhost/'
            window_size: false





            share|improve this answer































              0














              Updating chromedriver to version 2.44 solved the problem for me (sort of). Don't get the error anymore, but window is maximized horizontally beyond the screen. However, the tests work.



              Option 1. Install via homebrew



              If you have previously installed it via homebrew, it has been moved to cask. So uninstall the old version:



              brew uninstall chromedriver


              Then install the new version from cask:



              brew tap homebrew/cask
              brew cask install chromedriver


              Now you should have the new version in your path and the error is gone.



              Option 2. Download the driver



              Download the driver from



              https://chromedriver.storage.googleapis.com/index.html?path=2.44/


              And place it to your path.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52883098%2fwebdriverexception-unknown-error-failed-to-change-window-state-to-maximized-c%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                6














                This error message...



                org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal


                ...implies that the ChromeDriver was unable to maximize the window state of Chrome Browser client.





                Buggy Mac OSX ChromeDriver Replaced



                After Chrome version 70 was released, some of you have reported that using ChromeDriver to maximize browser window on Mac no longer works. ChromeDriver Team have investigated this issue, and created a fix for it. ChromeDriver builds with the fix are now available at the following locations:




                • If you are using Chrome version 70 (the current stable release), please download ChromeDriver version 70.0.3538.97 from https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

                • If you are using Chrome version 71 (the current beta release), please download ChromeDriver version 71.0.3578.33 from https://chromedriver.storage.googleapis.com/index.html?path=71.0.3578.33/




                Snapshot of ChromeDriver Release Email



                ChromeDriver_new





                However, your main issue is the incompatibility between the version of the binaries you are using as follows:




                • Your JDK version is 1.8.0_131 which is pretty ancient.


                  • Upgrade JDK to recent levels JDK 8u181.



                • Your Selenium Client version is 3.4.0 which is almost a year older.


                  • Upgrade Selenium to current levels Version 3.14.0.






                From another perspective, this issue looks like a regression issue from Feature request : ChromeDriver to support window resizing over a remote connection.



                ChromeDriver v2.43 in the Release Notes have explicitly mentioned:




                ChromeDriver to support window resizing over a remote connection




                However, as per best practices to maximize the Chrome Browser client it is suggested to use ChromeOptions class as follows:



                System.setProperty("webdriver.chrome.driver", "C:\your_directory\chromedriver.exe");
                ChromeOptions opt = new ChromeOptions();
                opt.addArguments("disable-infobars");
                opt.addArguments("--start-maximized");
                opt.addArguments("--disable-extensions");
                WebDriver driver = new ChromeDriver(opt);
                driver.get("https://google.com");




                Reference



                You can find a detailed discussion in driver.manage().window().maximize() issue with ChromeDriver 2.33





                Update(Nov 20, 2018)




                • ChromeDriver 2.44 has been released.

                • ChromeDriver 2.44 supports Chrome versions 69 to 71

                • This release is similar to ChromeDriver 2.43, but with additional bug fixes.

                • A ChromeDriver that supports chrome 72.x is expected to be released in the early December.






                share|improve this answer


























                • @user2093025 Checkout my updated answer and let me know the status.

                  – DebanjanB
                  Nov 6 '18 at 9:32






                • 1





                  Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                  – user2093025
                  Nov 8 '18 at 21:29


















                6














                This error message...



                org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal


                ...implies that the ChromeDriver was unable to maximize the window state of Chrome Browser client.





                Buggy Mac OSX ChromeDriver Replaced



                After Chrome version 70 was released, some of you have reported that using ChromeDriver to maximize browser window on Mac no longer works. ChromeDriver Team have investigated this issue, and created a fix for it. ChromeDriver builds with the fix are now available at the following locations:




                • If you are using Chrome version 70 (the current stable release), please download ChromeDriver version 70.0.3538.97 from https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

                • If you are using Chrome version 71 (the current beta release), please download ChromeDriver version 71.0.3578.33 from https://chromedriver.storage.googleapis.com/index.html?path=71.0.3578.33/




                Snapshot of ChromeDriver Release Email



                ChromeDriver_new





                However, your main issue is the incompatibility between the version of the binaries you are using as follows:




                • Your JDK version is 1.8.0_131 which is pretty ancient.


                  • Upgrade JDK to recent levels JDK 8u181.



                • Your Selenium Client version is 3.4.0 which is almost a year older.


                  • Upgrade Selenium to current levels Version 3.14.0.






                From another perspective, this issue looks like a regression issue from Feature request : ChromeDriver to support window resizing over a remote connection.



                ChromeDriver v2.43 in the Release Notes have explicitly mentioned:




                ChromeDriver to support window resizing over a remote connection




                However, as per best practices to maximize the Chrome Browser client it is suggested to use ChromeOptions class as follows:



                System.setProperty("webdriver.chrome.driver", "C:\your_directory\chromedriver.exe");
                ChromeOptions opt = new ChromeOptions();
                opt.addArguments("disable-infobars");
                opt.addArguments("--start-maximized");
                opt.addArguments("--disable-extensions");
                WebDriver driver = new ChromeDriver(opt);
                driver.get("https://google.com");




                Reference



                You can find a detailed discussion in driver.manage().window().maximize() issue with ChromeDriver 2.33





                Update(Nov 20, 2018)




                • ChromeDriver 2.44 has been released.

                • ChromeDriver 2.44 supports Chrome versions 69 to 71

                • This release is similar to ChromeDriver 2.43, but with additional bug fixes.

                • A ChromeDriver that supports chrome 72.x is expected to be released in the early December.






                share|improve this answer


























                • @user2093025 Checkout my updated answer and let me know the status.

                  – DebanjanB
                  Nov 6 '18 at 9:32






                • 1





                  Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                  – user2093025
                  Nov 8 '18 at 21:29
















                6












                6








                6







                This error message...



                org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal


                ...implies that the ChromeDriver was unable to maximize the window state of Chrome Browser client.





                Buggy Mac OSX ChromeDriver Replaced



                After Chrome version 70 was released, some of you have reported that using ChromeDriver to maximize browser window on Mac no longer works. ChromeDriver Team have investigated this issue, and created a fix for it. ChromeDriver builds with the fix are now available at the following locations:




                • If you are using Chrome version 70 (the current stable release), please download ChromeDriver version 70.0.3538.97 from https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

                • If you are using Chrome version 71 (the current beta release), please download ChromeDriver version 71.0.3578.33 from https://chromedriver.storage.googleapis.com/index.html?path=71.0.3578.33/




                Snapshot of ChromeDriver Release Email



                ChromeDriver_new





                However, your main issue is the incompatibility between the version of the binaries you are using as follows:




                • Your JDK version is 1.8.0_131 which is pretty ancient.


                  • Upgrade JDK to recent levels JDK 8u181.



                • Your Selenium Client version is 3.4.0 which is almost a year older.


                  • Upgrade Selenium to current levels Version 3.14.0.






                From another perspective, this issue looks like a regression issue from Feature request : ChromeDriver to support window resizing over a remote connection.



                ChromeDriver v2.43 in the Release Notes have explicitly mentioned:




                ChromeDriver to support window resizing over a remote connection




                However, as per best practices to maximize the Chrome Browser client it is suggested to use ChromeOptions class as follows:



                System.setProperty("webdriver.chrome.driver", "C:\your_directory\chromedriver.exe");
                ChromeOptions opt = new ChromeOptions();
                opt.addArguments("disable-infobars");
                opt.addArguments("--start-maximized");
                opt.addArguments("--disable-extensions");
                WebDriver driver = new ChromeDriver(opt);
                driver.get("https://google.com");




                Reference



                You can find a detailed discussion in driver.manage().window().maximize() issue with ChromeDriver 2.33





                Update(Nov 20, 2018)




                • ChromeDriver 2.44 has been released.

                • ChromeDriver 2.44 supports Chrome versions 69 to 71

                • This release is similar to ChromeDriver 2.43, but with additional bug fixes.

                • A ChromeDriver that supports chrome 72.x is expected to be released in the early December.






                share|improve this answer















                This error message...



                org.openqa.selenium.WebDriverException: unknown error: failed to change window state to maximized, current state is normal


                ...implies that the ChromeDriver was unable to maximize the window state of Chrome Browser client.





                Buggy Mac OSX ChromeDriver Replaced



                After Chrome version 70 was released, some of you have reported that using ChromeDriver to maximize browser window on Mac no longer works. ChromeDriver Team have investigated this issue, and created a fix for it. ChromeDriver builds with the fix are now available at the following locations:




                • If you are using Chrome version 70 (the current stable release), please download ChromeDriver version 70.0.3538.97 from https://chromedriver.storage.googleapis.com/index.html?path=70.0.3538.97/

                • If you are using Chrome version 71 (the current beta release), please download ChromeDriver version 71.0.3578.33 from https://chromedriver.storage.googleapis.com/index.html?path=71.0.3578.33/




                Snapshot of ChromeDriver Release Email



                ChromeDriver_new





                However, your main issue is the incompatibility between the version of the binaries you are using as follows:




                • Your JDK version is 1.8.0_131 which is pretty ancient.


                  • Upgrade JDK to recent levels JDK 8u181.



                • Your Selenium Client version is 3.4.0 which is almost a year older.


                  • Upgrade Selenium to current levels Version 3.14.0.






                From another perspective, this issue looks like a regression issue from Feature request : ChromeDriver to support window resizing over a remote connection.



                ChromeDriver v2.43 in the Release Notes have explicitly mentioned:




                ChromeDriver to support window resizing over a remote connection




                However, as per best practices to maximize the Chrome Browser client it is suggested to use ChromeOptions class as follows:



                System.setProperty("webdriver.chrome.driver", "C:\your_directory\chromedriver.exe");
                ChromeOptions opt = new ChromeOptions();
                opt.addArguments("disable-infobars");
                opt.addArguments("--start-maximized");
                opt.addArguments("--disable-extensions");
                WebDriver driver = new ChromeDriver(opt);
                driver.get("https://google.com");




                Reference



                You can find a detailed discussion in driver.manage().window().maximize() issue with ChromeDriver 2.33





                Update(Nov 20, 2018)




                • ChromeDriver 2.44 has been released.

                • ChromeDriver 2.44 supports Chrome versions 69 to 71

                • This release is similar to ChromeDriver 2.43, but with additional bug fixes.

                • A ChromeDriver that supports chrome 72.x is expected to be released in the early December.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 21 '18 at 11:23

























                answered Oct 19 '18 at 6:59









                DebanjanBDebanjanB

                43.3k104385




                43.3k104385













                • @user2093025 Checkout my updated answer and let me know the status.

                  – DebanjanB
                  Nov 6 '18 at 9:32






                • 1





                  Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                  – user2093025
                  Nov 8 '18 at 21:29





















                • @user2093025 Checkout my updated answer and let me know the status.

                  – DebanjanB
                  Nov 6 '18 at 9:32






                • 1





                  Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                  – user2093025
                  Nov 8 '18 at 21:29



















                @user2093025 Checkout my updated answer and let me know the status.

                – DebanjanB
                Nov 6 '18 at 9:32





                @user2093025 Checkout my updated answer and let me know the status.

                – DebanjanB
                Nov 6 '18 at 9:32




                1




                1





                Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                – user2093025
                Nov 8 '18 at 21:29







                Downloading the linked Chromedriver fixed my issue -- I can now run my tests on mac again. Thanks a ton for your help!

                – user2093025
                Nov 8 '18 at 21:29















                0














                Had this same thing happen using Selenium 3.14.0, Chrome 70, Chromedriver 2.43.



                The fix for me was the remove the --start-maximized flag from my chromeoptions, and after the browser is open have a call to a method that does:



                    driver.manage().window().setPosition(new Point(0, 0));
                driver.manage().window().setSize(new Dimension(1920, 1080));


                We're also running our remote automation in AWS EC2 containers running CentOS.
                In Windows and Mac the above flag had no issues when running locally.






                share|improve this answer




























                  0














                  Had this same thing happen using Selenium 3.14.0, Chrome 70, Chromedriver 2.43.



                  The fix for me was the remove the --start-maximized flag from my chromeoptions, and after the browser is open have a call to a method that does:



                      driver.manage().window().setPosition(new Point(0, 0));
                  driver.manage().window().setSize(new Dimension(1920, 1080));


                  We're also running our remote automation in AWS EC2 containers running CentOS.
                  In Windows and Mac the above flag had no issues when running locally.






                  share|improve this answer


























                    0












                    0








                    0







                    Had this same thing happen using Selenium 3.14.0, Chrome 70, Chromedriver 2.43.



                    The fix for me was the remove the --start-maximized flag from my chromeoptions, and after the browser is open have a call to a method that does:



                        driver.manage().window().setPosition(new Point(0, 0));
                    driver.manage().window().setSize(new Dimension(1920, 1080));


                    We're also running our remote automation in AWS EC2 containers running CentOS.
                    In Windows and Mac the above flag had no issues when running locally.






                    share|improve this answer













                    Had this same thing happen using Selenium 3.14.0, Chrome 70, Chromedriver 2.43.



                    The fix for me was the remove the --start-maximized flag from my chromeoptions, and after the browser is open have a call to a method that does:



                        driver.manage().window().setPosition(new Point(0, 0));
                    driver.manage().window().setSize(new Dimension(1920, 1080));


                    We're also running our remote automation in AWS EC2 containers running CentOS.
                    In Windows and Mac the above flag had no issues when running locally.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 1 '18 at 19:45









                    Jim BJim B

                    1




                    1























                        0














                        For those facing this problem using Codeception, simply change window_size option to false.



                        - Webdriver:
                        url: 'http://localhost/'
                        window_size: false





                        share|improve this answer




























                          0














                          For those facing this problem using Codeception, simply change window_size option to false.



                          - Webdriver:
                          url: 'http://localhost/'
                          window_size: false





                          share|improve this answer


























                            0












                            0








                            0







                            For those facing this problem using Codeception, simply change window_size option to false.



                            - Webdriver:
                            url: 'http://localhost/'
                            window_size: false





                            share|improve this answer













                            For those facing this problem using Codeception, simply change window_size option to false.



                            - Webdriver:
                            url: 'http://localhost/'
                            window_size: false






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 5 '18 at 18:28









                            CosetteNCosetteN

                            107116




                            107116























                                0














                                Updating chromedriver to version 2.44 solved the problem for me (sort of). Don't get the error anymore, but window is maximized horizontally beyond the screen. However, the tests work.



                                Option 1. Install via homebrew



                                If you have previously installed it via homebrew, it has been moved to cask. So uninstall the old version:



                                brew uninstall chromedriver


                                Then install the new version from cask:



                                brew tap homebrew/cask
                                brew cask install chromedriver


                                Now you should have the new version in your path and the error is gone.



                                Option 2. Download the driver



                                Download the driver from



                                https://chromedriver.storage.googleapis.com/index.html?path=2.44/


                                And place it to your path.






                                share|improve this answer




























                                  0














                                  Updating chromedriver to version 2.44 solved the problem for me (sort of). Don't get the error anymore, but window is maximized horizontally beyond the screen. However, the tests work.



                                  Option 1. Install via homebrew



                                  If you have previously installed it via homebrew, it has been moved to cask. So uninstall the old version:



                                  brew uninstall chromedriver


                                  Then install the new version from cask:



                                  brew tap homebrew/cask
                                  brew cask install chromedriver


                                  Now you should have the new version in your path and the error is gone.



                                  Option 2. Download the driver



                                  Download the driver from



                                  https://chromedriver.storage.googleapis.com/index.html?path=2.44/


                                  And place it to your path.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    Updating chromedriver to version 2.44 solved the problem for me (sort of). Don't get the error anymore, but window is maximized horizontally beyond the screen. However, the tests work.



                                    Option 1. Install via homebrew



                                    If you have previously installed it via homebrew, it has been moved to cask. So uninstall the old version:



                                    brew uninstall chromedriver


                                    Then install the new version from cask:



                                    brew tap homebrew/cask
                                    brew cask install chromedriver


                                    Now you should have the new version in your path and the error is gone.



                                    Option 2. Download the driver



                                    Download the driver from



                                    https://chromedriver.storage.googleapis.com/index.html?path=2.44/


                                    And place it to your path.






                                    share|improve this answer













                                    Updating chromedriver to version 2.44 solved the problem for me (sort of). Don't get the error anymore, but window is maximized horizontally beyond the screen. However, the tests work.



                                    Option 1. Install via homebrew



                                    If you have previously installed it via homebrew, it has been moved to cask. So uninstall the old version:



                                    brew uninstall chromedriver


                                    Then install the new version from cask:



                                    brew tap homebrew/cask
                                    brew cask install chromedriver


                                    Now you should have the new version in your path and the error is gone.



                                    Option 2. Download the driver



                                    Download the driver from



                                    https://chromedriver.storage.googleapis.com/index.html?path=2.44/


                                    And place it to your path.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 21 '18 at 0:48









                                    MikkoMikko

                                    9271723




                                    9271723






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52883098%2fwebdriverexception-unknown-error-failed-to-change-window-state-to-maximized-c%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        How to change which sound is reproduced for terminal bell?

                                        Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                        Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents