mpourali
9 years agoOccasional Contributor
SmartBear/SoapUI5.2.1 opensource: problem with "... No signature of method: java.io.File.exist()
Thanks, in advance.
Story: I am trying to See if a file exists on the Network drive, then Delete it.
A- I have commented out most lines to narrow down the issue.
B- I could not find a working e...
- 9 years ago
The groovy script for your goal is following:
def f = new File('//server/path/test.txt') if (f.exists()) { f.delete() }
You can use Javascript as well. SoapUI is a bit tricky with changing the scripting language. When I change from Groovy to Javascript (on project level), I can use Javascript. When I switch back to Groovy, the script is still executed as Javascript.
I had to close the test case editor and reload the project. Then the script is executed by the language which is set on the project.