parameterization of xpath
Answers
-
Yes! Parameterization works in XPaths the same as it does elsewhere in SOAtest. For example, if you have a variable or column named "id" you would reference it as ${id}. So, in an XPath you would have /root/item[type/Id/text()="${id}"]/Price/Amount.
0 -
Ya it’s working fine and I added a assertion as well but when i am
Clicking on evaluate xpath its says no node found instead of giving value
Can you tell why i am getting that
@benken_parasoft0 -
What type of variable is "id"? If it assigned a value dynamically, like a test variable or data bank column, then the tool wouldn't be able to resolve it outside of test execution. Otherwise, a static variable like an environment variable are generally the only type of variable that can be resolved outside of test execution.
0 -
It’s static, i am taking that value from csv file but still i am getting no nodes found @benken_parasoft
0 -
Data sources are dynamically loaded at runtime. If there is an "id" column, the value would also be different depending on the row. UI fields won't resolve that type of variable automatically but the value would be resolved at runtime.
0 -
No, i am giving fixed value, i have created id column in my csv file and have given my id value and that id i am parametrizing but its not fetching while clicking on evaluate xpath
0 -
i have created id column in my csv file
This is a dynamic value. The value of "id" can be different depending on the row. The values from your CSV file will be loaded and available at runtime but not from any UI controls.
0 -
Got ii now, thank you @benken_parasoft
0