Closed titusfortner closed 2 years ago
Do you remember if we want to deprecate first and the remove?
Deprecate in Java, remove elsewhere
@titusfortner happy enough if i rip out the Opera
classes on the python side without deprecation?
I saw the deprecation note in the java docs for selenium. Not sure how to tell Selenium Grid to use the Chrome workaround. My grid rejects the session request if I use ChromeOptions and then change 'browserName' to 'Opera'. Without that change the grid just runs the Chrome browser (when you think you've asked for Opera). BTW, this is using the dockerized grid with node-docker. Opera, Chrome, Firefox, Edge are all enabled on the grid and Opera works OK with the deprecated OperaOptions (outside of the w3c issues...).
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Caused by: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Build info: version: '4.1.3', revision: '7b1ebf28ef'
System info: host: 'test', ip: 'fe80:0:0:0:1843:95ae:fcd0:90b4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.6.5', java.version: '17.0.2'
Driver info: driver.version: RemoteWebDriver
Caused by: java.util.concurrent.TimeoutException
Grid shows this pending session: "acceptInsecureCerts":true,"acceptSslCerts":true,"browserName":"Opera","build":"opera","goog:chromeOptions":{"args":[],"excludeSwitches":["enable-automation"],"extensions":[]},"name":"alfresco_TestAddFolder.createFolder","pageLoadStrategy":"eager","screenResolution":"1272x1024","se.screenResolution":"1272x1024","se:recordVideo":true,"se:timeZone":"America/Chicago","tz":"America/Chicago"}
@ibodog To use opera:
setBinary()
method and pass in that path as a string.If not all nodes will have have both Opera & Chrome installed, then you'll need to set a custom capability in the node and also match that in capabilities https://www.selenium.dev/documentation/grid/configuration/cli_options/#setting-custom-capabilities-for-matching-specific-nodes
I think there is some additional step needed when running the dockerized grid w/node-docker since that node spins up yet another container. Here's what I get when I do everything like Chrome except add the setBinary. In the selenium/standalone-opera docker image the opera binary is located at "/usr/bin/opera". MutableCapabilities caps = new ChromeOptions(); ((ChromeOptions) caps).setBinary("/usr/bin/opera");
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. Could not start a new session. Unable to create session: Could not start a new session. Response code 500. Message: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: no chrome binary at /usr/bin/opera
If you have the opera browser at that location, you won't get that message.
@diemol is there something that I'm missing wrt the docker containers?
@ibodog the Docker image for Opera is not available for Selenium Grid 4. The one you reference was the last one created for Selenium Grid 3. So I would not expect it to work with the Dynamic Grid (node-docker
). Also, to do what @titusfortner is pointing out, you would need to have ChromeDriver available and clearly the selenium/standalone-opera
does not have it.
Probably you need to build your own Docker image with Opera using Selenium 4.
Have been using that selenium/standalone-opera image w/node-docker Selenium Grid 4 for a couple of months and only seeing the W3C non-compliance issues w/the Opera driver (most tests ran fine). Didn't notice that the image wasn't being actively maintained.
Java looks at the code getting sent and makes a guess about what you probably want to do and then tries to compensate based on the end node protocol. It mostly works so you won't notice the difference, but it has a number of issues and we're looking at removing the functionality going forward as that is going to be much easier than trying to fix it.
Python - 6b01d3518a48899f9904f96fc506e689e1047f68
.NET 6dcef3a7f8a0830e644fb366d0a556f9722fa384
Java b3f9d377d04dcefb5bfbc6fbdaffccf946bfedda
Java & Python are only deprecated, so everything is ready for 4.2 Opera will be removed in Java & Python for 4.3
This is milestoned 4.3
- @titusfortner I'll let you merge this: https://github.com/SeleniumHQ/selenium/pull/10630 i we are happy to bring it in, I think it is good for merging if you are happy, thanks! (test failures are unrelated)
Dropping C-py
as merged to trunk
Let's remove it in Java in 4.5 not 4.4
This issue is looking for contributors.
Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.
Java PR was merged a moment ago, closing.
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.
Feature and motivation
opera driver has not been updated to support w3c, so we've agreed to remove those classes.
Usage example
Ruby deleted the classes for Selenium 3 release.
Users can use Chromedriver for opera with
ChromeOptions
class andsetBinary
with the path to the Opera Browser.