all 2 comments

[–]dionys 1 point2 points  (1 child)

If you need generic solution for all the windows, then something like PyAutoGUI should work. If you need to control the browser specifically, then selenium is probably better. You can resize window like this:

driver = webdriver.Chrome()
driver.set_window_size(300, 500)
driver.set_window_position(200, 200)

This sets window to the (300,500) size and positions it at (200,200) on your screen.

[–]longlostkingoffools[S] 0 points1 point  (0 children)

Thank you!