Is there a way to select screen sharing options while running headless tests in webdriverio?

49 Views Asked by At

It seems that I cannot auto-select a screen sharing source when running the test in headless mode.

I managed to auto-select a tab using this ChromeDriver argument --auto-select-tab-capture-source-by-title=Example Domain, and it works. However, when I run the test headlessly, it doesn't, any suggestions?

1

There are 1 best solutions below

0
eNaught On

I ran into this problem recently and was able to make it work by using the headless=new argument for ChromeDriver.

From Selenium's web site:

The traditional --headless, and since version 96, Chrome has a new headless mode that allows users to get the full browser functionality (even run extensions). Between versions 96 to 108 it was --headless=chrome, after version 109 --headless=new.

Using --headless=new should bring a better experience when using headless with Selenium.