Mac下,eclipse初始化chrome浏览器driver的写法

WebDriver driver;

System.setProperty("webdriver.chrome.driver","/Users/gehongna/appium/chromedriver");

driver = new ChromeDriver();

driver.get("http://www.baidu.com");


System.setProperty("webdriver.chrome.driver","/Users/gehongna/appium/chromedriver")这一行,我把Chrome driver驱动程序放在了项目的一个driver文件夹下,然后改写为System.setProperty("webdriver.chrome.driver","driver/chromedriver")报错,

The driver is not executable: /Users/gehongna/workspace/Demo1/driver/chromedriver


不可以这样写吗?



你可能感兴趣的:(Mac下,eclipse初始化chrome浏览器driver的写法)