无法通过 Java maven 4,0 的 selenium 测试为 Opera 浏览器提供午餐

Can't lunch opera browser with a selenium test with Java maven 4,0

  System.setProperty("webdriver.chrome.driver", "operadriver.exe");
  ChromeOptions options = new ChromeOptions();
  options.setBinary("operadriver.exe");
  DesiredCapabilities capabilities = new DesiredCapabilities();
  capabilities.setCapability(ChromeOptions.CAPABILITY, options);
  options.merge(capabilities);
  _driver = new ChromeDriver(options);

我将 operadriver.exe 放在项目主路径中,但出现此错误:

AILED 配置:@BeforeTest beforeTest org.openqa.selenium.WebDriverException:未知错误:Opera 无法启动:被杀死 (未知错误:DevToolsActivePort 文件不存在) (从 chrome 位置 operadriver.exe 开始的进程不再是 运行,所以 OperaDriver 假设 Opera 已经崩溃。) (驱动程序信息:OperaDriver=2.40 (a50783a565882ef2022bea655e8560f37ecf8afe),platform=Windows NT 6.1.7601 SP1 x86_64)(警告:服务器未提供任何堆栈跟踪信息) 命令持续时间或超时:113 毫秒 构建信息:版本:'3.14.0',修订:'aacccce0',时间:'2018-08-02T20:13:22.693Z' 系统信息:host: 'Z500W23694', ip: '10.8.79.91', os.name: 'Windows 7', os.arch: 'amd64', os.version: ' 6.1', java.version: '1.8.0_92' 驱动程序信息:driver.version:ChromeDriver

尝试使用以下代码启动 google.com 使用 operaBrowser。

    String operaBrowser = "C:\......\opera.exe"

    System.setProperty("webdriver.opera.driver", "C:\user\drivers\operadriver.exe");

    ChromeOptions options = new ChromeOptions();
    options.setBinary(operaBrowser);        

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    OperaDriver browser = new OperaDriver(capabilities);

    WebDriver driver =browser;
    driver.get("https://www.google.com/");