garris / garris/BackstopJS

Unable to capture screenshot of the page with all the images

Open
#1,330 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

hi,

I tried to use img in the readySelector. But even though the images are not loaded the screenshots are taken.

How to wait until the whole page is loaded along with images and text.

![2021-05-25_06-42-57-c9c5beed9d7cd096fc4802c9321953e3](https://user-images.githubusercontent.com/11741041/120963348-098de400-c77f-11eb-89a6-3d0eeb259a92.png)

Below is the backstop.json file
{
"id": "MAGNUM",
"viewports": [
{
"label": "tablet",
"width": 1024,
"height": 768
}
],
"onBeforeScript": "puppet/onBefore.js",
"onReadyScript": "puppet/onReady.js",
"scenarios": [
{"label":"magnum-uk-home","url":"https://www.magnumicecream.com/uk/home.html","referenceUrl":"https://www.magnumicecream.com/uk/home.html", "delay": 10000, "expect": 0, "requireSameDimensions": true,"readySelector": "img", "clickSelector": ["button[class='o-btn--close js-btn-close js-content-panel-close']","#onetrust-reject-all-handler"] , "selectorExpansion": true, "readySelector": "", "readyEvent": "", "misMatchThreshold" : 0.1}],
"paths": {
"bitmaps_reference": "backstop_data/bitmaps_reference",
"bitmaps_test": "backstop_data/bitmaps_test",
"engine_scripts": "backstop_data/engine_scripts",
"html_report": "backstop_data/html_report",
"ci_report": "backstop_data/ci_report"
},
"report": ["browser"],
"engine": "puppeteer",
"engineOptions": {
"args": ["--no-sandbox"]
},
"asyncCaptureLimit": 5,
"asyncCompareLimit": 50,
"debug": false,
"debugWindow": false
}

I have tried:

1. adding delay
2. using readySelector with img tag
3. scrolling till bottom of the page

Note: https://www.magnumicecream.com/uk/home.html is the sample page.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.