How to take screenshot and save it with a current date and time in Karate UI Automation.
How to take screenshot and save it with a current date and time in Karate UI Automation.
The screenshot() API actually returns a Java byte-array.
What you do with that byte-array is up to you. The karate.write() usage is just an example, please use some custom code if needed.
* def bytes = screenshot(false)
* def file = karate.write(bytes, 'test.png')
* print 'screenshot saved to:', file