Karate - UI Testing - When using Zalenium Safari and MSEDGE immediately error on driver/session call => no capabilities found [duplicate]

git project: https://github.com/jbart18/karate_testing

I'm trying to simplify having the main browsers (Chrome, Firefox, Edge & Safari) working via Zalenium. It seems the most simple approach and have been able to get chrome and firefox (gecko driver) running/working straight away.

The problem lies within Edge and Safari and the inability to submit capabilities in the session request.

I am running on Windows 10 professional and have been able to get tests working for: edge: through specifying the executable path and setting the webdriver session safari: running macos via VM and then specifying the executable path (a big hassle - though I will need to either debug safari issues or when needing xcode for mobile testing)

I am hoping to simplify e2e testing using zalenium. Please help. I followed "https://opensource.zalando.com/zalenium/#try-it" to get zalenium up and running

request: * configure driver = { type: 'safaridriver', start: false, webDriverUrl: 'http://localhost:4444/wd/hub'}

Error: "error": "unknown error", "message": "Error forwarding the new session cannot find : Capabilities {browserName: safari}",

However when I change the driver configuration statement"

* def session = { capabilities: { browserName: "safari" } }
* configure driver = { type: 'safaridriver', webDriverSession: '#(session)', start: false, showDriverLog: true, webDriverUrl: 'http://localhost:4444/wd/hub'}

Error:

HTTP ERROR 500

Problem accessing /wd/hub/session. Reason:

    Server Error

Caused by:

java.io.IOException: org.openqa.grid.common.exception.GridException: No capabilities found in request: {"capabilities":{"browserName":"safari"}}

I am unable to get either edge or safari via zalenium up and running. Your help is greatly appreciated.

Thanks

jbart18


I am using Edge and Safari browsers of Saucelabs through Zalenium as below.

Microsoft Edge

{type : msedgedriver, webDriverSession : {capabilities : {browserName : MicrosoftEdge}, desiredCapabilities : {browserName : MicrosoftEdge}}, start : false, webDriverUrl : https://username:password@your_zalenium_host.com/wd/hub}

Safari

{type : safaridriver, webDriverSession : {capabilities : {browserName : safari}, desiredCapabilities : {browserName : safari}}, start : false, webDriverUrl : https://username:password@your_zalenium_host.com/wd/hub}