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

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

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 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