Search code examples
seleniumprotractorappiume2e-testingbrowserstack

How to use Browserstack's mobile device testing feature using protractor scripts?


I have written a spec and a config file that run using protractor and browserstack to test a website on different browsers. I am trying to utilize browserstack's mobile device testing feature by editing the config to test a device. When protractor filename-conf is run the following error is returned.
"WebDriverError: Not yet implementd. Please help us: htttp://appium.io/get-involved.html"

Here is the config that attempts to run the spec on a mobile web browser.

exports.config = {
seleniumAddress: 'http://hub.browserstack.com/wd/hub',

specs: [

    'example-spec.js'
],

multiCapabilities: [{

    browserName : 'iPhone',
    'platform' : 'MAC',
    'device' : 'iPhone 5S',
    'deviceOrientation' : 'portait',
    'project' : 'Isengard Mobile Automation',
    'build' : 'Mobile Test',
    'browserstack.user': 'username',
    'browserstack.key': 'keyname',
    acceptSslCerts: 'true'
    directConnect: true

}],

Do I need appium to utilize browserstacks mobile testing?


Solution

  • BrowserStack uses Appium to drive your Selenium tests on iOS. The exception you received probably indicates a certain Selenium command you executed, is not supported yet by Appium.

    You need NOT download Appium to run your Selenium scripts on BrowserStack's mobile testing platform. You simply have to change the capabilities (as you've done) and you should be good to go.

    I would recommend reaching out to BrowserStack's Support ([email protected]) as they would be the best guys to help you with this :)

    Note: The capabilities you've mentioned for iOS are correct as given in BrowserStack's documentation here. You need not make any changes there.