Hrithik Maurya
Hrithik Maurya

Reputation: 1

Pytest automated browser keep getting out of fullscreen, when running test in headless mode

I have a test which needs to runs in fullscreen mode of the browser. It is working fine in automated browser. But when running into headless mode. The browser is getting out of fullscreen mode.

I have already tried this solution. But it resets afterward to normal screen.

driver.fullscreen_window()

Upvotes: -1

Views: 167

Answers (1)

Hrithik Maurya
Hrithik Maurya

Reputation: 1

Fixed the issue with using the new chrome headless mode. Just add this new headless option. It will run your test in actual browser like environment

options.add_argument('--headless=new')

Upvotes: 0

Related Questions