Forum Discussion
ReshmaSachdev
13 years agoContributor
Hello,
There is no need to create property transfer and Run Test Case step,
rather you can store session id at testSuite level and directly use in your other test cases.
You can use following groovy to store the session id at test suite level and use wherever required.
def sessionid = context.expand( '${Login#Response#declare namespace ns=\'used in\'; //ns:Response[1]/ns1:sessionid[1]}' )
testRunner.testCase.testSuite.setPropertyValue("SessionId ",sessionid );
Hope it helps.
There is no need to create property transfer and Run Test Case step,
rather you can store session id at testSuite level and directly use in your other test cases.
You can use following groovy to store the session id at test suite level and use wherever required.
def sessionid = context.expand( '${Login#Response#declare namespace ns=\'used in\'; //ns:Response[1]/ns1:sessionid[1]}' )
testRunner.testCase.testSuite.setPropertyValue("SessionId ",sessionid );
Hope it helps.