We have similar requirement too Using Python requests library directly works . This line works pageUrl="test.com/api/testing"
r = requests.get(pageUrl, headers = {'x-v': '2'} ) Try the same with Selenium driver. The header doesn't get passed. driver.header_overrides = {
'x-v': '2',
}
driver.get(pageUrl) So our workaround was to use the request library. However this means we don't get screenshots. This is a limitation with Selenium unfortunately. However posting it here in case someone finds a workaround.
... View more