Cypress MCQ test on Assertions | Cypress quiz on Assertions



Check your expertise on cypress assertions by giving this free online MCQ test.


Cypress MCQ Test

Topic- Cypress Assertions

The test consists of 7 questions.

No negative marking for this test.

No Time limit

The pass percentage is 70%

The correct answer with a description will be displayed after the answer has been marked.

Submit the test to calculate your score once you are done with all the questions.

Complexity Level- Moderate




Q1: Consider the below UI image:



Which of the following is the correct command for validating the title of the page (highlighted in green above) in Cypress?















Q2: Which of the below commands asserts that the element (below email field with locator - #ap_email) is visible?

















Q3: Which of the below commands asserts that the given input field (with locator #twotabsearchtextbox) is empty?















Q4: Consider the below UI of an input text field:



What will be the output of executing the below command in Cypress?

cy.get('#twotabsearchtextbox').should('have.value','tshirt')















Q5: Consider the UI of the below URL bar:



What will be the output of executing the below command in Cypress?

cy.url().should('eq', 'https://amazon.co.in')















Q6: Consider the UI of the below URL bar:



What will be the output of executing the below command in Cypress?

cy.url().should('contains', 'google')


















Q7: Consider the below UI of an input text field:



What will be the output of executing the below command in Cypress?

cy.get('#twotabsearchtextbox').should('not.have.value','tshirt')