Page tree
Skip to end of metadata
Go to start of metadata

This page contains all the capabilities, client commands, and tools that are supported with Appium Server (OSS).

SeeTest Client Commands

CommandLink to docs for GridSupported OSComments
installAppInstall

iOS

Android

Install the application with given package name/bundle id:

driver.installApp("cloud:com.experitest.ExperiBank/.LoginActivity")

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/.LoginActivity:releaseVersion=1.0")
driver.installApp("cloud:com.experitest.ExperiBank/.LoginActivity:buildVersion=1234")
driver.installApp("cloud:com.experitest.ExperiBank/.LoginActivity:releaseVersion=1.0:buildVersion=1234")
  • If several matching applications are found, the latest uploaded application is installed.
  • The application is installed in non-instrumented mode (instrument=false).
Android

keepData: If true, this upgrades the existing application installed without losing its data.
By default this false.

driver.installApp("cloud:com.experitest.ExperiBank/.LoginActivity:keepData=true")
reportSeeTest Client - ReportiOS

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\")");
launchWithOptionsLaunch 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));
    }
setAuthenticationReplySeeTest Client - SetAuthenticationReply(Reply, Delay) - TouchID

iOS

Android

driver.executeScript("seetest:client.setAuthenticationReply(\"Success\",10000)");
simulateCaptureSeeTest Client - SimulateCapture

iOS

Android

Works only with a URL, not local files.

driver.executeScript("seetest:client.simulateCapture(\"<url to file>\")");
PerformanceTransactionForApplication

iOS 

Android

driver.executeScript("seetest:client.startPerformanceTransactionForApllication(\"<app bundle>\",\"<NV profile>\")");
sendKeysWithBTSendKeysWithBT

iOS

Android

driver.executeScript("seetest:client.sendKeysWithBT", "" + Keys.CONTROL+ Keys.ALT + "I");
HybridClearCacheSeeTest 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");
setNetworkConnection
since 22.11
SeeTest Client - setNetworkConnectionAndroid
driver.executeScript("seetest:client.setNetworkConnection", "<MODE>", true);
getNetworkConnection
since 23.4
SeeTest Client - getNetworkConnectionAndroid
driver.executeScript("seetest:client.getNetworkConnection", "<MODE>");
addTestProperty
since 23.1
SeeTest Client - addTestProperty

iOS

Android

driver.executeScript("seetest:client.addTestProperty", propertyName, propertyValue);
setLocationPlaybackFile
since 23.3
SeeTest Client - setLocation

iOS

Android

Changes the device location according to a series of location points provided by the Csv file in order to mimic the behavior of a location movement.

- LocationProvider argument is optional, Default value is GPS.
- Note: When using this command, you need to set newCommandTimeout (Timeout Capabilities) capability with a bigger value than the command waiting time (that is set by the WaitForSetLocationEnd command).

driver.executeScript("seetest:client.setLocationPlaybackFile", "cloud:LocationCsvFile", delay, "LocationProvider");
waitForSetLocationEnd
since 23.3
SeeTest Client - setLocation

iOS

Android

Specifies the waiting time for setLocationPlaybackFile.

driver.executeScript("seetest:client.waitForSetLocationEnd", timeInMilliSec);

Capabilities

CapabilityLink to docs for GridSupported OSComments
uniqueNameApplication SetupiOS/AndroidUser can install and launch an App with a unique name.  
reportDisable (report.disable)Automated Test ReportsiOS/AndroidUse this capability in order to choose if a report would be generated.
installOnlyForUpdateApplication SetupiOS/AndroidRe-installs app only if an older version already installed on the device.
buildVersion / releaseVersion / appVersionApplication SetupiOS/AndroidInstalls and launches the app by build version/release version
instrumentAppApplication SetupiOS/AndroidInstrument the application. This is needed for extra capabilities (simulateCapture for example).
DeviceQueryDevice SetupiOS/AndroidInstead of using "udid" capability User can run queries for cloud devices.
appiumVersionCurrently 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, 1.22.3iOS/AndroidChoose the Appium Server version to be used for the execution.
releaseDeviceDevice SetupiOS/Android

Gives the capability to not release a device after performing driver.quit();

Default: 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 remains in the last left state even after ending the test.

Default: false

For iOS: In case of starting a new session, launch the app with noReset=true (from appium version 1.22.0 and above) to continue from the same state.  

commandScreenshot
iOS/Android

In Video Report, takes a screenshot also before and after every action.

Default: false

Code Examples

Replace <server> with the appropriate URL.

iOS Native Test
     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("<server>), dc);//init driver
}

    @Test
    public void Test(){
     //Your Test Goes Here
    }

    @After
    public void tearDown() {
            driver.quit();

    }
iOS Web Test
    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("<server>), dc);//init driver
}

    @Test
    public void test()
    {
		driver.get("http://www.google.com");
		//your test goes here
    }


	@After
	public void tearDown(){

	driver.quit();


}
Android Native Test
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("<server>), dc);
    }

    @Test
    public void test() {
   		//your test goes here
    }


    @After
    public void tearDownAfterAll() {
        if (driver != null) {
            driver.quit();
        }
    }
Android Web Test
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("<server>"), 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();
        }
    }





  • No labels