Closed cuki closed 3 years ago
fwiw, this is what I'm currently getting when passing in to the grid built from trunk:
2020-07-11 12:14:33 INFO Selenium -> POST session 2020-07-11 12:14:33 INFO Selenium >>> http://127.0.0.1:4445/wd/hub/session | {"capabilities":{"firstMatch":[{"browserName":"Safari Technology Preview","platformName":"mac"}]}} 2020-07-11 12:14:34 INFO Selenium <- { "value": { "error": "session not created", "message": "Unable to create session for \u003cCreateSessionRequest with Capabilities {browserName: Safari Technology Preview, platformName: mac}>\nBuild info: version: '4.0.0-alpha-7', revision: 'b93eab6f3a*'\nSystem info: host: 'SL-1495.local', ip: '2601:1c0:5200:2640:0:0:0:89cf%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '11.0.6'\nDriver info: driver.version: unknown",
So, this boils down to the way that we configure the server. Right now, the LocalNodeFactory
is the place where things get wired up. This looks up every instance of DriverService.Builder
via ServiceLoader
. By default, the Safari implementation of this uses the regular Safari and not the Tech Preview.
We have two choices:
Function<Capabilities, WebDriver>
instead of what we're doing now.I think the second is neater, but the first is a lot easier to do :)
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.
🐛 Bug Report
According to this commit (6e09f51a5ff1debfe67e7fb1c5cbd21426c1c143) you should be able to switch between Safari and Safari Technology Preview by using the respective browser name ("Safari Technology Preview"). https://github.com/SeleniumHQ/selenium/blob/b62378814139566f6fcc4814d1243dd8b845eda0/java/client/src/org/openqa/selenium/safari/SafariOptions.java#L195
It seems whatever you specify as capabilities is discarded and reset upon creation of new
SafariOptions
instance: https://github.com/SeleniumHQ/selenium/blob/b62378814139566f6fcc4814d1243dd8b845eda0/java/client/src/org/openqa/selenium/safari/SafariOptions.java#L72-L75Simply put, it does not respect the specified
browserName
value.To Reproduce
Logs
Expected behavior
Upon specifying "Safari Technology Preview" as
browserName
when running Selenium standalone server, it should utilize the corresponding safaridriver executable located within the Technology Preview application.Environment
OS: macOS High Sierra 10.13.6 Browser: Safari Browser version: Technology Preview release 72 (12.1, 13607.1.17.1) Browser Driver version:
Language Bindings version: Standalone server 3.141.59
Additional context
As alternative there is the deprecated
safari.options.technologyPreview
(desired) capability which does work, however does not comply with W3C standard for capabilities, unlike the previously removed vendor-prefixedse:safari:techPreview
capability.This imposes a problem when using an implementation to communicate with Selenium, which has strict compliance with W3C standard (e.g. webdriverio) and/or does not allow you to specify
desiredCapabilities
different thancapabilities
.