w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
679 stars 194 forks source link

`visibilitychange` event is not triggered when switching tabs in headless mode #1718

Closed potty closed 1 year ago

potty commented 1 year ago

We use https://w3c.github.io/webdriver/#switch-to-window to switch browser tabs, because we need to test our logic in visibilitychange event handler. Unfortunately it only works in non-headless mode, in headless mode this event isn't triggered. In our project, we use chromedriver. Is this intentional behaviour or bug?

whimboo commented 1 year ago

This seems to be an issue with chromedriver / Chrome. Please report it at https://bugs.chromium.org/p/chromedriver/issues/list.