I am trying to add request headers for modHeaders in chrome through Selenium with ruby.
I have tried this code but no luck. Mod Header extension has added to browser but unable to add request headers to that extension.
Please help me to find the problem in my code.
Thank you.
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :chrome,
:desired_capabilities =>Selenium::WebDriver::Remote::Capabilities.chrome({
'chromeOptions' => {
'extensions' => [Base64.strict_encode64(File.open('C:\Users\balinasr\Downloads\mod.crx', 'rb').read) ],
'prefs'=> {
'modifyheaders.headers.name'=>'aaa',
'modifyheaders.headers.value'=>'bbb'
}
}
})