However Groovy language provides a class named java.util.GregocianCalendar which designed to extend the JDK and does implement the String format(String) method. Check the groovydoc:
I understand that @281558325 expected the format method provided by Groovy to be available for him/her in a script in Katalon Studio; but unfortunately he/she encountered a groovy.lang.MissingMethodException.
A month ago, there was a similar topic which reported a problem about Katalon Studio v9.7.2; an user encountered a groovy.lang.MissingMethodException for java.util.Date.format(String) method. See the following topic:
I believe that @281558325 encountered a problem that comes from the same reason as this previous topic.
A Katalon staff wrote:
I am not sure if any patch for this particular issue has been released yet.
I would rather recommend @281558325 to rewrite his/her test script so that it does NOT depend on the java.util.GregorianCalendar.format(String) method.
As of Java8, the java.time API is the standard methodology to deal with Date/Time in Java/Groovy programs. You should be able to rewrite your script to use java.time API rather than Groovy’s extension methods like format(String).
To learn the java.time API of JDK8, have a look at the following Baeldung articles:
Thank you for your enthusiastic support and assistance;
My katalon studio works greate by following @ Elly_Tran;
Add a groovy-dateutil-3.0.17.jar to “Katalon_Studio_Windows_64-9.7.2\Katalon_Studio_Windows_64-9.7.2\configuration\resources\lib”