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

149
Views
How to loop a JS path in the chrome dev tools console?

Context: I need to obtain information from a bunch of data in a web app. I do not use API because obtaining an API key would be too much of an issue. Therefore I decided to start using the chrome dev tools also as you'll see I am a complete beginner with this tool but recognize it's utility.

Problem: I found the table element that holds all the information that I want in my case I only want one column of that table. (I obtain the JS Path with that purpose) I read the elements in the dev tools and the syntax is the next one(copying the JS path):

document.querySelector (#WorkflowSchemes > div > div.legacy-jira-fe-module.toggle-wrap.expanded > div.mod-content > table > body > tr:nth-child(1) > td > strong")

Pasting the obtained JS path and adding the .innerText into the console of chrome gives me one of the 200 text elements that I need. What I need to do is iterate the (tr:nth-child(1)) node. To end up grabbing all the 200 text elements I need.

What I have at the moment:

var cycle =function (cycleCommand){while(let i = 1 < 200){
  console.log(document.querySelector (#WorkflowSchemes > div > div.legacy-jira-fe-module.toggle-wrap.expanded > div.mod-content > table > body > tr:nth-child("i") > td > strong").innerText
 }

var cycle = function (cycleTest)
for (let index = 0; index < 200: index++){
document.querySelector("WorkflowSchemes > div > div.legacy-jira-fe-module.togle-wrap.expanded > div.mod-content > table > tbody> tr:nth-child (("index"))  > td > strong")
}

I hope the problem is understandable please let me know if you know a way to do this.

Thanks!

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

0

If I understand correctly, you want a collection of all the strong elements in the table that are direct children of td elements in the tbody:

document.querySelectorAll('#WorkflowSchemes > div > div.legacy-jira-fe-module.toggle-wrap.expanded > div.mod-content > table > tbody > tr > td > strong')

is going to give you an array-like list of the nodes.

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!