Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

What is the use of DesiredCapabilities in Selenium WebDriver?

When we want to use this and how?

Answer with an example would be appreciated.

1 Answer

0 votes
by (62.9k points)

You should read the documentation about DesiredCapabilities. There is also a different page for the ChromeDriver. Javadoc from 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 use case would be to set the path for the FirefoxDriver if your local installation doesn't correspond to the default settings.

Browse Categories

...