Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
Is there a way to trigger windows.focus() while using chrome in headless mode?

I'm trying to trigger windows.focus() on one of my tests that is running in a headless environment. But I'm having trouble getting it to work. Although, the test seems to work when I turn off the headless mode setting. So far I've tried the following but to no avail:

  1. js.executeScript("windows.blur()") before windows.focus()
  2. Force setting windows resolution before windows.focus()
  3. Focussing/clicking on specific element (js.executeScript("document.getElementById('reactRoot').focus();");)

Was wondering if there's something I'm missing in my setup.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!