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

157
Visualizações
Using Asynchronous, Foreach and arguments.callee

I put **** in some places because the production is too long. my aim is: I don't want it to switch to the 2nd foreach list until all the operations in the 1 foreach list are finished. I used arguments.callee until that element came inside, because when I clicked somewhere on the site where I was going to process, a loading site opened and waited. For the line where I use the item element, it gives the error "Uncaught SyntaxError: Invalid left-hand side in assignment".

var asd = (async()=>{
    var list = ["******","******"];
    list.forEach(async (item) =>  {
        await document.querySelector("******").click();
        await document.querySelector("******").click();
        await document.querySelector("******").click();

        (async function()  {
            if(document.querySelector("*****").className.indexOf("*****") == -1) {
                await document.querySelector("*****").select();
                await document.querySelector("*****").value="name : "+item;
                const event = await $.Event('keyup');
                event.which = 13;
                event.keyCode = 13;
                await $('*****').trigger(event);
            }
            else setTimeout(arguments.callee, 1000);
        })
    })
})
asd();
about 4 years ago · Juan Pablo Isaza
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