Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
I want to truncate first few numbers in 16 digit number using xpath(databank)
Hello,
I am using data bank to retrieve a value to use in subsequent test. But I want to truncate the value and need only last 4 digits of 16 digit value.
This is the x-path
/root/card[1]/value[1]/text()
This is the result of x-path.
4506446460519412
when I press evaluate x-path , i should only get last 4 digits "9412"
can you please provide me the syntax ?
Thanks,
neil
Tagged:
0
Comments
-
substring(/root/card[1]/value[1]/text(), 13)
0 -
Hi Neil,
Try using the xpath function substring.
xpath have a variety of functions that you use. Some of those functions can be found in the comment below.
0 -
-
Thank you Benken_parasoft for your feedback
0