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

205
Visualizações
Trying to write a script that auto-clicks the buttons on a rating page. Script works for one single element but not the whole page

I want to only click the + buttons on the page and make them increment to 4 for every table row (24 columns and 100 rows ). The buttons only appear if you click on every single sector. Complete Row

Thats how it looks when you click on it. Picture of the button (+ button)

Thats a snippet of the code which I labeled. Code Snippet

I used different scripts like this one:

<!DOCTYPE html>
<html>
<body>

<p>Hover over the checkbox to simulate a mouse-click.</p>

<form>
  <input type="checkbox" id="myCheck" onmouseover="myFunction()" onclick="alert('click event occured')">
</form>

<script>
function myFunction() {
  document.getElementById("myCheck").click();
}
</script>


</body>
</html>

And tried to inser it at a logical point but it only works for one single table element. I want the script to work on all +buttons.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You could select all the buttons with the class skilllevel_inc and then click 4 times on each of them. An example code would be :

let allButtons = document.getElementsByClassName("skilllevel_inc");
for(var i=0 ; i<allButtons.length ; i++) {
   if(allButtons[i]) {
    let j=0;
    while(j<4) {
      allButtons[i].click();
      j+=1;
    }
  }
}
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