I used Webdriver sampler and write selenium -Javascript.

Now I used org.apache.commons.io.FileUtils.writeStringToFile(new java.io.File('somefile.log'), 'some-data', 'UTF-8', true) function to write a file .

I want to save a tabular data (column & row-wise) in that file using writeStringToFile() function.

How we can achieve this?

1 Answer 1


If you want to insert a tabulation symbol - use \t escaped value

Here is an example of writing "tabular data" into JMeter log file

enter image description here

  • Actually, I want to save the file in .csv format and try to run multiple users and save result in a CSV file. so the column header is the same only row will change. How can we do this?
    – James P.
    May 20 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.