Cypress · Junior · Question 51 of 75
What is a custom command?
- 1A reusable command added with
Cypress.Commands.add - 2A shell command that runs before Cypress starts
- 3A command line flag for
cypress run
Show the answer
Correct answer: A reusable command added with Cypress.Commands.add
Explanation
For example cy.login(email, password). Keep them small and focused; heavy logic is easier to maintain as plain functions.