所以我已經閱讀了所有關於在我的路徑上添加鉻綠色驅動程序的文檔,並遵循了所有這些文檔。我與selenium2,行家,日食在Mac上,所有最新的驅動程序:硒2鉻驅動程序
Error:
The path to the chromedriver executable must be set by the webdriver.chrome.driver system property;
我把chromedriver在我的應用程序文件夾,我的路徑是這樣的:
echo $PATH
/Users/tcerrato/selenium/BS_Sel_Project/auto_helper/test_scripts:/usr/local/apache-maven-2.2.1//bin:/Users/oracle/oracle/product/10.2.0/db_1/bin:/opt/local/bin:/opt/local/sbin:/Applications:
我缺少什麼?我無法使用chrome驅動程序運行。任何幫助將是偉大的我現在嘗試隨機的東西。
這裏是我的硒POM部分:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0rc2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.6.0</version>
</dependency>
工作。沒有什麼我讀的,甚至遠遠地說明了它幾乎變得簡單:)感謝 – ducati1212
如何在python中做到這一點? –
@GregGauthier根據[chromedriver的「入門」頁面),您可以在創建webdriver時指定路徑作爲(可選)參數:'driver = webdriver.Chrome('/ path/to/chromedriver')' – zpea