1

Below you can see that the Karate Driver is being configured as below.After that it is trying to use the user-data-dir and then the location.How do I disable the process using --user-data-dir for Chrome executable path:

build-env_1  | 12:10:42.702 [ForkJoinPool-1-worker-1] INFO  com.intuit.karate - Karate Driver config:
build-env_1  | {
build-env_1  |   "type": "chrome",
build-env_1  |   "executable": "/usr/bin/karate_chrome_driver",
build-env_1  |   "port": 9515,
build-env_1  |   "httpConfig": {
build-env_1  |     "readTimeout": 120000
build-env_1  |   }
build-env_1  | }
build-env_1  | 12:10:42.727 [ForkJoinPool-1-worker-1] WARN  com.intuit.karate - type was null, defaulting to 'chrome'
build-env_1  | 12:10:42.754 [ForkJoinPool-1-worker-1] DEBUG com.intuit.karate.shell.Command - found / verified free local port: 9222
build-env_1  | 12:10:42.759 [chrome_1603973442746] DEBUG c.i.k.driver.chrome_1603973442746 - command: [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/usr/regression/target/chrome_1603973442746, --disable-popup-blocking]
build-env_1  | 12:10:42.762 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1603973442746 - poll attempt #0 for port to be ready - localhost:9222
build-env_1  | 12:10:42.762 [chrome_1603973442746] ERROR com.intuit.karate.shell.Command - command error: [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/usr/regression/target/chrome_1603973442746, --disable-popup-blocking] - Cannot run program "/usr/bin/google-chrome" (in directory "target/chrome_1603973442746"): error=2, No such file or directory.
ArunThomas
  • 37
  • 3

1 Answers1

0

Sorry you seem to be trying to mix Karate chrome and expect it to use a chromedriver. This is not supported. The executable should be the chrome executable itself or the default (recommended).

Also read the docs. If using chrome you can add userDataDir: null to the config so it will be not used on the command-line.

https://github.com/intuit/karate/tree/master/karate-core#configure-driver

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248