Found multiple elements to be clicked? In cypress, we can do that using curly brackets with the multiple passed inside a click.
We will do this on our autopract site; you can practice here if you want.
describe('Click',()=>{
it('Multiple Click',()=>{
cy.visit('http://autopract.com/selenium/form5/')
cy.get("input[value='one']").click()
cy.get('label input').click({multiple: true})
})
})
- So we unchecked the checked checkbox and then tried to check all the boxes using multiple.
- From the output, we can conclude multiple elements are clicked simultaneously.
- Log in to post comments