-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
I am unable to set the window position using the latest firefox/geckodriver.
Environment:
- firefox 137.0
- geckodriver 0.36.0
- Linux (Debian Stable)
Steps to reproduce:
- Run the following Python/Selenium code:
from selenium import webdriver
driver = webdriver.Firefox()
driver.set_window_position(50, 50)
print(driver.get_window_position())
- Expected output:
{'x': 50, 'y': 50}
- Actual output:
{'x': 0, 'y': 0}
I enabled debug logging in Selenium, and can see the call to driver.set_window_position(50, 50) sends the following request to geckodriver:
POST http://localhost:50479/session/88271c16-646b-43e9-9552-8c5cf1a065b0/window/rect {'x': 50, 'y': 50, 'width': None, 'height': None}
The response from geckodriver shows that the window position was not set and remains "x":0,"y":0:
Remote response: status=200 | data={"value":{"x":0,"y":0,"width":488,"height":240}} | headers=HTTPHeaderDict({'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-cache', 'content-length': '48', 'date': 'Mon, 07 Apr 2025 03:26:41 GMT'})