Getting Cannot read properties of undefined (reading 'click')
it('Checkbox', async () => {
browser.url('https://rahulshettyacademy.com/AutomationPractice/')
const element = await $$("input[type='checkbox']")
browser.pause(3000)
await element[1].click()
console.log(await element[1].isSelected())
browser.saveScreenshot('screenshot.png')
})
This error tells you that it's not possible to read the element .click from element[1] because there's nothing in element[1] - it is null because there's no second element in that array. If you are unsure of the structure inside of element you could do console.log(element), or console.log(JSON.stringify(element)).