question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Context with viewport set to None does not behave as in Playwright

See original GitHub issue

Describe 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:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Snooz82commented, Sep 23, 2022

@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.

1reaction
aaltatcommented, Jun 29, 2022

For future: ETA is 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 look or If 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found