Launching opera in new versions of selenium 4.4

70 Views Asked by At

I am trying to launch opera browser in a newer version of selenium 4.4. But at the moment I could not find a solution. Is it possible to use WebDriverManager.operadriver().setup() to get a driver?

At the moment, the implementation is working with specifying the path to the drive

private WebDriver createOperaDriver() {
    System.setProperty("webdriver.opera.driver", "C:\\Users\\anser\\operadriver.exe");
    OperaOptions options = new OperaOptions();
    options.addArguments("-start-maximized");
    return new OperaDriver(options);
  }

But is there a solution to not specify the let before the driver, but use only WebDriverManager.operadriver().setup()?

if you do not specify the path to the file, I get an error

java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.opera.driver system property; for more information, see https://github.com/operasoftware/operachromiumdriver. The latest version can be downloaded from https://github.com/operasoftware/operachromiumdriver/releases
0

There are 0 best solutions below