1

I am reading and writing to files without issue, but would like to put some conditions around my tests, such as does the file exist, before attempting to move forward.

Is there anything like karate.fileExists(filename) that could be used, or would we need to call a java function or js try/catch block to build in this support.

** NOTE: Delete is just a nice to have, possibly for future use.

mike
  • 383
  • 1
  • 12

1 Answers1

0

No these are not built into Karate and you can easily call Java APIs directly. This answer may provide some hints: https://stackoverflow.com/a/65035825/143475

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