A Playwright page is the test interface for controlling the browser page under test. Visit a route with page.goto, then perform navigation, element lookup, assertions, and interactions relative to that page. section 9.8.5
Use a page incrementally in an end-to-end test:
- Call page.goto with a route, relative to the configured base URL. section 9.8.5
- Use page.locator to retrieve elements from the DOM, then assert counts, text, and attributes. section 9.8.5
Testing a video list
A test receives page, visits the root route, locates #video-list>div, verifies two videos, and checks the first video's text and href.
