I'm trying to set the user-agent parameter in Selenium::Chrome, but am not finding the correct way. Has anyone successfully done this?
my $driver = Selenium::Chrome->new(
'user-agent' => 'TEST',
'--user-agent' => 'TEST',
'chromeOptions' => {
prefs => {
'user-agent' => 'TEST',
'--user-agent' => 'TEST',
},
},
extra_capabilities => {
'chromeOptions' => {
prefs => {
'user-agent' => 'TEST',
'--user-agent' => 'TEST',
},
},
'goog:chromeOptions' => {
prefs => {
'download.default_directory' => '/tmp',
'user-agent' => 'TEST',
'--user-agent' => 'TEST'
},
args => [ 'headless' ]
}
}
);