![](/img/trans.png)
[英]How to parallelize instances of selenium webdriver with java bindings?
[英]Selenium WebDriver - What is “Selenium Client & WebDriver Language Bindings”
在selenium下載頁面中,我看到了“ Selenium Client和WebDriver語言綁定”部分。
1)什么是語言綁定? 和
2)什么是客戶端驅動程序? (我不是來自技術背景)
有人可以解釋一下從硒下載頁面獲取的以下內容:( http://docs.seleniumhq.org/download/ )
*
為了創建與Selenium服務器交互的腳本(Selenium RC,Selenium遠程Webdriver)或創建本地Selenium WebDriver腳本,您需要使用特定於語言的客戶端驅動程序。 這些語言包括1.x和2.x樣式的客戶端。 雖然存在其他語言的語言綁定,但這些是Google代碼上托管的主項目支持的核心綁定。
該文檔有些過時了。 它來自舊的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);
2)什么是客戶端驅動程序?
Selenium使用許多客戶端驅動程序java,python ....,因此要使用每種編程語言,都有一個不同的驅動程序。在我的理解中,這不過是一個JAR。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.