What is the use of DesiredCapabilities in Selenium WebDriver?
When we want to use this and how?
Answer with example would be appreciated.
You should read the documentation about DesiredCapabilities. There is also a different page for the ChromeDriver. Javadoc from Capabilities:
Capabilities
Capabilities: Describes a series of key/value pairs that encapsulate aspects of a browser.
Basically, the DesiredCapabilities help to set properties for the WebDriver. A typical usecase would be to set the path for the FirefoxDriver if your local installation doesn't correspond to the default settings.
DesiredCapabilities
FirefoxDriver
1.4m articles
1.4m replys
5 comments
57.0k users