Mattias Farnemyhr
Mattias Farnemyhr

Reputation: 4238

Set UserAgent when running Selenium mobile tests with SafariDriver

I want to be able to set UserAgent when running Selenium mobile tests on Safari but I can't figure out how I do that. When I run the same tests on Chrome I can define the UserAgent in my desiredCapabilities like this:

var options = {
    desiredCapabilities: {
        browserName: 'chrome',
        chromeOptions: {
            args: [
                'use-mobile-user-agent',
                'user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OSX) ...'
            ]
        }
    }
}

Guess there must be a similar way to do it when running it on Safari. I'm using webdriverio to setup my Selenium project but don't think that should matter.

Thanks.

Upvotes: 3

Views: 1217

Answers (1)

Mattias Farnemyhr
Mattias Farnemyhr

Reputation: 4238

This is not supported by SafariDriver unfortunately. Hope we will see this in the future.

Upvotes: 1

Related Questions