Manoj
14 years agoContributor
Passing XPATH from porperty with variable involved
Hi,
I am trying to pass the XPATH expression from a property like below in my groovy
for(i in counter..5)
{
String exp = "//Contracts/Contract[$i]/Member"
...
....
}
I want the exp to be passed from property - // exp = props.getPropertyValue("expression") (Where expression is a property with value=//Contracts/Contract[$i]/Member) , But it fails as it can not get the value of the i when brought from property.
Please let me know if anything I am doing wrong...
Thanks,
Manoj
I am trying to pass the XPATH expression from a property like below in my groovy
for(i in counter..5)
{
String exp = "//Contracts/Contract[$i]/Member"
...
....
}
I want the exp to be passed from property - // exp = props.getPropertyValue("expression") (Where expression is a property with value=//Contracts/Contract[$i]/Member) , But it fails as it can not get the value of the i when brought from property.
Please let me know if anything I am doing wrong...
Thanks,
Manoj