我想爲WebDriver
所以我用下面的代碼配置代理服務器設置....如何讓火狐與硒的webdriver工作在Mac OSX
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http","207.229.122.162");
profile.setPreference("network.proxy.http_port", 3128);
WebDriver driver = new FirefoxDriver(profile);
selenium = new WebDriverBackedSelenium(driver, "http://www.example.com/");
,並在文件上執行我運行後我越來越喜歡例外...
org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH.
Make sure firefox is installed. OS appears to be: MAC
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8',
java.version: '1.6.0_29'
Driver info: driver.version: FirefoxDriver
誰能幫我出關於如何以及在哪裏給路徑firefoxprofile()
WebDriver無法找到Firefox的二進制文件路徑。你確定Firefox已安裝嗎? – p0deje 2012-03-28 12:34:16
@ p0deje:當然是!並且我現在也在使用它... – Aspirant 2012-03-28 12:39:29