Cypress Quiz | Multiple choice questions on Cypress



Multiple choice questions on Cypress for interview preparation. This is the second test from the Cypress MCQ series for self-evaluation. This online test on cypress consists of 10 multiple-choice questions that will evaluate the person's expertise on Cypress.



MCQ questions and answers on Cypress testing tool

Topic- Cypress

The test consists of 10 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:Observe the below cypress test and determine the output.

describe('Actions', () => {

it('first test', () => {
cy.visit('www.amazon.in') //launch amazon.com
cy.get('#nav-link-accountList').click() //click on the account list
cy.get('#createAccountSubmit').click() //click on the create account link
})

it('second test', () => {
cy.get('#nav-link-accountList').click() //click on the account list
})


})














Q2: Which of the below commands in Cypress are used for interacting with the DOM?





















Q3: Determine the output of the below cypress test.

describe('Actions', () => {
beforeEach(() => {
cy.visit('www.amazon.in')
})

it('first test', () => {
cy.get('#nav-link-accountList').click() //click on the account list
cy.get('#createAccountSubmit').click() //click on the create account link
})

it('second test', () => {
cy.get('#nav-link-accountList').click() //click on the account list
})

})

















Q4: Which of the following command is used to Navigate back or forward to the previous or next URL in the browser's history?
















Q5: What will be the execution flow of the below cypress test?

import {funcTest} from "./func1.js";

describe('Actions', () => {
beforeEach(() => {
cy.visit('www.amazon.in')
})

it.only('first test', () => {

cy.get('#nav-link-accountList').click()
cy.get('#createAccountSubmit').click()
})

it('second test', () => {
cy.get('#nav-link-accountList').click()
var v=funcTest();
cy.log(v);
})

})













Q6: Which of the following is the correct usage of the dblclick() command?















Q7: Which of the following is used to make an HTTP request in Cypress?
















Q8: Which command is used in order to visit multiple domains of different origin in a single test?














Q9: Which of the following is the correct usage of the .children() command?














Q 10: Which of the below command is used to load a fixed set of data located in a file?



























More tests on Cypress:
Cypress MCQ test -1