Selenium WebDriver中DesiredCapabilities的用途是什么? [英] What is the use of DesiredCapabilities in Selenium WebDriver?

查看:845
本文介绍了Selenium WebDriver中DesiredCapabilities的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Selenium WebDriver中DesiredCapabilities的用途是什么?

What is the use of DesiredCapabilities in Selenium WebDriver?

何时我们要使用它以及如何使用?

When we want to use this and how?

有示例的答案.

推荐答案

您应该阅读有关的文档DesiredCapabilities . ChromeDriver 的页面也不同. Capabilities中的Javadoc:

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.

基本上,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的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆