Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
Webdriver io - Getting Cannot read properties of undefined (reading 'click')

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')
})
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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)).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!