Complete the code to take a full-page screenshot in Cypress.
cy.visit('https://example.com') cy.screenshot([1])
Using { capture: 'fullPage' } tells Cypress to capture the entire page, not just the visible part.
Complete the code to wait for the page to load before taking a full-page screenshot.
cy.visit('https://example.com') cy.get('body').should([1]) cy.screenshot({ capture: 'fullPage' })
Waiting for body to exist ensures the page has loaded before taking the screenshot.
Fix the error in the code to correctly take a full-page screenshot with a custom file name.
cy.screenshot([1]: 'homepage', capture: 'fullPage' })
The correct option key for naming the screenshot file is name.
Fill both blanks to take a full-page screenshot only after an element with id 'main' is visible.
cy.get('#main').should([1]) cy.screenshot([2])
We wait for the element to be visible, then take a full-page screenshot.
Fill all three blanks to take a full-page screenshot with a custom name and disable animations and timers.
cy.screenshot([1]: 'custom-shot', [2]: 'fullPage', [3]: true)
The correct options are name for the file name, capture for full page, and disableTimersAndAnimations: true to disable animations and timers before taking the screenshot.