How can you start a mobile remote session with the project setting desired capabilities

Is there a command to start the appium driver with the current desired capabilities for the remote driver? Web and Mobile executions both have their commands to start the driver like openBrowser and startApplication but I don’t know how to start the remote execution.

Currently I have a method of getting a map of the remote desired capabilities and then setting them to a new desired capability to use in the AppiumDriverManager.createMobileDriver() command. This way works but I am hoping to avoid reading in the desired capabilities and setting it manually.

Current solution:

DesiredCapabilities capabilities = new DesiredCapabilities()
Map caps = RunConfiguration.getDriverPreferencesProperties("Remote")
capabilities = caps
AppiumDriverManager.createMobileDriver(MobileDriverType.IOS_DRIVER, capabilities, new URL("http://localhost:4723")) 

Also to note I am using remote execution because I am using appium 2.0 and I can’t get the appium server to start with the Katalon Studio mobile execution

For anyone else looking for this solution you can start an existing application on a mobile device with remote execution with the normal startApplication and the false boolean for uninstalling after execution

Mobile.startApplication(appId, false)

1 Like