2013-03-14 64 views
0

在硒下載頁面,我看到了一節「硒客戶& webdriver的語言綁定」硒的webdriver - 什麼是「硒客戶端與webdriver的語言綁定」

1)什麼是語言綁定?和

2)什麼是客戶端驅動程序? (我不是從一個技術背景)

能有人請解釋硒下載頁面下面採取:(http://docs.seleniumhq.org/download/

*

爲了創建與交互的腳本Selenium服務器 (Selenium RC,Selenium Remote Webdriver)或創建本地Selenium WebDriver腳本您需要使用語言特定的客戶端 驅動程序。這些語言包括1.x和2.x風格的客戶端。雖然 存在其他語言的語言綁定,但是這些是由託管在Google代碼上的主項目支持的核心部分 。

    *

回答

1

一些文件是舊的。它來自舊的Selenium 1.x版本。 Selenium WebDriver與2.x版本(最新版本爲2.31)大不相同。 Selenium 2.x版本具有隱藏在您視圖中的綁定。您可以定義功能並啓動一個新的RemoteWebDriver,Hub + Node處理封面下的綁定。

現在,互動類似於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

0

2)什麼是客戶端驅動程序?

Selenium使用許多客戶端驅動程序java,python ....所以要使用每種編程語言都有不同的驅動程序。這只不過是我理解的JAR。