Complete the code to select an element using the stable data-cy attribute.
cy.get('[[1]="submit-button"]').click()
Using data-cy attributes helps keep tests stable by avoiding selectors that change often.
Complete the code to assert that the element with data-cy='login-input' is visible.
cy.get('[data-cy=[1]]').should('be.visible')
The attribute value must be a string inside quotes in the selector.
Fix the error in the code to correctly select the button with data-cy='submit'.
cy.get('[data-cy=[1]]').click()
The attribute value must be wrapped in quotes inside the selector brackets.
Fill both blanks to create a stable selector and assert the button is enabled.
cy.get('[[1]=[2]]').should('be.enabled')
Use data-cy as the attribute and quote the value properly for a stable selector.
Fill all three blanks to select an input by data-cy, type text, and verify the value.
cy.get('[[1]=[2]]').type([3]).should('have.value', 'hello')
Use data-cy with quoted value to select, then type a string with quotes, and verify the input value.