Cypress · Junior · Question 51 of 75

What is a custom command?

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.

Further reading

Problem with a question

Cypress · Junior · question 51

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz