Skip to content

[πŸ› Bug]: driver fails calling to minimize_browser() with error: failed to change window state to 'minimized', current state is 'normal' (Linux ENV)Β #15192

@bwomsm1

Description

@bwomsm1

What happened?

I am running the following simple test script:

import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.get('http://www.google.com')

time.sleep(2)
driver.minimize_window()
time.sleep(5)

driver.quit()

My script failed in line 7 when calling to driver.minimize_window() with the following error:

Message: unknown error: failed to change window state to 'minimized', current state is 'normal'
  (Session info: chrome=132.0.6834.159)

How can we reproduce the issue?

Run the follwing script:

import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.get('http://www.google.com')

time.sleep(2)
driver.minimize_window()
time.sleep(5)

driver.quit()

Against Linux ENV:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Relevant log output

Message: unknown error: failed to change window state to 'minimized', current state is 'normal'
  (Session info: chrome=132.0.6834.159)

Operating System

Linux Debian GNU/Linux 12 (bookworm)

Selenium version

Python Selenium 4.26.0

What are the browser(s) and version(s) where you see this issue?

Chrome

What are the browser driver(s) and version(s) where you see this issue?

132.0.6834.159

Are you using Selenium Grid?

NO

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!G-chromedriverRequires fixes in ChromeDriverI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions