maitreyoda
14 years agoNew Contributor
Error message "No signature of method"
Hi all,
I'm using Groovy for the first time and I need your help.
I was using this line in my TestStep :
<SerialNumber xsi:type="xsd:string">${#TestCase#SerialNumber}</SerialNumber>
Now I would like to truncate the value before sending it to the server, using this line :
<SerialNumber xsi:type="xsd:string">${=${#TestCase#SerialNumber}.substring(2, 5)}</SerialNumber>
But I've this kind of error in Request Message of the Step :
<SerialNumber xsi:type="xsd:string">No signature of method: java.lang.Long.substring() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [2, 5]
Possible solutions: toString(), toString(), toString(), toString(long, int)</SerialNumber>
What is bad in my request ? Is there another way to do that ?
Thanks,
maitreyoda
I'm using Groovy for the first time and I need your help.
I was using this line in my TestStep :
<SerialNumber xsi:type="xsd:string">${#TestCase#SerialNumber}</SerialNumber>
Now I would like to truncate the value before sending it to the server, using this line :
<SerialNumber xsi:type="xsd:string">${=${#TestCase#SerialNumber}.substring(2, 5)}</SerialNumber>
But I've this kind of error in Request Message of the Step :
<SerialNumber xsi:type="xsd:string">No signature of method: java.lang.Long.substring() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [2, 5]
Possible solutions: toString(), toString(), toString(), toString(long, int)</SerialNumber>
What is bad in my request ? Is there another way to do that ?
Thanks,
maitreyoda