Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda