New Context with viewport set to None does not behave as in Playwright
See original GitHub issueDescribe the bug
Given Chromium is started passing the parameter --start-maximized
When calling the keyword New Context viewport=${None}
Then the window is not maximized.
The corresponding code in Node.JS works as expected:
const playwright = require('playwright');
(async () => {
const browser = await playwright.chromium.launch({args: ["--start-maximized"], headless: false});
const context = await browser.newContext({viewport:null});
const page = await context.newPage();
await page.goto('https://browser.fi/');
await browser.close();
})();
To Reproduce Steps to reproduce the behavior:
Execute the following Robot Framework script:
*** Settings ***
Library Browser
*** Test Cases ***
Open Chromium Maximized
New Browser chromium headless=false args=["--start-maximized"]
New Context viewport=${None}
New Page https://browser.fi
Expected behavior Using Browser Library the window should be maximized, just like in Playwright.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chromium
- Version: 102.0.5005.40
Additional context
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Robot Framework Browser 14.0.0 Release!
New Context with viewport set to None does not behave as in Playwright #2054. This usage of chrome args together with viewport ${None}...
Read more >Browser - MarketSquare
Browser library is a browser automation library for Robot Framework. This is the keyword documentation for Browser library.
Read more >Set Up End-to-end Testing with Python and Playwright
In this post I am going to describe how you can start adding end-to-end tests on a web application using Python and Microsoft's...
Read more >https://raw.githubusercontent.com/microsoft/playwr...
Creates a new browser context. It won't share cookies/cache with other browser contexts. ```js (async () => { const browser = await playwright.firefox.launch(); ......
Read more >playwright headless chromium can't find selector, but finds it in ...
I ran into this problem as well where my test would run in headed mode but not headless mode. I had a window...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@aliasgerkw As far as i know, yes. you have to set that chrome argument. I can not test it, because on mac fullscreen does not work. But @mardukbp tested it on windows.
For future:
ETAis usually considered as really bad word in many open source communities, because many project run on people free time. There is excellent blog post about seeing OS as act of kindness.But what words would be better then? Well, usually it is better to use words like:
Is someone already looking on this issue and if not I could take a lookorIf no-one is looking at this problem, I can take a look. Or if you are reporting that you are also seeing the problem, just say:I think that am also seeing the same problem.and add the information included in your first post, without the first sentence. The later way is telling to the maintainers that other people are also seeing the problem and it gives maintainers valuable feedback what is important and what it not.