Appium Capabilities

Appium Capabilities

Momentum Suite M-Live supports the latest WebDriver W3C Protocol for Appium tests. Desired Capabilities can be scripted in the WebDriver test or set within the Appium Inspector.

Automation Capabilities:

Use your favourite programming language and test framework! We support all testing frameworks that appium supports.

JavaNodeJSPythonC#RubyPHPPerl
// Use Java Client v6.0.0 or above
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> momentumOptions = new HashMap<String, Object>();
momentumOptions.put("user", "momentumUser");
momentumOptions.put("token", "momentumToken");
momentumOptions.put("gw", momentumDeviceId);
capabilities.setCapability("momentum:options", momentumOptions);
capabilities.setCapability("appium:platformName", "Android");
capabilities.setCapability("appium:automationName", "UIAutomator2");
capabilities.setCapability("appium:language", "en");
capabilities.setCapability("appium:locale", "en");
capabilities.setCapability("appium:deviceName", "");
capabilities.setCapability("appium:udid", "");
capabilities.setCapability("appium:app", "ms://momentumAppId");
capabilities.setCapability("appium:fullReset", true);
capabilities.setCapability("appium:noReset", false);
// Use Node(WebDriverIO) client v6 and above
var capabilities = {
'momentum:options' : {
"user" : "momentumUser",
"token" : "momentumToken",
"gw" : momentumDeviceId,
},
"platformName" : "android",
"appium:automationName" : "UIAutomator2",
"appium:language" : "en",
"appium:locale" : "en",
"appium:deviceName" : "",
"appium:udid" : "",
"appium:app" : "ms://momentumAppId",
"appium:fullReset" : true,
"appium:noReset" : false,
}
# Use Appium-Python-Client v0.27 or above
desired_cap = {
'momentum:options' : {
"user" : "momentumUser",
"token" : "momentumToken",
"gw" : momentumDeviceId,
},
"platformName" : "android",
"appium:automationName" : "UIAutomator2",
"appium:language" : "en",
"appium:locale" : "en",
"appium:deviceName" : "",
"appium:udid" : "",
"appium:app" : "ms://momentumAppId",
"appium:fullReset" : true,
"appium:noReset" : false,
}
// Use dot net bindings v4.0.0 or above
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> momentumOptions = new Dictionary<string, object>();
momentumOptions.Add("user", "momentumUser");
momentumOptions.Add("token", "momentumToken");
momentumOptions.Add("gw", momentumDeviceId);

capabilities.AddAdditionalCapability("momentum:options", momentumOptions);
capabilities.AddAdditionalCapability("platformName", "android");
capabilities.AddAdditionalCapability("appium:automationName", "UIAutomator2");
capabilities.AddAdditionalCapability("appium:language", "en");
capabilities.AddAdditionalCapability("appium:locale", "en");
capabilities.AddAdditionalCapability("appium:deviceName", "");
capabilities.AddAdditionalCapability("appium:udid", "");
capabilities.AddAdditionalCapability("appium:app", "ms://momentumAppId");
capabilities.AddAdditionalCapability("appium:fullReset", true);
capabilities.AddAdditionalCapability("appium:noReset", false);
# Use Ruby Client version v9.8.1 or above
capabilities = {
'momentum:options' => {
"user" => "momentumUser",
"token" => "momentumToken",
"gw" => momentumDeviceId,
},
"platformName" => "android",
"appium:automationName" => "UIAutomator2",
"appium:language" => "en",
"appium:locale" => "en",
"appium:deviceName" => "",
"appium:udid" => "",
"appium:app" => "ms://momentumAppId",
"appium:fullReset" => "true",
"appium:noReset" => "false",
}
$caps = array(
'momentum:options' => array(
"user" => "momentumUser",
"token" => "momentumToken",
"gw" => "momentumDeviceId",
),
"platformName" => "android",
"appium:automationName" => "UIAutomator2",
"appium:language" => "en",
"appium:locale" => "en",
"appium:deviceName" => "",
"appium:udid" => "",
"appium:app" => "ms://momentumAppId",
"appium:fullReset" => "true",
"appium:noReset" => "false",
)
my $extraCaps = {
	'momentum:options' => {
		"user" => "momentumUser",
		"token" => "momentumToken",
		"gw" => "momentumDeviceId",
	},
	"platformName" => "android",
	"appium:automationName" => "UIAutomator2",
	"appium:language" => "en",
	"appium:locale" => "en",
	"appium:deviceName" => "",
	"appium:udid" => "",
	"appium:app" => "ms://momentumAppId",
	"appium:fullReset" => "true",
	"appium:noReset" => "false",
}
Appium Inspector Capabilities:

Here is the all technical information about open source Appium GUI inspector for mobile apps and more.

  • Remote Host: console.momentumsuite.com
  • Remote Path: /gateway/wd/hub
  • Port: 443
  • SSL: True

JSON Representation:

AndroidiOS
{
  "appium:automationName": "UiAutomator2",
  "appium:app": "ms://<hashed-app-id>",
  "appium:udid": "",
  "appium:deviceName": "",
  "platformName": "Android",
  "momentum:options": {
    "user": "<momentum-suite-username>",
    "token": "<momentum-suite-access-key>",
    "gw": "<momentum-device-id>"
  }
}
{
  "appium:automationName": "XCUITest",
  "appium:app": "ms://<hashed-app-id>",
  "appium:udid": "",
  "appium:deviceName": "",
  "appium:remoteDebugProxy": "<momentum-gw-value>+2000",
  "platformName": "iOS",
  "momentum:options": {
    "user": "<momentum-suite-username>",
    "token": "<momentum-suite-access-key>",
    "gw": "<momentum-device-id>"
  }
}

Here is the full list of Appium Desired Capabilities.


List of client libraries with Appium server support

Language/FrameworkGithub Repo and Installation Instructions
Rubyhttps://github.com/appium/ruby_libhttps://github.com/appium/ruby_lib_core
Pythonhttps://github.com/appium/python-client
Javahttps://github.com/appium/java-client
C# (.NET)https://github.com/appium/appium-dotnet-driver
JavaScript (Node.js)https://github.com/webdriverio/webdriverio
RobotFrameworkhttps://github.com/serhatbolsu/robotframework-appiumlibrary

List of sample Appium projects

Language/FrameworkSample automation project and Github repository
Java (Maven)https://www.momentumsuite.com/docs/appium-java-testing/
JS (WebdriverIO)https://www.momentumsuite.com/docs/appium-js-testing/
Python (Pytest)https://www.momentumsuite.com/docs/appium-python-testing/
C# (Nunit)https://www.momentumsuite.com/docs/appium-csharp-c-testing/
Note:
JSON Wire Protocol is still compatible with Momentum Suite, but there will be no documentation for these old clients.

Related Posts
Leave a Reply

Your email address will not be published.