[🐛 Bug]: Opera Browser in Selenium 4 Usage
See original GitHub issueWhat happened?
2 points.
- As commit message mentioned, Selenium Deprecated Opera Support by non-W3C support [java] Add deprecated warnings to OperaDriver and OperaOptions
But as below code, Opera support W3C by additional option, so do we still need remove Opera in Selenium? JWP -->
@Test
public void operaOptionsTest() {
operaOptions = new OperaOptions();
// operaOptions.setExperimentalOption("w3c",true);
driver = new OperaDriver(operaOptions);
driver.get("https://www.bing.com/");
}
//in log --> 7月 02, 2022 12:01:49 上午 org.openqa.selenium.remote.ProtocolHandshake createSession
信息: Detected upstream dialect: OSS
W3C
@Test
public void operaOptionsTest() {
operaOptions = new OperaOptions();
operaOptions.setExperimentalOption("w3c",true);
driver = new OperaDriver(operaOptions);
driver.get("https://www.bing.com/");
} // in log --> 7月 02, 2022 12:05:22 上午 org.openqa.selenium.remote.ProtocolHandshake createSession
信息: Detected upstream dialect: W3C
reference: https://github.com/operasoftware/operachromiumdriver/issues/96#issuecomment-985291083 https://github.com/operasoftware/operachromiumdriver/issues/100#issuecomment-1134277851
- ChromeDriver doesn’t not work well with Opera As doc mentioned, it expect to work under ChromeOptions https://www.selenium.dev/documentation/webdriver/getting_started/open_browser/#opera
But throw exception on my side
@Test
public void operaWithChromeOptionsTest() {
// ChromeDriver is 102.0.5005.61
// Opera is 88 based on Chrome/102.0.5005.115
chromeOptions = new ChromeOptions();
chromeOptions.setBinary("/${OPERA_HOME}/opera.exe");
driver = new ChromeDriver(chromeOptions);
driver.get("https://www.ianzhang.cn/");
}
// org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: exited normally.
// (unknown error: DevToolsActivePort file doesn't exist)
But chromeOptions with deprecated OperaDriver is fine, (it still need work with opera driver)
@Test
public void operaWithChromeOptionsAndOperaDriverTest() {
chromeOptions = new ChromeOptions();
chromeOptions.setBinary("/${OPERA_HOME}/opera.exe");
driver = new OperaDriver(chromeOptions);
driver.get("https://www.ianzhang.cn/");
}
So, any solution if user want to work with Opera by Selenium 4?
How can we reproduce the issue?
See above
Relevant log output
See above
Operating System
Windows 11
Selenium version
4.3.0
What are the browser(s) and version(s) where you see this issue?
Opera 88 (based on Chrome 102)
What are the browser driver(s) and version(s) where you see this issue?
OperaDriver 102, ChromeDriver 102
Are you using Selenium Grid?
No
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Opera webdriver is not starting on Selenium 4 - Stack Overflow
I am trying to run the webdriver for opera browser under selenium 4. I am using webdriver-manager in my project. The webdriver-manager docs ......
Read more >Selenium4 Does Not Support Opera Browser..? - YouTube
Selenium 4 does not support opera browser where as selenium 3 does support opera browser.
Read more >What's new in Selenium 4: Key Features | BrowserStack
Selenium has been the most preferred tool suite when it comes to automated cross-browser testing of web applications.
Read more >Changes - Selenium
Native support has been removed for Opera and PhantomJS as the WebDriver implementations for these browsers are no longer under active development.
Read more >Selenium Version 4: An All-New Approach to Automated Testing
Also, the native support for Opera and PhatomJS is eliminated in Selenium 4 because there is no need for WebDriver implementations under ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Opera is “officially” no longer supported in Selenium because there is not a compatible driver for it. The chromedriver now requires things that Opera does not support and operadriver does not appear to be updated with latest w3c support. If and when this changes, we can revisit support for it in Selenium.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.