Reputation: 11351
I am using Protractor with PhantomJS. How can I set the user agent that PhantomJS sends? Can it be different for different tests?
Upvotes: 2
Views: 565
Reputation: 474191
Set the phantomjs.page.settings.userAgent
under capabilities
:
capabilities: {
"browserName": "phantomjs",
"phantomjs.page.settings.userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 (KHTML, like Gecko) Chrome/15.0.87"
}
Upvotes: 2