In selenium, this is impossible. You need to check it on another driver, for example, click
As far as I know, the lead chrome selenium driver is selenium, but not how it works. The suggestion to check the use of other drivers, such as guzzle, where you can set the headers, is the answer in my opinion.
No, I found that you can additionally use another option. He recommended using a proxy server to enter additional headers in requests created by the browser.
For this, I found * http://wiremock.org/
source share