我有此代码
public static void init(){
service = new ChromeDriverService.Builder()
.usingDriverExecutable(new File("src/test/resources/drivers/chromedriver.exe"))
.usingAnyFreePort()
.build();
driver = new ChromeDriver(service);
driver.get(URL);
}
,并且需要设置路径"src/test/resources/drivers/chromium/chrome.exe"
才能开始自动测试。
Selenium如何做到?