1

How to use conditions if-else or ternary operator in Karate framework and determine ether feature file will continue execute a current script or break(stop) with a specified message?

I have tried a following script: At the begining of the scenario I need to start with that condition:

@maintest And def currentTime And def closingTime And def result = (currentTime < closingTime) ? call read(...@maintest) : break (and print "Store is closed) Given .... And ...

So my goal to continue the execution is condition is true and stop the execution with appropriate print message if it false. Thank you.

Donald D
  • 11
  • 1

0 Answers0