Forum Discussion
darshan
16 years agoNew Contributor
1) Set the Property in the property file.
2) Next write a Property Transfer from the property to the request.
3) After this write a groovy script to to read from the Property file and change the property.
This can be done as follows:
def request = testRunner.testCase.getTestStepByName( "activateRequest" );
def property = request.getProperty( "request" );
//get the property value from the Property file
def props = testRunner.testCase.getTestStepByName("Properties");
String sNo = props.getPropertyValue("sNo");
Here sNo is the name of the property set.
4)Use XPATH to navigate the XML file.
use this command..its powerful..
//sNo/text()
2) Next write a Property Transfer from the property to the request.
3) After this write a groovy script to to read from the Property file and change the property.
This can be done as follows:
def request = testRunner.testCase.getTestStepByName( "activateRequest" );
def property = request.getProperty( "request" );
//get the property value from the Property file
def props = testRunner.testCase.getTestStepByName("Properties");
String sNo = props.getPropertyValue("sNo");
Here sNo is the name of the property set.
4)Use XPATH to navigate the XML file.
use this command..its powerful..
//sNo/text()
Related Content
Recent Discussions
- 15 hours agoruchisingh