Hey Varun, Desired Capabilities are used to configure the driver instance of Selenium WebDriver by allowing to set properties like browserName, browserVersion, Platform etc. We can configure driver instance like FirefoxDriver, ChromeDriver, InternetExplorerDriver. The setCapability() method of the DesiredCapabilities is the most commonly used method and is used to set browser properties like browser type, platform type etc. For eg.
// Create DesiredCapabilities object
DesiredCapabilities capabilities = new DesiredCapabilities();
// Set deviceName
// Set BROWSER_NAME
// Set browser VERSION
// Set platformName