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

344
Visualizações
Why doesn't this javascript command execute?
webview.Eval("var list = document.getElementsByClassName('some button class')[0].click();");
        webview.Eval("document.getElementById('savebutton').click();");

From the first instruction, the program enters a page where there is a save button, then the second line would be to click the save button.

This whole code should run when I press a button but my problem is that when I press the button, only the first instruction is executed. If I press the button again, the second half will also be executed.

Does anyone have any idea what to do? Thank you in advance for your help!

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

0

Solved: I used Device.StartTimer() method to delay the execution of the second line.

TimeSpan delay = new TimeSpan(0, 0, 3);
Device.StartTimer(delay, DelayHandler);
webview.Eval("var list = document.getElementsByClassName('some button class')[0].click();");


bool DelayHandler()
{
 webview.Eval("document.getElementById('savebutton').click();");
 return false;
}
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