- 19 Jul 2023
- 1 Minute to read
- Print
- DarkLight
Appium 2.0 Support
- Updated on 19 Jul 2023
- 1 Minute to read
- Print
- DarkLight
Overview
pcloudy now supports Appium 2.0. This is a major upgrade to the Appium framework with some exciting features. It aims to re-envision Appium as a platform by providing an independent driver ecosystem, plugin ecosystem, and removing certain old and deprecated functionality.
Supported Version
- Android 6.0 and above
- iOS 14 and above
Limitations
- Please ensure that you use Java client ver 8.0 or above
Getting Started with Appium 2.0 on pCloudy
Follow W3C standard:
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.Supported Appium 2.0.0 Capabilities
There are following kinds of capabilities in W3C standard.
- Standard W3C capabilities: Capabilities such as platformName, browserName which are part of WebDriver Protocol spec. Refer W3C webdriver capabilities guide.
- Appium vendor capabilities: These capabilities must have appium: prefixed or need to be wrapped in the appium:options object.
- pCloudy capabilities: All the pCloudy-specific Appium capabilities. These capabilities need to be written as pCloudy:options object.
For Appium 2.0 capabilities you can generate the capabilities according to your requirements and paste it in your script for execution.
Here are the sample appium capabilities for native app
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium:platformVersion",platformVersion);
capabilities.setCapability("appium:app", "pCloudyAppiumDemo.apk");
capabilities.setCapability("appium:automationName", "UiAutomator2");
capabilities.setCapability("appium:newCommandTimeout", 600);
capabilities.setCapability("appium:appPackage", "com.pcloudy.appiumdemo");
capabilities.setCapability("appium:appActivity""com.ba.mobile.LaunchActivity";
capabilities.setCapability("appium:noSign", true);
HashMap<String, Object> pcloudyOptions = new HashMap<String, Object>();
pcloudyOptions.put("appiumVersion", "2.0.0");
pcloudyOptions.put("pCloudy_Username", "test@sstsinc.com");
pcloudyOptions.put("pCloudy_ApiKey", "x92kqj***********sgdqrc2");
pcloudyOptions.put("pCloudy_DurationInMinutes", 10);
pcloudyOptions.put("pCloudy_DeviceFullName", deviceName);
pcloudyOptions.put("pCloudy_EnableDeviceLogs", true);
pcloudyOptions.put("pCloudy_EnablePerformanceData", true);
Here are the sample appium capabilities for web app
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium:newCommandTimeout", 600);
capabilities.setCapability("appium:launchTimeout", 90000);
capabilities.setCapability("appium:platformVersion", "13.0.0");
capabilities.setCapability("appium:platformName", "Android");
capabilities.setCapability("appium:automationName", "uiautomator2");
capabilities.setBrowserName("Chrome");
HashMap<String, Object> pcloudyOptions = new HashMap<String, Object>();
pcloudyOptions.put("pCloudy_Username", "test@sstsinc.com");
pcloudyOptions.put("pCloudy_ApiKey", "78jjyrh***********66");
pcloudyOptions.put("pCloudy_DurationInMinutes", 30);
pcloudyOptions.put("pCloudy_DeviceFullName", "deviceName");
pcloudyOptions.put("pCloudy_WildNet", "false");
pcloudyOptions.put("pCloudy_EnableVideo", "true");
pcloudyOptions.put("pCloudy_EnablePerformanceData", "false");
pcloudyOptions.put("pCloudy_EnableDeviceLogs", "true");
pcloudyOptions.put("appiumVersion", "2.0.0");
capabilities.setCapability("pcloudy:options", pcloudyOptions);
AndroidDriver driver = new AndroidDriver(new URL("https://device.pcloudy.com/appiumcloud/wd/hub"), capabilities);
2.1 Supported Appium driver capabilities
automationName:
- On Android, UIAutomator2, & Flutter are supported.
- On iOS, XCUITest & Flutter are supported.