This page contains all the capabilities, client commands, and tools that are supported with Appium Server (OSS)
SeeTest Client Commands
Command | Link to docs for Grid | Supported OS | Comments |
---|
installApp | Install | iOS Android
| Install the application with given package name/bundle id:
driver.installApp("cloud:com.experitest.ExperiBank")
Install the application with given unique name:
driver.installApp("cloud:unqiueName=app_unique_name")
Install the application with given release version or build version or both:
driver.installApp("cloud:com.experitest.ExperiBank:releaseVersion=1.0")
driver.installApp("cloud:com.experitest.ExperiBank:buildVersion=1234")
driver.installApp("cloud:com.experitest.ExperiBank:releaseVersion=1.0:buildVersion=1234")
- If several matching applications were found, latest uploaded application will be installed.
- Application will be installed in non-instrumented mode (instrument=false).
- Application data will not be kept (keepData=false).
|
launchWithOptions | Launch with Options | iOS |
@Test
public void test(){
Map<String, Object> launchOptionsMap = new HashMap();
launchOptionsMap.put("relaunch", true);
// Create ENV vars map to pass to the application so it will run in DEBUG with a secret key
Map envVars = new HashMap();
envVars.put("secret_key", "DFSF5343543CAA");
envVars.put("DEBUG", true);
launchOptionsMap.put("launch_env",envVars);
String bundleId = "com.apple.AppStore";
//Converting Map to valid JSON for execute script
Gson gsonObj = new Gson();
String jsonStr = gsonObj.toJson(launchOptionsMap).replace("\"", "\\\"");
driver.executeScript(String.format("seetest:client.launch(\"%s\",\"%s\")", bundleId, jsonStr));
}
|
setAuthenticationReply | SeeTest Client - SetAuthenticationReply(Reply, Delay) - TouchID | iOS Android
|
driver.executeScript("seetest:client.setAuthenticationReply(\"Success\",10000)");
|
simulateCapture | SeeTest Client - SimulateCapture | iOS
Android
| Works only with URL, no local files
driver.executeScript("seetest:client.simulateCapture(\"<url to file>\")");
|
report | SeeTest Client - Report | iOS | adds a step to the generated report
//adds a passed step with message step should be passed
driver.executeScript("seetest:client.report(\"step should be passed\",\"true\")");
//adds a failed step with the message step should be failed
driver.executeScript("seetest:client.report(\"step should be failed\",\"false\")");
|
setReportStatus since 21.4 | SeeTest Client - setReportStatus | iOS, Android | Overrides the final report status
// mark as skipped
driver.executeScript("seetest:client.setReportStatus", "skipped", "Failed to assert result");
// mark as failed and send the exception message and stacktrace
driver.executeScript("seetest:client.setReportStatus", "failed", e.getMessage(), ExceptionUtils.getStackTrace(e));
|
PerformanceTransaction | Grid - Performance Transaction Commands | iOS |
driver.executeScript("seetest:client.startPerformanceTransaction(\"<NV profile>\")");
//transactions to record
driver.executeScript("seetest:client.endPerformanceTransaction(\"your transaction name\")");
|
PerformanceTransactionForApplication |
| iOS Android |
driver.executeScript("seetest:client.startPerformanceTransactionForApllication(\"<app bundle>\",\"<NV profile>\")");
|
sendKeysWithBT | SendKeysWithBT | iOS Android |
driver.executeScript("seetest:client.sendKeysWithBT", "" + Keys.CONTROL+ Keys.ALT + "I");
|
HybridClearCache | SeeTest Client - HybridClearCache | iOS Android |
driver.executeScript("seetest:client.hybridClearCache()");
|
startStepGroup since 22.7 | SeeTest Client - StartStepsGroup
| iOS Android |
driver.executeScript("seetest:client.startStepsGroup", groupName);
|
stopStepGroup since 22.7 | SeeTest Client - StopStepsGroup | iOS Android |
driver.executeScript("seetest:client.stopStepsGroup");
|
Capabilities
Capability | Link to docs for Grid | Supported OS | Comments |
---|
uniqueName | Application Setup | iOS/Android | user can install/launch an App with a unique name |
reportDisable (report.disable) | Automated Test Reports | iOS | use this capability in order to choose if a report would be generated or not |
installOnlyForUpdate | Application Setup | iOS/Android | re-installs app only if an older version already installed on the device |
buildVersion / releaseVersion / appVersion | Application Setup | iOS/Android | install/launch the app by build version/release version |
instrumentApp | Application Setup | iOS/Android | Instrument the application. needed for extra capabilities (simulateCapture for example) |
DeviceQuery | Device Setup | iOS/Android | Instead of using "udid" capability User can run queries for cloud devices. |
appiumVersion | Currently supported versions: 1.17.0-p0, 1.17.1-p0, 1.17.1-p1, 1.18.0-p0, 1.18.1-p0, 1.18.2, 1.18.3, 1.19.0, 1.19.1, 1.20.0, 1.20.1, 1.20.2, 1.21.0, 1.22.0, 1.22.1, 1.22.2 | iOS/Android | Choose the Appium Server version that will be used for the execution |
releaseDevice | Device Setup | iOS/Android | Gives the capability to not release a device after performing driver.quit();
the default value is 'true' In case the device is already reserved or uses future reservations when the test starts then releaseDevice capability will not have any effect and the device will not be released. |
dontGoHomeOnQuit |
| iOS/Android | The device will remain in the last left state even after ending the test Default: false - For iOS: in case of starting a new session after, you should launch the app with noReset=true (from appium version 1.22.0 and above) to continue from the same state.
|
commandScreenshot | https://docs.experitest.com/display/TET/SeeTest+Client+-+HybridClearCache | iOS/Android | In Video Report - will take a screenshot also before and after every action. Default: false |
Code Examples
protected AppiumDriver<MobileElement> driver = null;//driver
DesiredCapabilities dc = new DesiredCapabilities();
@Before
public void setUp() throws MalformedURLException {
//Appium Open Source Have to capabilities
dc.setCapability("testName",<Your Test Name>);//set the test name
dc.setCapability("platformName", "iOS");//set platform(iOS/Android)
dc.setCapability("deviceName", "auto");//set the device name
dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");//automation name(XCUITest for iOS)
dc.setCapability(MobileCapabilityType.APP, <Your APP>);//for install
//Experitest capabilities
dc.setCapability("accessKey", <your accessKey>);// cloud Authorization
dc.setCapability("appiumVersion", <Appium Version>);//Desired Appium version for example 1.16.0-p1
driver = new IOSDriver<IOSElement>(new URL("<Your Cloud Adress>/wd/hub"), dc);//init drive
}
@Test
public void Test(){
//Your Test Goes Here
}
@After
public void tearDown() {
driver.quit();
}
protected AppiumDriver<MobileElement> driver = null;//driver
DesiredCapabilities dc = new DesiredCapabilities();
@Before
public void setUp() throws MalformedURLException {
//Appium Open Source Have to capabilities
dc.setCapability("testName",<Your Test Name>);//set the test name
dc.setCapability("platformName", "iOS");//set platform(iOS/Android)
dc.setCapability("deviceName", "auto");//set the device name
dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");//automation name(XCUITest for iOS)
dc.setCapability(MobileCapabilityType.BROWSER_NAME, BrowserType.SAFARI);//for mobile web
//Experitest capabilities
dc.setCapability("accessKey", <your accessKey>);// cloud Authorization
dc.setCapability("appiumVersion", <Appium Version>);//Desired Appium version for example 1.16.0-p1
driver = new IOSDriver<IOSElement>(new URL("<Your Cloud Adress>/wd/hub"), dc);//init drive
}
@Test
public void test()
{
driver.get("http://www.google.com");
//your test goes here
}
@After
public void tearDown(){
driver.quit();
}
protected AppiumDriver<MobileElement> driver = null;//driver
protected DesiredCapabilities dc = new DesiredCapabilities();
private String deviceSN = <device serial number>;//device to run on
private String appiumVersion = "1.16.0-p2";//appium version to run
@Before
public void before() throws MalformedURLException {
//Appium capabilities
dc.setCapability("udid", deviceSN);
dc.setCapability("testName", <your test name>);
dc.setCapability("app","cloud:" + <app-package>);
dc.setCapability("automationName", "UiAutomator2");
dc.setCapability("platformName", "Android");
//Experitest capabilities
dc.setCapability("accessKey", <your accessKey>);// cloud Authorization
dc.setCapability("appiumVersion", appiumVersion);//Appium server version
driver = new AndroidDriver<>(new URL("<Your Cloud Adress>/wd/hub"), dc);
}
@Test
public void test() {
//your test goes here
}
@After
public void tearDownAfterAll() {
if (driver != null) {
driver.quit();
}
}
protected AppiumDriver<MobileElement> driver = null;//driver
protected DesiredCapabilities dc = new DesiredCapabilities();
private String deviceSN = <device serial number>;//device to run on
private String appiumVersion = "1.16.0-p2";//appium version to run
@Before
public void before() throws MalformedURLException {
//Appium capabilities
dc.setCapability("udid", deviceSN);
dc.setCapability("testName", <your test name>);
dc.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
dc.setCapability("automationName", "UiAutomator2");
dc.setCapability("platformName", "Android");
//Experitest capabilities
dc.setCapability("accessKey", <your accessKey>);// cloud Authorization
dc.setCapability("appiumVersion", appiumVersion);
driver = new AndroidDriver<>(new URL("<Your Cloud Adress>/wd/hub"), dc);
}
@Test
public void test() {
driver.get("https://www.experitest.com");
driver.findElement(By.id("to-about-section")).click();
driver.findElement(By.id("firstname")).sendKeys("user1");
driver.findElement(By.id("lastname")).sendKeys("last1");
driver.findElement(By.id("email")).sendKeys("myemail@company.com");
driver.findElement(By.id("password")).sendKeys("pass");
}
@After
public void tearDownAfterAll() {
if (driver != null) {
driver.quit();
}
}