bonigarcia / webdrivermanager

Automated driver management and other helper features for Selenium WebDriver in Java
https://bonigarcia.dev/webdrivermanager/
Apache License 2.0
2.58k stars 676 forks source link

Unable to launch Opera 60.0 #344

Closed veerenDev17 closed 5 years ago

veerenDev17 commented 5 years ago

Hi, I'm using opera 60, Windows 7, webdrivermanager = 3.6.0 and selenium 3.12.0. When I run the below code I'm getting following exception,

WebDriverManager.operadriver().arch64().setup(); WebDriver driver = new OperaDriver(); driver.get("https://www.google.com/");

org.openqa.selenium.WebDriverException: unknown error: cannot find Opera binary (Driver info: OperaDriver=2.45.3255 (O60),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 86 milliseconds

bonigarcia commented 5 years ago

See an example here.

veerenDev17 commented 5 years ago

Thanks for the example. I have tried the example you have provided, but still I'm getting the same exception. In my system, Opera browser installed location is available on AppData\Local\Programs\Opera\launcher.exe so, I changed operaBinary value and tried.

I checked whether normally opera is working or not. It worked when I try below code,

OperaOptions options = new OperaOptions(); options.setBinary("C:/Users/user/AppData/Loca/Programs/Opera/60.0.3255.109/opera.exe");System.setProperty("webdriver.opera.driver","path"); driver = new OperaDriver(options); driver.get("https://www.google.com/");

SaiNiranjan commented 5 years ago

@veerenDev17 May I know what is the "path" in your code ?

SaiNiranjan commented 5 years ago

I tried below code,

OperaOptions options = new OperaOptions(); options.setBinary("C:\Users\user\AppData\Local\Programs\Opera\launcher.exe"); System.setProperty("webdriver.opera.driver","C:\Users\user\source\repos\QA\Maven\BrowserDrivers\operadriver.exe"); WebDriver driver = new OperaDriver(options);

I got below exception,

org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'G5-0000044857', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '12.0.2' Driver info: driver.version: OperaDriver=v.62.0.3331.1116

veerenDev17 commented 5 years ago

Using the same code browser is instantiating but not executing the code.

pdrersin commented 5 years ago

Yes, I am having the same issue.

dima123493 commented 1 year ago

Well, it is said, "Note: The Opera driver no longer works with the latest functionality of Selenium and is currently officially unsupported." Source: Should it be considered that WebDriverManager.operadriver().setup(); is deprecated?