Defines an IF conditional statement looking for node(s) on a web page.

The IfXpathExists statement is one of the HTML transaction conditional statements. It conditionally executes a block of statements, depending on the fulfillment of a condition expression. In other words, if the condition is fulfilled, child statements are executed.
The condition is the existence in the current web page of nodes matching the XPath defined through the XPath property.
Note: In Convertigo Studio, when an IfXpathExists statement is created in a handler, it can be easily replaced by an IfXpathExistsThenElse, using the right-click menu on the statement and choosing the option Change to > IfXpathExistsThenElse. The XPath property remains the same and the statements present in the IfXpathExists are moved to the Then sub-statement.

Property Type Category Description
Comment String standard Describes the object comment to include in the documentation report.
This property generally contains an explanation about the object.
Is active boolean standard Defines whether the statement is active.
XPath JS expression standard Defines the XPath expression to test.
This property is a JavaScript expression that is evaluated during the transaction execution as an XPath.
The execution of this XPath on the web page DOM is used as a condition in order to decide whether to execute or not the child statements:

true if one or several nodes are matching the XPath,
false if no node matches.