Playwright Maximize Browser

Hi All,
Is there any way to maximize browser when using playwright. Tried the below code but not working.

New Browser   headless=False  args=['--start-maximized']
New Context  ignoreHTTPSErrors=True

Try this it should work

New Browser  Chromium  headless=false
New Context  viewport={'width': 1920, 'height': 1080}

tried this but what i need is to maximize the browser to the screen size. this code might be running in different pc so need to maximized based on that monitor size.

One option is to get monitor resolution and use that: screen - How do I get monitor resolution in Python? - Stack Overflow

1 Like