1

I have used karate for API, performance, UI with robot and now trying cli options.

while scripting i came across the below scenario and need few suggestion from experts of karate

I used karate.fork to navigate to different drive on my machine and tried to select a .bat file for particular app execution which didn't work as expected.

below is the sample look alike which i have used

* def command =
"""
function(line) {
  var proc = karate.fork({ redirectErrorStream: false, useShell: true, line: line });
  proc.waitSync();
  karate.set('sysOut', proc.sysOut);
  karate.set('exitCode', proc.exitCode);
}
"""
* command('cd C:/Users/testdata/exe.bat')
* command('Sender -i UXPRUN)
* command('accept NO9434')

I have to open particular .bat file and start it then send the accept command.

if this is wrong approach, could you suggest a way to achieve this

Nagaraj
  • 73
  • 4
  • this is an advanced topic and the documentation is limited. all the information you need is here, take the help of your friends if possible: https://stackoverflow.com/a/62911366/143475 – Peter Thomas May 20 '22 at 04:29

0 Answers0