Hi,
I tried with below code and getting an error:
Code:
import java.text.SimpleDateFormat
import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus
import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
import com.eviware.soapui.support.XmlHolder
import jxl.*
import jxl.write.*
def count=0,i=1,j=1
def inputFileName,outputFileName
def testStep = testRunner.testCase.testSteps["Properties"]
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
if(prop.getName()=="outputFileName"){
outputFileName=prop.getValue()
}
}
}
Workbook old_WB=Workbook.getWorkbook(new File(outputFileName))
DateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
String filename = old_WB.split(".")[0] + df.format(new Date()) + old_WB.split(".")[1];
Error:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'java.text.SimpleDateFormat@88c7dd60' with class 'java.text.SimpleDateFormat' to class 'jxl.write.DateFormat' error at line: 18
I'm not familiar with coding. Please bear with me if there are any blunders.
Thank you in advance