XPath: How to check if an attribute exists ?
To check if the attribute exixts in xpath:
The user can use a more specific expression and with [@attributeName] can get all nodes that have the attribute.
The following XPath expression can be used,
The xpath to check if an attribute that exists, it will return count of node/child which have attribute foo,