Package com.codeborne.selenide.mcp
Class ElementResolver
java.lang.Object
com.codeborne.selenide.mcp.ElementResolver
Parses selector strings into Selenium
By locators.
Supported selector formats:
- CSS selectors:
#id,.class,tag.class,input[type=email] - XPath: strings starting with
//or./ - Text:
text=Sign In(exact text match) - Attribute shorthand:
data-test-id=submit,data-testid=submit,name=email
Limitation: attribute shorthand detection uses a heuristic — the part before =
must match [a-zA-Z][a-zA-Z0-9-]* and the selector must not contain [.
Complex CSS selectors with = (e.g. div>input[type=text]) are handled
correctly because they contain [, but unusual edge cases may be misidentified.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ElementResolver
public ElementResolver()
-
-
Method Details
-
resolve
-