Skip to content
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

takeScreenshot with fullpage: true is not working as expected #5961

Closed
mihaisorintoma opened this issue Feb 16, 2021 · 10 comments · Fixed by #7054
Closed

takeScreenshot with fullpage: true is not working as expected #5961

mihaisorintoma opened this issue Feb 16, 2021 · 10 comments · Fixed by #7054
Assignees
Labels
FREQUENCY: level 2 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@mihaisorintoma
Copy link

mihaisorintoma commented Feb 16, 2021

What is your Test Scenario?

I want to create a screenshot of the entire page, thus I use .takeScreenshot({fullPage: true})

What is the Current behavior?

The screenshot generated has a scrollbar. The footer is not entirely visible.

What is the Expected behavior?

The screenshot generated contains the whole page, without any scroll.

What is your web application and your TestCafe test code?

https://advancedinstaller.com/blog/page-1.html

import {Selector} from 'testcafe'

fixture `test`
  .page(`https://advancedinstaller.com/blog/page-1.html`)

    test(`test screenshot of blog page}`, async t => {
      await t
        .resizeWindow(768,800)
        .click(Selector('#cookies button'))
        .takeScreenshot({fullPage: true});
    });

Steps to Reproduce:

  1. Run the test code above using "testcafe chrome:headless"

Your Environment details:

  • testcafe version: 1.11.0
  • node.js version: v10.15.3
  • command-line arguments: testcafe chrome:headless
  • browser name and version: Chrome 88.0.4324.150
  • platform and version: Windows 10 x64 20H2
  • other: None
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 16, 2021
@mihaisorintoma mihaisorintoma changed the title takeScreenshot with takeScreenshot with fullpage: true is not working Feb 16, 2021
@mihaisorintoma mihaisorintoma changed the title takeScreenshot with fullpage: true is not working takeScreenshot with fullpage: true is not working as expected Feb 16, 2021
@AlexKamaev
Copy link
Contributor

Thank you for sharing the example. I reproduced the issue. We need time to research it.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 17, 2021
@AlexKamaev AlexKamaev added TYPE: bug The described behavior is considered as wrong (bug). FREQUENCY: level 1 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. labels Feb 17, 2021
@AlexKamaev AlexKamaev added this to the Planned milestone Feb 17, 2021
@sharath2106
Copy link

Hi @AlexKamaev I'd like to work on this if this is not fixed. Would also appreciate if you can provide some insights on what might actually have caused this issue (since this is my first contribution in TestCafe).

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 22, 2021
@viktoria2506
Copy link

We'd appreciate it if you contribute to the development of the application.
It looks like you should debug screenshot cropping in the Capturer module.
Try to do this.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 24, 2021
@sharath2106
Copy link

Okay @viktoria2506!

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 24, 2021
@viktoria2506 viktoria2506 removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 24, 2021
Artem-Babich added a commit to Artem-Babich/testcafe that referenced this issue May 26, 2022
Artem-Babich added a commit to Artem-Babich/testcafe that referenced this issue Jun 23, 2022
@avimredis
Copy link

I believe I am experiencing this issue as well. Has it been fixed? Seems like the PR is still open and not yet merged.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 18, 2022
Artem-Babich added a commit to Artem-Babich/testcafe that referenced this issue Jul 19, 2022
@Artem-Babich
Copy link
Contributor

Hello, @avimredis!

This issue is caused by the different behavior between the Chrome and Chrome:headless browsers. We are currently working on this issue and will update this thread once we have any news.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 19, 2022
@avimredis
Copy link

Hello, @avimredis!

This issue is caused by the different behavior between the Chrome and Chrome:headless browsers. We are currently working on this issue and will update this thread once we have any news.

@Artem-Babich Thanks for the quick reply!

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 19, 2022
@Artem-Babich Artem-Babich removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 20, 2022
AndreyBelym pushed a commit to Artem-Babich/testcafe that referenced this issue Jul 27, 2022
@uuRae
Copy link

uuRae commented Oct 26, 2022

I am experiencing this as well. Screenshots were full page in the past, but now are cropped. This does occur on Chrome as well as headless Chrome and headless Firefox.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 26, 2022
@avimredis
Copy link

@uuRae the workaround I found is that if you know about a flaky or failing test and you need to see the full page, you can place this right before the failing step and it will take a full screen

await t.takeScreenshot({
path: DESCRIPTIVE-NAME.png,
fullPage: true,
})

I think it's specifically a bug with the screenshot on fail, so this works

@AlexKamaev AlexKamaev removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 27, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

Release v2.1.0-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 SYSTEM: screenshot capturing An issue related to the screenshot capturing functionality. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
8 participants