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

219
Vistas
Selenium: How to check that current window (handle) is in focus?

My problem is that I want to crawl a very modern, dynamic web page. I noticed that some elements are not just dynamically loaded, they are only loaded when the window is in focus (foreground)!

How can I check with the Selenium API that a web driver window is 'in focus'?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This command is making to be the driver window in focus:

((JavascriptExecutor) webDriver).executeScript("window.focus();");

It works in most cases.
However sometimes you will need to use another techniques.
See here for more details.

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