Skip to content

[🐛 Bug]: ChromeDriver not honoring the --window-size parameter #15827

@narendrareddy-tomtom

Description

@narendrareddy-tomtom

Description

Whenever we launch the browser we always maximize the browser using following code:

options.add_argument('--window-size=1920x1080')

However from 137.0.7151.55 version, I see it is ignoring the maximising window. If anyone knows the solution please assist us.

Here is the code we uses:

Note: It is keep on opening the browser with 800X461 size

Reproducible Code

from selenium.webdriver.chrome.options import Options
execution_path = "./drivers/chromedriver.exe"
self.log("execution_path chrome " + execution_path)
os.chmod(execution_path, 0o755)
os.environ["webdriver.chrome.driver"] = execution_path
os.environ["DBUS_SESSION_BUS_ADDRESS"] = "/dev/null"
options = wdriver.ChromeOptions()
options.add_argument('--no-sandbox')
options.add_argument('--ignore-certificate-errors')
options.add_argument('--ignore-ssl-errors')
options.add_argument('--disable-notifications')
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--disable-dev-shm-usage');
options.add_argument('--window-size=1920x1080');
#options.add_argument('--start-maximized')
self.log("Before initiating the chrome driver ")
try:
    driver = wdriver.Chrome(chrome_options=options, executable_path=execution_path)
except Exception as e:
    self.log("Inside Exception block")

ℹ️ Last known working version: 135.0.7049.42

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions