Class XPaths


  • public final class XPaths
    extends Object
    • Method Detail

      • closestAncestorWithAnyClass

        public static String closestAncestorWithAnyClass​(String... classes)
        Constructs an XPath that finds the closest ancestor element (relative to the node the XPath is applied to) that has any of the given classes. Corresponds the Browser DOM API call element.closest(".class1,.class2,...")
        Parameters:
        classes - Classes to search for.
        Returns:
        An XPath for the closest element with any of the given classes.