Test Overview
This test verifies that the page reloads correctly using cy.reload() and that a specific element is visible after the reload.
This test verifies that the page reloads correctly using cy.reload() and that a specific element is visible after the reload.
describe('Page reload test', () => { it('Reloads the page and checks element visibility', () => { cy.visit('https://example.cypress.io') cy.get('h1').should('be.visible') cy.reload() cy.get('h1').should('be.visible') }) })
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Test runner initialized, no browser actions yet | - | PASS |
| 2 | Browser opens and navigates to 'https://example.cypress.io' | Page loads with visible <h1> element | - | PASS |
| 3 | Finds <h1> element | <h1> element is present and visible on the page | Check that <h1> is visible | PASS |
| 4 | Calls cy.reload() to reload the page | Page reloads, content refreshes | - | PASS |
| 5 | Finds <h1> element again after reload | <h1> element is present and visible after reload | Check that <h1> is visible after reload | PASS |