selenium-cucumber-js icon indicating copy to clipboard operation
selenium-cucumber-js copied to clipboard

Running tests on chrome fails at WebDriver.manage().window().maximize()

Open AlexWellsHS opened this issue 6 years ago • 0 comments

     WebDriverError: unknown error: failed to change window state to maximized, current state is normal
       (Session info: chrome=70.0.3538.77)
       (Driver info: chromedriver=2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052),platform=Mac OS X 10.14.2 x86_64)
         at Object.checkLegacyResponse (/Users/alexwells/hs-website/e2e/node_modules/selenium-webdriver/lib/error.js:529:15)
         at parseHttpResponse (/Users/alexwells/hs-website/e2e/node_modules/selenium-webdriver/lib/http.js:509:13)
         at doSend.then.response (/Users/alexwells/hs-website/e2e/node_modules/selenium-webdriver/lib/http.js:441:30)
         at <anonymous>
         at process._tickCallback (internal/process/next_tick.js:189:7)
     From: Task: WebDriver.manage().window().maximize()
         at thenableWebDriverProxy.schedule (/Users/alexwells/hs-website/e2e/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
         at Window.maximize (/Users/alexwells/hs-website/e2e/node_modules/selenium-webdriver/lib/webdriver.js:1691:25)
         at new module.exports (/Users/alexwells/hs-website/e2e/node_modules/selenium-cucumber-js/runtime/chromeDriver.js:22:30)
         at getDriverInstance (/Users/alexwells/hs-website/e2e/node_modules/selenium-cucumber-js/runtime/world.js:54:22)
         at /Users/alexwells/hs-website/e2e/node_modules/selenium-cucumber-js/runtime/world.js:207:29
         at _combinedTickCallback (internal/process/next_tick.js:132:7)

This started happening after updating to MacOS Mojave (10.14.2 Beta), or chrome 70.0.3538.77 (not sure which caused it). When I comment out WebDriver.manage().window().maximize(), the tests run just fine. Some workarounds involve removing this line. Can you please do the same and remove this line? Or is there some other way to override the prebuilt Chromedriver?

Thanks

AlexWellsHS avatar Nov 13 '18 22:11 AlexWellsHS