I want to create a csv file and after it send it in the request. But, when I'm trying to do this, I'm getting an error:
class java.io.File cannot be cast to class java.lang.String (java.io.File and java.lang.String are in module java.base of loader 'bootstrap')
I'm creating file in the next way: Via JS functions generating content of the file, and after it, I'm using karate.write:
* def csvFile = karate.write(csvContent,fileName)
But, when I'm trying to send this, it's an error appears:
And multipart file files = { read: '#(csvFile)', filename: 'bulkUpload.csv', contentType: 'multipart/form-data'}
When method POST
Then status 200
class java.io.File cannot be cast to class java.lang.String (java.io.File and java.lang.String are in module java.base of loader 'bootstrap')
What I'm doing wrong?
UPD: Also, I was trying to access created file directly, but it also doesn't work, even with absolute path