how to overrides headers with webdriver.Remote?

182 views
Skip to first unread message

Miguel Mavo

unread,
Aug 23, 2020, 10:26:53 AM8/23/20
to Selenium Users

Hello folks, I have a problem overriding
the headers with webdriver.Remote. the others works properly, I have tried chrome and firefox and  it works, in my case i need add x-forwrded-for with the objetive that my script run like other country assignin as value a custom ip for that country,

I have tried selenium wire and code like this:
self.browser.header_overrides = [(
'.*domain.com.*', {
'x-forwarded-for':  '131.178.0.0'
}

and works correct with chrome runing as local also firefox, but in my case I'm runing my project inside docker using selenium hub like this

self.browser = webdriver.Remote("http://172.12.0.5:4444/wd/hub", options=options,
desired_capabilities=self.cap)

however show no errors but it not browse like the country I configure before but work as default country where I am.

again, only with webdriver.Remote doesn't work.

can anybody help me with this issue?

Thankyou

Reply all
Reply to author
Forward
0 new messages