我的代码如下:

  ChromeDriverService service = new ChromeDriverService.Builder()
 .usingChromeDriverExecutable(new File("E:\\Software\\chromedriver.exe"))
 .usingAnyFreePort().build();


它给出了以下错误:

 The method usingChromeDriverExecutable(File) is undefined for the type
 ChromeDriverService

最佳答案

更改

usingChromeDriverExecutable




usingDriverExecutable

10-01 08:10