Write to .txt file?

Running my script it measures the time some actions took.

I am looking for a way to save these times in a .txt file instead of using comment() or println(), to make it easier to see which steps might have too long loading times.

My first soltution was using Printstream, but it does not work if I test on the Kobiton cloud.

Thank you for any advice.

I think you could use the following solution to write log file:

import com.kms.katalon.core.logging.KeywordLogger
KeywordLogger log = new KeywordLogger()

Could you please help me with , how to copy the API response to an external text file?

Raghu Chukkala,

i use java.io.File class methods (Works with csv,txt,excel)

here is my example:

import java.io.File

f = new File(“C://Users/User/Desktop/Log.txt”)

def valueA = “testA”

f.append(valueA+ " hello")


I believe timestamps/timings for steps are captured in the execution.log. It’s quite verbose, but the information should be in there

This was very helpful for me, great short and to the point example!