Can we use if else in XPath Constraints

1
Hi all Quick question Can we use if else in XPath Constraints as below in reference selector:   Tried but throwing some error.
asked
1 answers
5

This is actually possible with XPaths. Check the following example
 

[(($Variable > 6) and Attribute='Correct') or (Attribute='Incorrect')]

 

answered