所以我已经阅读了所有关于在我的路径上添加铬绿色驱动程序的文档,并遵循了所有这些文档。我与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