-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Scrollbars in Firefox headless #4295
Comments
I don't think we have anything. Could you share a code snippet along with your expectations? |
I think it would be nice to have a consistent approach to working with scrollbars across all browsers. const firefox = require('playwright').firefox;
const browser = await firefox.launch({
headless: true,
ignoreDefaultArgs: ['--hide-scrollbars']
});
const page = await browser.newPage();
await page.goto('//some_url');
await page.screenshot({
fullPage: false,
path: './screenshot.png'
}); It is assumed that in this case screenshot.png will contain scrollbars. |
Hi again, @pavelfeldman, |
+1 |
Just stumbled upon this issue too. In headless mode, both Chromium and Firefox operates in no-scrollbars mode, whereas our tests assumes the scrollbars presence. |
Perhaps this issue can be prioritized a little. I think its reasonable to expect that page has exactly the same state in headless/headul modes. If you test anything related to scrollbars (like we do) that becomes crucial. |
Is there any workaround for this issue? |
Continuing discussion from related #12494 Here is my usecase:
For now I've added a check to see if |
We have the same use-case (wanting to run headful, but only screenshot the page contents for comparisons) as above. |
I'm in the same headful boat. Would love a solution for Chromium. |
I get a scrollbar from screenshot when running headless: false This causes an issue with the screenshot comparison. I only run into this issue when I am trying to debug or running my tests locally in headed mode. My current work around is passing in
|
Hi,
Our tests are based on comparing screenshots of page elements with baselines.
One use case is to take a screenshot of a dialog with and without a scrollbar to test layout and styles.
To display scrollbars in chromium based browsers, I can ignore the --hide-scrollbars argument.
Is there any opportunity to show scrollbars in Firefox headless?
The text was updated successfully, but these errors were encountered: