Restore browser window


I found the command to maximize browser window in the selenium library, but is there a command to restore? I need the browser to maximize and restore to “un-maximized” state for the script to work.


You can use the “Set Window Size” keyword:

Seems webdriver also supports minimize option. So you could add custom library, with

from robot.libraries.BuiltIn import BuiltIn

def minimize_browser_window():
    seleniumlib = BuiltIn().get_library_instance('RPA.Browser.Selenium')

And then use it from your robot.
Would be interesting to learn about your use case.

1 Like

Great thanks. I’ll give it try.