Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

150
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda