答案 0 :(得分:0)
尝试指定Opera启动器二进制文件的路径:
String operaBinary = "C:\\Program Files\\Opera\\launcher.exe"; // If Windows
WebDriverManager.operadriver().setup();
OperaOptions options = new OperaOptions();
options.setBinary(operaBinary);
WebDriver driver = new OperaDriver(options);
// ...