Cypress 13

Query elements with cy.get

Easy30 pts~12 min
  • Practice Catalog
Practice app · Practice Catalog

A product catalog with ids, names, classes, links, data-testids and duplicate buttons for locator practice.

Test URL
/lab/cypress-query-elements-with-cy-get

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Query elements with cy.get. Practise it against the Practice Catalog practice application (A product catalog with ids, names, classes, links, data-testids and duplicate buttons for locator practice.).

Your task

  1. 1Open the practice application at the test URL shown above and wait for it to finish loading.
  2. 2Inspect the page to find the elements you need — key elements include #search-input, #search-button, #search-summary.
  3. 3Write and run a test that demonstrates: query elements with cy.get.
  4. 4Finish with at least one assertion on a user-visible outcome, not an internal detail.

Acceptance criteria

  • The test runs to completion without errors.
  • The test contains at least one passing assertion on a user-visible outcome.

Cypress 13 · Cypress · Command chains & queries