Complete the code to select an element by its class using Cypress.
cy.get('[1]')
In Cypress, to select an element by class, you use a dot before the class name inside quotes, like ".button".
Complete the code to click a button with id 'submit' using Cypress.
cy.get('[1]').click()
To select an element by id in Cypress, use #idName. Here, #submit selects the element with id 'submit'.
Fix the error in the code to wait for an element with data-cy attribute 'login' before clicking.
cy.get('[1]').click()
To select elements by attribute in Cypress, use square brackets with the attribute and value inside quotes, like [data-cy=login].
Fill both blanks to assert that a button with class 'submit' is visible.
cy.get('[1]').should('[2]')
Use cy.get('.submit') to select by class. The assertion should('be.visible') checks if the element is visible.
Fill all three blanks to create a test that types 'hello' into an input with id 'name', then asserts it has the correct value.
cy.get('[1]').[2]('hello').should('[3]', 'hello')
Select the input by id with #name. Use type('hello') to enter text. Then assert with should('have.value', 'hello').