Search code examples
karate

MSWebDriver fails to run in Karate


I am using Mac and installed Microsoft Edge but getting this error when I try to run the script. It works fine for Chrome, Firefox and Safari.

* configure driver = { type: mswebdriver, showDriverLog: true}


23:26:42.311 request:
1 > POST http://localhost:17556/session
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Content-Length: 55
1 > Content-Type: application/json; charset=UTF-8
1 > Host: localhost:17556
1 > User-Agent: Apache-HttpClient/4.5.12 (Java/1.8.0_242)
{"capabilities":{"alwaysMatch":{"browserName":"edge"}}}

23:26:42.321 org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), http call failed after 10 milliseconds for URL: http://localhost:17556/session
23:26:42.322 http request failed: 
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
23:26:42.323 driver config / start failed: 
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), options: {type=mswebdriver, showDriverLog=true, target=null}
shopifysg.feature:10 - driver config / start failed: 
org.apache.http.conn.HttpHostConnectException: Connect to localhost:17556 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused), options: {type=mswebdriver, showDriverLog=true, target=null}

Solution

  • This isn't there on 0.9.5 but it is in the develop branch. You should use msedgedriver, refer: https://github.com/intuit/karate/tree/develop/karate-core#driver-types

    I think it is there in 0.9.6.RC1 - so can you try that first. If not, please help us by following the developer guide, so that we can release this sooner: https://github.com/intuit/karate/wiki/Developer-Guide