java - Selenium WebDriver - 什么是 "Selenium Client & WebDriver Language Bindings"

标签 java selenium selenium-webdriver language-binding

在 selenium 下载页面中,我看到“Selenium 客户端和 WebDriver 语言绑定(bind)”部分

1) 什么是语言绑定(bind)?和

2) 什么是客户端驱动程序? (我不是技术出身的)

有人可以解释一下取自 selenium 下载页面的以下内容吗:( http://docs.seleniumhq.org/download/ )

*

In order to create scripts that interact with the Selenium Server (Selenium RC, Selenium Remote Webdriver) or create local Selenium WebDriver script you need to make use of language-specific client drivers. These languages include both 1.x and 2.x style clients. While language bindings for other languages exist, these are the core ones that are supported by the main project hosted on google code.

    *

最佳答案

其中一些文档已经过时了。它来自旧的 Selenium 1.x 版本。 Selenium WebDriver 现在有很大不同,有 2.x 版本(最新的是 2.31)。 Selenium 2.x 版本的绑定(bind)在您的 View 中隐藏。您定义功能并启动一个新的 RemoteWebDriver,然后 Hub+Node 会在幕后处理绑定(bind)。

现在,要进行类似于 RC 的交互,您需要:

  1.  To start a Grid Hub on port 4444
  2.  Start 1 Node Hub on port 5555 on either your local machine or a remote machine.  It has configuration that tells it how to connect to the Hub.
  3.  In your script, start a new client using:

 URL hubURL = new URL("127.0.0.1:4444"); // always use IP address
 DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
 RemoteWebDriver driver = new RemoteWebDriver(new URL(hubURL), capability);

I have an example project you can try here .

关于java - Selenium WebDriver - 什么是 "Selenium Client & WebDriver Language Bindings",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15414747/

相关文章:

Java MySQL IndexOutOfBounds 错误

angularjs - Protractor :WAITING规范完成 10000 毫秒后超时

html - 如何为 Junit 结果生成 HTML 报告?

C# selenium 对远程 Web 驱动程序服务器的 URL 的 HTTP 请求在 60 秒后超时

javascript - 如何使用 Selenium 执行网站脚本中定义的 JavaScript 函数?

java - 如何使用 Java 验证 Selenium WebDriver 中的 tooltipText

java - 如何从不同的类获取文本文件的输入

java - 如何将阔叶百里香切换到 angularjs ui

css - 为什么在使用concat()时此Selenium XPath表达式无法返回结果?

java - 尝试写入文件夹时出现 "java.nio.file.AccessDeniedException"