Forum Discussion
M_McDonald
15 years agoSuper Contributor
OK, see attached.
As you can see in the background, the element is empty. The actual result of the xpath is "null" but the expected result is empty (normally I would have some property that resolves to an empty string in the Expected Result field.)
I get around this possibility by using if/then/else
[tt:1rrfulbt]if(//Results[1]/ResultSet[1]/Row[1]/AGE[1]/text())
then //Results[1]/ResultSet[1]/Row[1]/AGE[1]/text()
else ""[/tt:1rrfulbt]
but I wondered if there was a simpler way to handle this (like a ternary expression) or if an "ifnull" option could be added to cover these situations.
As you can see in the background, the
I get around this possibility by using if/then/else
[tt:1rrfulbt]if(//Results[1]/ResultSet[1]/Row[1]/AGE[1]/text())
then //Results[1]/ResultSet[1]/Row[1]/AGE[1]/text()
else ""[/tt:1rrfulbt]
but I wondered if there was a simpler way to handle this (like a ternary expression) or if an "ifnull" option could be added to cover these situations.
Related Content
- 6 years ago
Recent Discussions
- 22 days ago