selenium: [🐛 Bug]: driver fails calling to minimize_browser() with error: failed to change window state to 'minimized', current state is 'normal' (Linux ENV)
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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
I have tried to reproduce this on MacOS and unable to with Java. I doubt it is language-specific but will try with Python as well. What version of Chromedriver are you using? Does it occur with Firefox or other versions of Chrome?