学习selenium时报错
1.Exception in thread “main” java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property;
-
下载浏览器驱动:chrome浏览器驱动
-
配置环境变量
-
在创建驱动之前加
System.setProperty(“webdriver.chrome.driver”,“D:/lianrongrong/driver/chromedriver_win32/chromedriver.exe”);