Complete the code to click on a button with id 'submitBtn'.
cy.get('#submitBtn').[1]()
The click() command simulates a mouse click on the selected element.
Complete the code to click on the first element with class 'item'.
cy.get('.item').[1]()
click() afterwards.The click() command clicks on the first matched element by default.
Fix the error in the code to click on a button with text 'Submit'.
cy.contains('Submit').[1]()
contains().The click() command is used to click on elements found by contains().
Fill both blanks to click on a button with id 'saveBtn' forcing the click even if covered.
cy.get('#saveBtn').[1]({ force: [2] })
type instead of click.force to false which disables forcing.Use click() with option { force: true } to click even if the element is covered or disabled.
Fill all three blanks to click on a button with class 'btn' at coordinates (10, 20) with force enabled.
cy.get('.btn').[1]({ [2]: { x: 10, y: 20 }, [3]: true })
type instead of click.position with force options.The click() command accepts options like position for coordinates and force to force the click.