galen icon indicating copy to clipboard operation
galen copied to clipboard

How to use Safari Technology Preview in Selenium Grid?

Open IrekW opened this issue 7 years ago • 9 comments

Hi, I use safari configured in Selenium Grid. The newest version however has a bug that should be corrected in the Technology Preview version. So until Apple releases new Safari I wanted to use the Preview. How can I do it using the javascript Galen? What I tried so far, without success:

  1. Adding "safari.options": { technologyPreview: true } to the node definition in grid (config passed to node as json)
  2. Adding webdriver.safari.driver="/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" as Java option when running node and in json node definition passed to node
  3. Using createGridDriver(config.hubAddress, { browser: browserName, size: size, desiredCapabilities: { "safari.options": "{ technologyPreview: true }", useTechnologyPreview: "true", technologyPreview: "true" } } )

In all above cases always the standard Safari version was started, not Technology Preview. In C# and Java Selenium there is setUseTechnologyPreview(true) that can be called but what can I do in javascript and Galen?

IrekW avatar Jul 12 '17 13:07 IrekW

@IrekW I have the same issue. I would like to see more capabilities available even running galen from the command line.

egrigolon avatar Jul 13 '17 11:07 egrigolon

seems to be related to the grid issues here, see #494

hypery2k avatar Aug 24 '17 08:08 hypery2k

Same problem here, any news?

chenry35 avatar Oct 12 '17 09:10 chenry35

Same problem here, any news?

t2hv33 avatar Dec 04 '17 02:12 t2hv33

you could setup an selenium grid and configure Safari as node

hypery2k avatar Dec 04 '17 03:12 hypery2k

you could setup an selenium grid and configure Safari as node

@hypery2k Is It Right?

Step1: Register node by -nodeConfig node.json

java -jar selenium-server-standalone-3.6.0.jar -role node -hub http://IP:4444/grid/register -nodeConfig node.json

node.json

{
  "capabilities":
  [
      {
      "browserName": "safari",
      "technologyPreview": true,
      "platform": "MAC",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 5,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://localhost:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {}
}

At galen.config

galen.browserFactory.selenium.runInGrid = true
galen.browserFactory.selenium.grid.url = http://10.190.201.16:4444/wd/hub
galen.browserFactory.selenium.grid.browser = safari
#galen.browserFactory.selenium.grid.browserVersion =
galen.browserFactory.selenium.grid.platform = MAC

t2hv33 avatar Dec 04 '17 04:12 t2hv33

https://github.com/SeleniumHQ/selenium/issues/4537#issuecomment-343899123

shashidharus avatar Feb 09 '18 19:02 shashidharus

My understanding is that you need to use Selenium Server >= 3.8.0 for this to work.

burg avatar Jan 30 '19 22:01 burg

Unfortunately, I can't confirm. I don't have access to machine with Safari anymore. If someone can confirm it, issue can be safely closed.

IrekW avatar Feb 01 '19 11:02 IrekW