I am using Cypress 5.0 and have configured the screenshots folder in cypress.json. When running tests using the Cypress runner API programmatically, I set the viewport values to config.viewportWidth = 1080
and config.viewportHeight = 1024
.
The issue I’m facing is that the screenshots captured are not of the full page. My web page has scrolling, but the screenshot only captures the visible area. How can I capture a full-page screenshot in Cypress?
Here is my cypress.json configuration:
{
"projectId": "yvs41u",
"video": false,
"integrationFolder": "integration-tests/experiences",
"testFiles": "**/*.js",
"fixturesFolder": false,
"pluginsFile": "plugins/index.js",
"supportFile": "support/index.js",
"screenshotsFolder": "build/reports",
"videosFolder": "build/reports",
"videoUploadOnPasses": false,
"trashAssetsBeforeRuns": false,
"reporter": "mochawesome",
"chromeWebSecurity": false,
"reporterOptions": {
"charts": true,
"html": false,
"json": true,
"reportDir": "cypress/reports/mochawesome",
"reportTitle": "Archie Integration Testing Suite",
"reportFilename": "report",
"overwrite": false,
"inline": true,
"inlineAssets": true,
"timestamp": "dd-mmm-yyyy-HH-MM-ss"
}
}