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 class
TheBy
selector, which find a web-element by its displayed text.static class
TheBy
selector, which finds a web-element with theUI_TEST_ID
attribute equals to the simple name of the web-element's wrapper class.static class
TheBy
selector, which find a web-element by the value of theUI_TEST_ID
attribute. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.By
byChained
(org.openqa.selenium.By... bys) static org.openqa.selenium.By
byDisplayedText
(String displayedText) Creates and returns aBy
selector 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.By
byDisplayedText
(String displayedText, int elementPosition) Creates and returns aBy
selector 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.By
byDisplayedText
(String displayedText, String tagName) Creates and returns aBy
selector 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.By
byDisplayedText
(String displayedText, String tagName, int elementPosition) Creates and returns aBy
selector 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.By
byJavaClassName
(Class<?> clazz) Creates and returns aBy
selector that finds the web-element with theUI_TEST_ID
attribute equals to the simple name of the web-element's wrapper class.static org.openqa.selenium.By
static org.openqa.selenium.By
byUiTestId
(String uiTestId) Creates and returns aBy
selector that finds the web-element with theUI_TEST_ID
attribute equals to the passed value.
-
Method Details
-
byPath
- Parameters:
uiTestIdPath
- path ofUI_TEST_ID
attributes to the element- Returns:
By
selector 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 theBy
selectors by which the web-element can be found- Returns:
- chained
By
selectors - See Also:
-
ByChained
-
byJavaClassName
Creates and returns aBy
selector that finds the web-element with theUI_TEST_ID
attribute equals to the simple name of the web-element's wrapper class.- Parameters:
clazz
- target web-element wrapper class- Returns:
By
selector
-
byUiTestId
Creates and returns aBy
selector that finds the web-element with theUI_TEST_ID
attribute equals to the passed value.- Parameters:
uiTestId
-UI_TEST_ID
attribute value- Returns:
By
selector
-
byDisplayedText
Creates and returns aBy
selector 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:
By
selector
-
byDisplayedText
Creates and returns aBy
selector 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:
By
selector
-
byDisplayedText
Creates and returns aBy
selector 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:
By
selector
-
byDisplayedText
public static org.openqa.selenium.By byDisplayedText(String displayedText, String tagName, int elementPosition) Creates and returns aBy
selector 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:
By
selector
-