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

183
Views
Unable to select checkbox using javascript in browser console

i am automating our application using a tool that supports javascript.Navigated to the page at browser console, i am trying to select the checkbox inside a web component using document.queryselector method but i am not able to succeed in checking the box.

tried .checked = true, select and submitform.

i am relatively new in this company and to the tool, so need some tip.

screenshot attached

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You are using querySelectorAll() that return an array, so you need to specify the position of the array that you want to change. Actually in the image show that the function return an array with 2 elements.

about 4 years ago · Juan Pablo Isaza Report

0

You can use for loop or need to specify the position.

var checkboxes = document.querySelectorAll('selector');
for (var i = 0, len = checkboxes.length; i < len; i++) {
//work with checkboxes[i].checked = true;
}
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!