How to use quit() function in karate?

Viewed 181

I have seen one commend quit() and its description say like "unless the driver instance was created before entering the Scenario". Is it possible for you to brief me more about this line. As bit confused here.

1 Answers

This quit() is only for advanced users who want to close the browser and start one during a test, which is not recommended, so you can assume that it does not exist.

What the documentation means is that

  • when you call a feature
  • and the browser has already been started
  • when that called feature completes
  • the browser will NOT be closed
  • whereas the normal behavior is that when a Scenario completes, the browser will be closed
Related