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

Only capturing page 'above the fold' #1188

Closed
prtksxna opened this issue May 11, 2020 · 2 comments
Closed

Only capturing page 'above the fold' #1188

prtksxna opened this issue May 11, 2020 · 2 comments

Comments

@prtksxna
Copy link
Contributor

I have the following configuration, and when I run backstop reference the image that it collects is only above the fold (as in without scrolling the browser). And the rest of the image just has the website's background color. Without using mergeImgHack it gets the whole page but has a random a gap in the content.

Any clues on what could be going wrong?

{
  "id": "backstop_default",
  "viewports": [
    {
      "label": "phone",
      "width": 320,
      "height": 480
    },
    {
      "label": "tablet",
      "width": 1024,
      "height": 768
    }
  ],
  "onBeforeScript": "puppet/onBefore.js",
  "onReadyScript": "puppet/onReady.js",
  "mergeImgHack": true,
  "scenarios": [
    {
      "label": "Prateek Saxena",
      "url": "https://prtksxna.com/2020/04/15/the-backlog/",
      "referenceUrl": "",
      "readyEvent": "",
      "readySelector": "#colophon",
      "delay": 10,
      "hideSelectors": [],
      "removeSelectors": [],
      "hoverSelector": "",
      "clickSelector": "",
      "postInteractionWait": 0,
      "selectors": [],
      "selectorExpansion": true,
      "expect": 0,
      "misMatchThreshold" : 0.1,
      "requireSameDimensions": true
    }
  ],
  "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": true,
  "debugWindow": true
}
@prtksxna
Copy link
Contributor Author

Without using mergeImgHack it gets the whole page but has a random a gap in the content.

I think I know why this is happening. One of the elements' margin is set in vh and that is increasing the gap and cutting off the rest of the page.

@ygerasimov
Copy link

@prtksxna you could remove the element having vh height to make the page manageable size.

@prtksxna prtksxna closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants