Package io.jmix.masquerade
Class JSelectors
java.lang.Object
io.jmix.masquerade.JSelectors
Utility class that provides the selectors of the
SelenideElement wrappers.
Used to find SelenideElement wrappers for web-components.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTheByselector, which find a web-element by its displayed text.static classTheByselector, which finds a web-element with theUI_TEST_IDattribute equals to the simple name of the web-element's wrapper class.static classTheByselector, which find a web-element by the value of theUI_TEST_IDattribute. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.BybyChained(org.openqa.selenium.By... bys) static org.openqa.selenium.BybyDisplayedText(String displayedText) Creates and returns aByselector that finds the web-element that has display text that contains the passed value at the last position in the DOM tree.static org.openqa.selenium.BybyDisplayedText(String displayedText, int elementPosition) Creates and returns aByselector that finds the web-element that has display text that contains the passed value at the passed element position in the DOM tree (can be useful if several elements contain the same text).static org.openqa.selenium.BybyDisplayedText(String displayedText, String tagName) Creates and returns aByselector that finds the web-element that has display text that contains the passed value with the passed element tag name at the last position in the DOM tree.static org.openqa.selenium.BybyDisplayedText(String displayedText, String tagName, int elementPosition) Creates and returns aByselector that finds the web-element that has display text that contains the passed value with the passed element tag name at the passed element position in the DOM tree (can be useful if several elements contain the same text).static org.openqa.selenium.BybyJavaClassName(Class<?> clazz) Creates and returns aByselector that finds the web-element with theUI_TEST_IDattribute equals to the simple name of the web-element's wrapper class.static org.openqa.selenium.Bystatic org.openqa.selenium.BybyUiTestId(String uiTestId) Creates and returns aByselector that finds the web-element with theUI_TEST_IDattribute equals to the passed value.
-
Method Details
-
byPath
- Parameters:
uiTestIdPath- path ofUI_TEST_IDattributes to the element- Returns:
Byselector by which the web-element can be found
-
byChained
public static org.openqa.selenium.By byChained(org.openqa.selenium.By... bys) - Parameters:
bys- sequence of theByselectors by which the web-element can be found- Returns:
- chained
Byselectors - See Also:
-
ByChained
-
byJavaClassName
Creates and returns aByselector that finds the web-element with theUI_TEST_IDattribute equals to the simple name of the web-element's wrapper class.- Parameters:
clazz- target web-element wrapper class- Returns:
Byselector
-
byUiTestId
Creates and returns aByselector that finds the web-element with theUI_TEST_IDattribute equals to the passed value.- Parameters:
uiTestId-UI_TEST_IDattribute value- Returns:
Byselector
-
byDisplayedText
Creates and returns aByselector that finds the web-element that has display text that contains the passed value at the last position in the DOM tree.- Parameters:
displayedText- text that is contained in the displayed text- Returns:
Byselector
-
byDisplayedText
Creates and returns aByselector that finds the web-element that has display text that contains the passed value with the passed element tag name at the last position in the DOM tree.- Parameters:
displayedText- text that is contained in the displayed texttagName- target element tag name- Returns:
Byselector
-
byDisplayedText
Creates and returns aByselector that finds the web-element that has display text that contains the passed value at the passed element position in the DOM tree (can be useful if several elements contain the same text).- Parameters:
displayedText- text that is contained in the displayed textelementPosition- position of target element in DOM tree- Returns:
Byselector
-
byDisplayedText
public static org.openqa.selenium.By byDisplayedText(String displayedText, String tagName, int elementPosition) Creates and returns aByselector that finds the web-element that has display text that contains the passed value with the passed element tag name at the passed element position in the DOM tree (can be useful if several elements contain the same text).- Parameters:
displayedText- text that is contained in the displayed texttagName- target element tag nameelementPosition- position of target element in DOM tree- Returns:
Byselector
-