Package dev.comfast.cf.common.selector
Class SelectorParser
java.lang.Object
dev.comfast.cf.common.selector.SelectorParser
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic StringnormalizeChildSelector(String selector) If XPATH passed without dot like "//some/xpath" method will add it like: ".
-
Field Details
-
IS_XPATH
-
-
Method Details
-
normalizeChildSelector
If XPATH passed without dot like "//some/xpath" method will add it like: ".//some/xpath".Explanation: Nested XPATH Selectors should start with dot "./" or ".//", that means "from current node" Otherwise search will is performed from root html element, which isn't expected.
- Parameters:
selector- any selector, CSS or XPATH- Returns:
- same selector, where XPATH is normalized
-
isXpath
- Parameters:
selector- string- Returns:
- true if selector is XPATH
-