![appium android capabilities example appium android capabilities example](http://www.automationtestinghub.com/images/appium/advanced-tab-appium-desktop-3-sections.png)
When we want to customize and configure the Desired Capabilities in Selenium WebDriver for Chrome, we need to invoke the ChromeDriver session to leverage these capabilities. Public Platform setPlatform() Desired Capabilities in Selenium WebDriver for Chrome This method helps in defining the desired operating system to be used. This method helps in retrieving the details of the operating system. This method helps in defining the version of the browser or the operating system for running the tests. This method helps in retrieving the version of the browser or the operating system of the current system used for running the tests This method is used to set the name of the browser on which tests are to be executed. This method helps in retrieving the browser name of the current system.
![appium android capabilities example appium android capabilities example](https://3.bp.blogspot.com/-KyOsWGdcUWw/WcIJJlUsgkI/AAAAAAAAAbc/rHyQZVswyBE2XeGYi-D_SbLeVvtYY9FIACEwYBhgL/s1600/image068-2.png)
SetCapability :public void setCapability( key, value) SetCapability :public void setCapability( capabilityName,Platform value) SetCapability :public void setCapability( capabilityName, value) SetCapability :public void setCapability( capabilityName,boolean value) The setCapability() method has the following declarations in Java: The setCapability() method is used to declare the properties of test environments like device name, operating system name, operating system versions, browser, and browser versions. This method helps in retrieving the capabilities of the current system on which the tests are being performed. Now let us have a look at all the methods available in the DesiredCapabilities Class. Methods in DesiredCapabilities for Selenium If you are using a cloud-based online Selenium grid, then the Desired Capabilities class can also be used to perform parallel testing with Selenium or Appium, testing locally hosted web applications with Selenium, generating command-by-command screenshots, or even a video recording of the entire test automation execution over different browsers + OS configurations. We can also configure browser-specific preferences such as enabling chrome options, firefox options, testing with incognito mode or even disabling javascript, etc. But that is not all we can do using the Desired Capabilities class.
![appium android capabilities example appium android capabilities example](http://www.testingdiaries.com/wp-content/uploads/2016/10/AppiumComparison.png)
over which we perform automated browser testing using our automation scripts. Using Desired Capabilities class, we instruct the WebDriver about the environment like browser name, browser version, platform, etc. In Selenium grid when we want to run the test cases on a different browser with different operating systems and versions.In mobile application automation, where the browser properties and the device properties can be set.8.x, 9.x 10.x and so on in Android) can be set.ĭesired Capabilities are more useful in cases like: In the case of mobile automation, as we perform the tests on different varieties of mobile devices, the Mobile Platform (ex. Linux, Windows) that are used while executing the test cases. It is used to set the browser properties (Ex. It is used to perform a parallel execution on different machine configurations. The setCapability method of the DesiredCapabilities Class, can be used in Selenium Grid. The Desired Capabilities Class helps us to tell the webdriver, which environment we are going to use in our test script. The testing environment can be a web browser, Mobile device, mobile emulator, mobile simulator, etc. Desired Capabilities are needed because every Testing scenario should be executed on some specific testing environment.