NoRest: Use this capability to reset the app's state before the session starts default value is false to set it to true use below command. Orientation: For Landscape or Portrait orientation use below command.
You can get the device id from iTunes by clicking on Serial Number and add it to below command. Udid: A unique device identifier which is used to identify iOS physical device. Locale: To set the locale of emulator or simulator, use below command. Language: To set the language on the simulator or emulator use below command. The default value is true check below example to set it to false: tCapability("autoLaunch","false")
tCapability("newCommandTimeout", "120") Ĭaps.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,"120") ĪutoLaunch: To launch and install app automatically use this capability.
You can change this time.Įxample: To increase or decrease the timeout use either of the below command.
NewCommandTimeout: Appium by default wait for 60 seconds for new command from the client and then it quit the session. User Safari, Chrome, Firefox for browser values.Įxample: Use either of below command tCapability("browserName", "Chrome") Ĭaps.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome")
zip file. Example: Use either of below commands for absoulte pathĮxample: Use either of below commands for HTTP URL: tCapability("app","") Ĭaps.setCapability(MobileCapabilityType.APP,"") īrowserName: To automate mobile we application, you need to specify browser name. tCapability("platformVersion","8.1") Ĭaps.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.1") ĭeviceName: This is used to define type of emulator or device we are using.Įxample: Use either of below command tCapability("deviceName", "Galaxy S7") Ĭaps.setCapability(MobileCapabilityType.DEVICE_NAME,"Galaxy S7") Īpp: This is used to add absoulte local path or remote HTTP URL of the. PlatformVersion: You can set mobile OS version using this capability.Įxample: Use either of below command. tCapability("platformName","Android") Ĭaps.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android") You can set value as iOS, Android or FirefoxOS.Įxample: Use either of below command. PlatformName: This is used to set the mobile OS platform. Selendroid is used when you want to work with SDK version less than 17 otherwise capabilities take default value as Appium.Įxample: DesiredCapabilities caps = new DesiredCapabilities() Ĭaps.setCapability("automationName","Selendroid") We need to import "import .DesiredCapabilities" library for Java to work with the desired capabilities.ĪutomationName: This capability is used to define the automation engine like Selendroid.
Desire capabilities describes the capabilities for the automation session.ĭesired capabilities help us to modify the behavior of the server while automation. To send any desired request or to maintain any desired session with the server, a set of Key and value pair is used. Desired capabilities is a JSON Object sent by a client to the server.