What is the use of DesiredCapabilities in Selenium WebDriver?

后端 未结 6 2022
栀梦
栀梦 2020-11-29 04:00

What is the use of DesiredCapabilities in Selenium WebDriver?

When we want to use this and how?

Answer with example would be appreciated.

6条回答
  •  情深已故
    2020-11-29 04:37

    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 usecase would be to set the path for the FirefoxDriver if your local installation doesn't correspond to the default settings.

提交回复
热议问题