How to upload modheaders extension to add custom headers when running on remote browsers on LambdaTest ?
You can download the modheaders extension from the folllowing repo: https://github.com/modheader/modheader_selenium
Here are the capabilities used:
caps = {
:browserName => ""chrome"",
:version => ""latest"",
:platform => ""win10"",
:name => ""LambdaTest ruby google search name"",
:build => ""Build""
'chromeOptions' => {
'extensions' => [
Base64.strict_encode64(File.open('modheader.crx', 'rb').read)
]
}
}
where modheader.crx
is the extension uploaded using chromeOptions.
Also following URL’s can be used to verify the added custom headers.
@driver.get(""https://webdriver.modheader.com/add?AAdd=ModHeader+Test"")
@driver.get(""https://modheader.com/headers"")
sleep(15)