I'm using webdriver.Firefox
and I'm trying to send the following custom header:
self.headers = { 'Authorization': 'Basic %s' % b64encode(bytes(self.args.user + ':' + self.args.password, "utf-8")).decode("ascii") }
in the following way:
self.driver.get(self.base_url + "/", headers=self.headers)
which is similar way as shown here, but I'm guessing it's using completely different driver.
However I've the error:
TypeError: get() got an unexpected keyword argument 'headers'
I've checked the old issue #2047: How to add a header to a request?, but it's closed as duplicate of another Won't Fix issue.
Is there any way of simply test the site using Selenium which is behind Basic Authentication?
One suggestion is to use proxy, however I don't believe such simple functionality doesn't exist.
Any suggestions?
http://user:pass@host
as host.