I try to set bowser size to a certain dimensions using:
browser = webdriver.Chrome()
browser.set_window_position(100, 100)
browser.set_window_size(1024, 768)
but it seems webdriver ignores Y parameter - window is correctly shifted 100 points from the left, but the 100 points from the top are ignored. The most annoying is that Y dimension is ignored too - window height is set to 2035 points (4K monitor height minus taskbar) (Linux x86_64, KF5, Python 3.9.1, Selenium 3.141.0). I've seen solution with just maximizing the window, but having window 6 time larger than necessary seems no OK. Currently I create virtual desktop of appropriate size and then maximise window on it, but I don't think its sustainable solution.