Browser Library: how do I maximize browser window without using Set Viewport Size

Hi all,

I am using Browser Library and how do I maximize browser window without using Set Viewport Size. Because this should work for any screen size. Are there any standard Width and Height values that should I give which works for any screen size?

Do we have anything like “Maximize Browser Window” that we have in SeleniumLibrary?

1 Like

Hello,

Robotframework-browser is a recent project still under development, future optimizations will come, although Playwright has utilities to maximize the browser size ( currently not binding with Robot keywords )

Below, some ways to do it between Robot / Playwright

# Alternative One : Change viewport size
New Context             viewport={'width': 1280, 'height': 720}

# Alternative Two : Zoom out
Wait For Function       (_) => document.body.style.zoom = "70%"

Tip: use Robot Javascript Keywords ( Execute Javascript , Wait For Function ) in order to create workarounds if something is not available.

1 Like