Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy

Migrating to Appium 2.0 on BrowserStack

Appium 2.0 is a major upgrade to the Appium framework with some exciting features. Primarily, it aims to re-envision Appium as a platform by providing an independent driver ecosystem, plugin ecosystem, and removing certain old and deprecated functionality. For more details on Appium 2.0, check out Appium 2.0 documentation.

BrowserStack now supports Appium 2.0 server along with supported drivers and plugins allowing you to run tests using Appium 2.0 on BrowserStack’s real mobile device cloud.

Important: At present, Appium server version 2.4.1 is the latest supported version on BrowserStack. It is supported on the following OS versions:
  • Android 8 and above
  • iOS 15 and above

Getting Started with Appium 2.0 on BrowserStack

Before you get started with Appium 2.0 on BrowserStack, note the following changes :

1. W3C webdriver protocol is enforced

Appium 2.0 enforces strict compatibility with the W3C webdriver protocol and deprecates legacy protocols such as JSONWP & MJSONWP protocol. You need to ensure that Appium capabilities provided in your tests follow W3C standard. You can either edit your scripts to make them compatible with W3C or rely on majority of the updated Appium clients that support W3C out of the box.

For more details on how to generate W3C compatible capabilities, check out W3C Capability Builder page.

2. Supported Appium 2.0 Capabilities

In W3C standard, there are following kinds of capabilities :

  • Standard W3C capabilities : Capabilities such as platformName which are part of WebDriver Protocol spec. For more details, check out the W3C webdriver capabilities guide.
  • Appium vendor capabilities : All the Appium capabilities beyond standard W3C capabilities. These capabilities must have appium: prefixed or need to be wrapped in the appium:options object.
  • BrowserStack vendor capabilities : All the BrowserStack-specific Appium capabilities. These capabilities need to be wrapped in the bstack:options object.

For example, check the following snippets :

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "android");

capabilities.setCapability("appium:platformVersion", "9.0");
capabilities.setCapability("appium:deviceName", "Google Pixel 3");

HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("appiumVersion", "2.4.1");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
"platformName" : "android",

"appium:platformVersion" : "9.0",
"appium:deviceName" : "Google Pixel 3",

'bstack:options' : {
    "appiumVersion" : "2.4.1",  
},
}
caps = {
    "platformName" : "android",
    "appium:platformVersion" : "9.0",
    "appium:deviceName" : "Google Pixel 3",

    "bstack:options" : {
        "appiumVersion" : "2.4.1"
    }
}
capabilities = {
    "platformName" => "android",

    "appium:platformVersion" => "9.0",
    "appium:deviceName" => "Google Pixel 3",

    'bstack:options' => {
        "appiumVersion" => "2.4.1",
    },
}

AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("platformName", "android");

capabilities.AddAdditionalCapability("appium:platformVersion", "9.0");
capabilities.AddAdditionalCapability("appium:deviceName", "Google Pixel 3");

Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("appiumVersion", "2.4.1");
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
//...

For more details on how to generate these capabilities, check out the W3C Capability Builder page.

2.1 Supported Appium driver capabilities

BrowserStack supports the following drivers and capabilities:

Driver capability Used for Values
automationName Which automation engine to use. On Android, UIAutomator2, & Flutter are supported. On iOS, XCUITest & Flutter are supported.
automationVersion Designating which version of the specified driver to use. Default automation version will be selected. For Appium 2.4.1, it is v5.14.0 for XCUITest, v2.42.1 for UIAutomator2 and v2.3.0 for Flutter.
automation Designating a custom driver to use Currently, not supported on BrowserStack.

2.2 Supported Appium plugins

BrowserStack currently supports following plugins:

Plugins Used for Examples
Images Facilitates image comparison, visual testing, and image-based functional testing For usage, refer Images plugin Github doc
Important: Please note that :
  • All BrowserStack supported plugins are by default activated so users don’t need to pass plugins capability to activate them.
  • Currently, we do not support passing custom plugins.

Need some help?

If you have any queries, please get in touch with us.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy