Getting the Ruby key "KeyError: key not found: 102" when trying to maximize the browser window using Selenium Webdriver v3.70

I recently upgraded the version of Selenium Webdriver to 3.70, and when I try to enlarge the browser window, I get this error:

KeyError: key not found: 102

Maximizing the window in advance (in the previous version) seemed to work absolutely fine, I'm not sure if this is just a coincidence, although it is not a standard type of Selenium error.

Here is my code:

profile = Selenium::WebDriver::Chrome::Profile.new $driver = Selenium::WebDriver.for :chrome, :profile => profile $driver.manage.window.maximize 

Does anyone else have this problem? It's also worth noting that I'm using Ruby v2.3.1, so maybe this needs an update? I just didn’t want to make gross updates, but I wanted to get the latest version of Selenium Webdriver. I also don't know if this is due to chrome ribs, but the last time I updated it to the latest version is 19/09/17.

Thanks in advance, Dan

+8
ruby selenium selenium-webdriver
source share
1 answer

Update chromedriver to 2.33 .

On Mac, you can upgrade it with brew brew upgrade chromedriver

+8
source share

All Articles