1

The compiler is looking target folder for the chrome.exe file. In which it is looking for some chrome_1639142447236 file. Actually it is available at C:\Program Files (x86)\Google\Chrome\Application this location. Below error message I'm getting:

18:51:39.096 [ForkJoinPool-1-worker-3] ERROR com.intuit.karate - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information, http call failed after 4022 milliseconds for URL: http://localhost:9222 18:51:39.098 [ForkJoinPool-1-worker-3] ERROR com.intuit.karate - http request failed:

Below is the feature level error message:

failed features: src.test.java.examples.users.Sample: Sample.feature:9

  • driver config / start failed: org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information, options: {type=chrome, target=null}
Jackdaw
  • 7,626
  • 5
  • 15
  • 33
jamp ani
  • 11
  • 2

1 Answers1

0

If you know where the chrome executable is, please follow the instructions to customize it in your Karate tests: https://github.com/karatelabs/karate/tree/master/karate-core#configure-driver

* configure driver = { type: 'chrome', executable: 'chrome' }

Also read this answer for even more details: https://stackoverflow.com/a/66762430/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • tried above solution it worked. I was able to launch the browser. But it was not executing scenario. The browser is just opened for few seconds and closed. Showing below error message. driver config / start failed: chrome server returned empty list from http://localhost:9222, options: {executable=C:\Program Files\Google\Chrome\Application\chrome.exe, target=null, type=chrome} am i missing something here – jamp ani Dec 13 '21 at 14:02
  • no idea. ui automation is not easy, so all the best – Peter Thomas Dec 13 '21 at 17:15
  • @PeterThomas: Can u please tell me how to Launch Chrome browser in incognito mode * configure driver = { type: 'chrome', showDriverLog: false, headless: true} This is just launching the chrome, please help me am searching this solution across forums and not getting it please help – Dinesh Tejaj Dec 13 '22 at 12:59
  • @DineshTejaj I really don't know. you can read this and contribute your findings back to the community. this needs research: https://github.com/karatelabs/karate/issues/1935 – Peter Thomas Dec 13 '22 at 13:08
  • @PeterThomas : i got some reference from internet * configure driver = { type: 'chrome', options: { args: ['--incognito'] } } Even this is not launching, can u have a look my question is simp;e how to launch a chrome browser in incognito mode? can u help – Dinesh Tejaj Dec 14 '22 at 14:20