Appium 1 end support

The Appium 1 support ended on 1st January 2022.
All recent versions of the officially supported platform drivers require Appium 2 to run.
Mobitru still has Appium 1 as the default Appium version, but we recommend starting to use Appium 2 for your test executions.

Changes in Appium 2

Protocol

Appium’s API is based on the W3C WebDriver Protocol, and it has supported this protocol for years. Before the W3C WebDriver Protocol was designed as a web standard, several other protocols were used for both Selenium and Appium. These protocols were the “JSONWP” (JSON Wire Protocol) and “MJSONWP” (Mobile JSON Wire Protocol). The W3C Protocol differs from the (M)JSONWP protocols in a few small ways.

Up until Appium 2.0, Appium supported both protocols, so that older Selenium/Appium clients could still communicate with newer Appium servers. Moving forward, support for older protocols will be removed.

Capabilities

One significant difference between old and new protocols is in the format of capabilities. Previously called “desired capabilities”, and now called simply “capabilities”, there is now a requirement for a so-called “vendor prefix” on any non-standard capabilities.
The list of standard capabilities is given in the WebDriver Protocol spec and includes a few commonly used capabilities such as browserName and platformName.

These standard capabilities continue to be used as-is. All other capabilities must include a “vendor prefix” in their name. A vendor prefix is a string followed by a colon, such as appium:. Most of Appium’s capabilities go beyond the standard W3C capabilities and must therefore include vendor prefixes (we recommend that you use appium: them unless directed otherwise by documentation).
For example:
appium:app
appium:noReset
appium:deviceName
You can find more information regarding capabilities here.

Commands

The definition of certain commands that pertain only to specific drivers has been moved to those drivers’ implementations. For example, pressKeyCode is specific to the UiAutomator2 driver and is now understood only by that driver. In practice, the only breaking change here is the kind of error you would encounter if the appropriate driver is not installed. Previously, you would get a 501 Not Yet Implemented error if using a driver that didn’t implement the command. Now, you will get a 404 Not Found error because if a driver that doesn’t know about the command is not active, the main Appium server will not define the route corresponding to the command.

Start to use Appium 2 on Mobitru

Capabilities

The following vendor-specific capability should be used in order to run tests using Appium 2.0:
mobitru:appiumVersion: <version value>
Possible values are ‘1’ or ‘2’ as the current major versions for the Appium.

Examples

public BaseOptions<? extends MutableCapabilities> buildOptions () {
        UiAutomator2Options options = new UiAutomator2Options();
        options.setCapability("udid", "26281JEGR04493");
        options.setCapability("appPackage", "'com.example.android.apis'");
        options.setCapability("appActivity", "'.ApiDemos'");
        options.setCapability("noReset", true);
        
        //specify appium version
        options.setCapability("mobitru:appiumVersion", "2");
        
        return options;
}
    public BaseOptions<? extends MutableCapabilities> buildOptions () {
        XCUITestOptions options = new XCUITestOptions();
        options.setCapability("udid", "00008030-000C312C1E69802E");
        options.setCapability("bundleId", "com.mobitru.appium.uicatalog");
        options.setCapability("autoAcceptAlerts", true);

        //specify appium version
        options.setCapability("mobitru:appiumVersion", "2");

        return options;
    }

Supported drivers

The following drivers are supported by Mobitru:

PlatformDriverAppium 1Appium 2
UiAutomator2Android 5.1 and higherAndroid 6.0 and higher
FlutterFlutter up to 2.8.x
Android up to 12.x
Flutter 3.7.0 and higher
Android 6.0 and higher
EspressoAndroid 7.0 and higher
XCUITestiOS 10.3 and higheriOS 12.2 and higher
FlutterFlutter up to 2.8.x
iOS up to 15.x
Flutter 3.7.0 and higher
iOS 11 and higher

Supported plugins

At the current moment, we support official Appium Images Plugin for working with performing comparision and finding elements.

Scroll to Top