sirba01
15 years agoOccasional Contributor
How to convert to String in Groovy
Hi All,
i am trying to call a method from my call with String as an argument, it is failing that states You need to pass the string.
Here is my program, s will get the session ID from my Java program.
can you please suggest what i am doing wrong here?
import tools.Client
class setSessionID {
static void main(args) {
def a = new Client()
String s = a.testclient("vnet01", "8081")
callTestCase(s)
}
void callTestCase(String s){
def targetstep = testRunner.testCase.getTestStepByName("GetAllUsers")
def targetCase = targetstep.getTestCase()
targetCase.setPropertyValue("setID", s)
}
}
i am trying to call a method from my call with String as an argument, it is failing that states You need to pass the string.
Here is my program, s will get the session ID from my Java program.
can you please suggest what i am doing wrong here?
import tools.Client
class setSessionID {
static void main(args) {
def a = new Client()
String s = a.testclient("vnet01", "8081")
callTestCase(s)
}
void callTestCase(String s){
def targetstep = testRunner.testCase.getTestStepByName("GetAllUsers")
def targetCase = targetstep.getTestCase()
targetCase.setPropertyValue("setID", s)
}
}