Selenium WebDriver 中 DesiredCapabilities 的用途是什么?
What is the use of DesiredCapabilities in Selenium WebDriver?
我们何时需要使用它以及如何使用?
When we want to use this and how?
示例的答案将不胜感激.
Answer with example would be appreciated.
推荐答案您应该阅读有关 的文档所需的能力.ChromeDriver 还有一个不同的页面.来自 Capabilities 的 Javadoc:
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.
基本上,DesiredCapabilities 帮助设置 WebDriver 的属性.如果您的本地安装与默认设置不对应,一个典型的用例是设置 FirefoxDriver 的路径.
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.
更多推荐
Selenium WebDriver 中 DesiredCapabilities 的用途是什么?
发布评论