Package io.jmix.masquerade
Class JConditions
java.lang.Object
io.jmix.masquerade.JConditions
Utility class that provides the
conditions
for checks in web-elements and their wrappers.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.codeborne.selenide.WebElementCondition
Checks whether a checkbox web-element ischecked
.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in thedisabled
state.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in theenabled
state.static final com.codeborne.selenide.WebElementCondition
Checks whether a web-element exists (element can be invisible or hidden).static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in theopened
state.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in thereadonly
state.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in therequired
state.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in theselected
state.static final com.codeborne.selenide.WebElementCondition
Checks whether the web-element is in thevisible
state. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.codeborne.selenide.WebElementCondition
checkedItems
(String... checkedItems) Creates and returns acondition
that checks the checked items ofCheckboxGroup
web-element wrapper.static com.codeborne.selenide.WebElementCondition
checkedItems
(List<String> checkedItems) Creates and returns acondition
that checks the checked items ofCheckboxGroup
web-element wrapper.static com.codeborne.selenide.WebElementCondition
checkedItemsContains
(String... checkedItems) Creates and returns acondition
that checks the contained checked items ofCheckboxGroup
web-element wrapper.static com.codeborne.selenide.WebElementCondition
checkedItemsContains
(List<String> checkedItems) Creates and returns acondition
that checks the contained checked items ofCheckboxGroup
web-element wrapper.static com.codeborne.selenide.WebElementCondition
checkedItemsCount
(int count) Creates and returns acondition
that checks items count ofCheckboxGroup
web-element wrapper.static com.codeborne.selenide.WebElementCondition
Creates and returns acondition
that checks date value for web-element wrappers for components that supports date (e.g.static com.codeborne.selenide.WebElementCondition
dialogHeader
(String value) Creates and returns acondition
that checks header value forDialogWindow
web-elements wrappers.static com.codeborne.selenide.WebElementCondition
Creates and returns acondition
that checks the label value of web-element wrappers for field components.static com.codeborne.selenide.WebElementCondition
notificationMessage
(String message) static com.codeborne.selenide.WebElementCondition
notificationMessageContains
(String message) static com.codeborne.selenide.WebElementCondition
notificationPosition
(Notification.Position position) static com.codeborne.selenide.WebElementCondition
static com.codeborne.selenide.WebElementCondition
notificationTitle
(String title) static com.codeborne.selenide.WebElementCondition
notificationTitleContains
(String title) static com.codeborne.selenide.WebElementCondition
selectedItems
(String... itemsValue) Creates and returns acondition
that checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).static com.codeborne.selenide.WebElementCondition
selectedItems
(List<String> itemsValue) Creates and returns acondition
that checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).static com.codeborne.selenide.WebElementCondition
selectedItemsContains
(String... itemsValue) Creates and returns acondition
that checks the contained selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).static com.codeborne.selenide.WebElementCondition
selectedItemsContains
(List<String> itemsValue) Creates and returns acondition
that checks the contained value of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).static com.codeborne.selenide.WebElementCondition
selectedItemsCount
(int count) Creates and returns acondition
that checks the count of selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).static com.codeborne.selenide.WebElementCondition
Creates and returns acondition
that checks time value for web-element wrappers for components that supports time (e.g.static com.codeborne.selenide.WebElementCondition
Creates and returns acondition
that checks the value of web-element wrappers that can have a value.static com.codeborne.selenide.WebElementCondition
valueContains
(String value) Creates and returns acondition
that checks the contained value of web-element wrappers that can have a value.static com.codeborne.selenide.WebElementCondition
visibleItems
(String... visibleItems) Creates and returns acondition
that checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay
).static com.codeborne.selenide.WebElementCondition
visibleItems
(List<String> visibleItems) Creates and returns acondition
that checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay
).static com.codeborne.selenide.WebElementCondition
visibleItemsContains
(String... visibleItemsContains) Creates and returns acondition
that checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay
).static com.codeborne.selenide.WebElementCondition
visibleItemsContains
(List<String> visibleItemsContains) Creates and returns acondition
that checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay
).static com.codeborne.selenide.WebElementCondition
visibleItemsCount
(int count) Creates and returns acondition
that checks visible items count for overlay web-element wrappers (inheritors ofAbstractOverlay
).
-
Field Details
-
DISABLED
public static final com.codeborne.selenide.WebElementCondition DISABLEDChecks whether the web-element is in thedisabled
state. Thiscondition
can be checked by each web-element wrapper. -
ENABLED
public static final com.codeborne.selenide.WebElementCondition ENABLEDChecks whether the web-element is in theenabled
state. Thiscondition
can be checked by each web-element wrapper. -
VISIBLE
public static final com.codeborne.selenide.WebElementCondition VISIBLEChecks whether the web-element is in thevisible
state. Thiscondition
can be checked by each web-element wrapper. -
READONLY
public static final com.codeborne.selenide.WebElementCondition READONLYChecks whether the web-element is in thereadonly
state. Thiscondition
can be checked by web-element wrapper for components that have a value. -
EXIST
public static final com.codeborne.selenide.WebElementCondition EXISTChecks whether a web-element exists (element can be invisible or hidden). Thiscondition
can be checked by each web-element wrapper. -
REQUIRED
public static final com.codeborne.selenide.WebElementCondition REQUIREDChecks whether the web-element is in therequired
state. Thiscondition
can be checked by web-elements wrapper for fields. -
CHECKED
public static final com.codeborne.selenide.WebElementCondition CHECKEDChecks whether a checkbox web-element ischecked
. Thiscondition
can only be checked by checkbox-like components. -
OPENED
public static final com.codeborne.selenide.WebElementCondition OPENEDChecks whether the web-element is in theopened
state. Thiscondition
can be checked by each web-element wrapper that supports opening (e.g.Details
,Accordion.Panel
). -
SELECTED
public static final com.codeborne.selenide.WebElementCondition SELECTEDChecks whether the web-element is in theselected
state. Thiscondition
can be checked by each web-element wrapper that supports selecting (e.g.TabSheet.Tab
).
-
-
Method Details
-
notificationPosition
public static com.codeborne.selenide.WebElementCondition notificationPosition(Notification.Position position) - Parameters:
position
- expected position of theNotification
- Returns:
condition
that checks the notification position, which can be checked by theNotification
web-element wrapper
-
notificationTheme
public static com.codeborne.selenide.WebElementCondition notificationTheme(Notification.Theme theme) - Parameters:
theme
- expected theme of theNotification
- Returns:
condition
that checks notification theme, which can be checked by theNotification
web-element wrapper
-
notificationTitle
- Parameters:
title
- expected title of theNotification
- Returns:
condition
that checks the notification title, which can be checked by theNotification
web-element wrapper
-
notificationTitleContains
- Parameters:
title
- expected contained title part of theNotification
- Returns:
condition
that checks the contained title value, which can be checked by theNotification
web-element wrapper
-
notificationMessage
- Parameters:
message
- expected message of theNotification
- Returns:
condition
that checks the message, which can be checked by theNotification
web-element wrapper
-
notificationMessageContains
public static com.codeborne.selenide.WebElementCondition notificationMessageContains(String message) - Parameters:
message
- expected contained message part of theNotification
- Returns:
condition
that checks the contained message value, which can be checked by theNotification
web-element wrapper
-
selectedItems
Creates and returns acondition
that checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).- Parameters:
itemsValue
- expected selected items as a string presentation value- Returns:
condition
that checks selected items, which can be checked by the multi-select component- See Also:
-
selectedItems
Creates and returns acondition
that checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).- Parameters:
itemsValue
- list of expected selected items as a string presentation value- Returns:
condition
that checks selected items, which can be checked by the multi-select component- See Also:
-
selectedItemsContains
public static com.codeborne.selenide.WebElementCondition selectedItemsContains(String... itemsValue) Creates and returns acondition
that checks the contained selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).- Parameters:
itemsValue
- list of expected contained selected items as a string presentation value- Returns:
condition
that checks contained selected items, which can be checked by the multi-select component- See Also:
-
selectedItemsContains
public static com.codeborne.selenide.WebElementCondition selectedItemsContains(List<String> itemsValue) Creates and returns acondition
that checks the contained value of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).- Parameters:
itemsValue
- list of expected contained items value as a string presentation value- Returns:
condition
that checks contained items value, which can be checked by the multi-select component- See Also:
-
selectedItemsCount
public static com.codeborne.selenide.WebElementCondition selectedItemsCount(int count) Creates and returns acondition
that checks the count of selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox
,MultiSelectComboBoxPicker
).- Parameters:
count
- expected selected items count- Returns:
condition
that checks the selected items count, which can be checked by the multi-select component
-
checkedItems
Creates and returns acondition
that checks the checked items ofCheckboxGroup
web-element wrapper.- Parameters:
checkedItems
- expected checked items as a string presentation value- Returns:
condition
that checks the checked items, which can be checked by theCheckboxGroup
web-element wrapper- See Also:
-
checkedItems
Creates and returns acondition
that checks the checked items ofCheckboxGroup
web-element wrapper.- Parameters:
checkedItems
- list of expected checked items as a string presentation value- Returns:
condition
that checks the checked items, which can be checked by theCheckboxGroup
web-element wrapper- See Also:
-
checkedItemsContains
public static com.codeborne.selenide.WebElementCondition checkedItemsContains(String... checkedItems) Creates and returns acondition
that checks the contained checked items ofCheckboxGroup
web-element wrapper.- Parameters:
checkedItems
- expected contained checked items as a string presentation value- Returns:
condition
that checks the contained checked items, which can be checked by theCheckboxGroup
web-element wrapper- See Also:
-
checkedItemsContains
public static com.codeborne.selenide.WebElementCondition checkedItemsContains(List<String> checkedItems) Creates and returns acondition
that checks the contained checked items ofCheckboxGroup
web-element wrapper.- Parameters:
checkedItems
- list of expected contained checked items as a string presentation value- Returns:
condition
that checks the contained checked items, which can be checked by theCheckboxGroup
web-element wrapper- See Also:
-
checkedItemsCount
public static com.codeborne.selenide.WebElementCondition checkedItemsCount(int count) Creates and returns acondition
that checks items count ofCheckboxGroup
web-element wrapper.- Parameters:
count
- expected items count- Returns:
condition
that checks items count, which can be checked by theCheckboxGroup
web-element wrapper
-
value
Creates and returns acondition
that checks the value of web-element wrappers that can have a value.- Parameters:
value
- expected value as a string presentation value- Returns:
condition
that checks value, which can be checked by web-element wrapper for components that have a value
-
valueContains
Creates and returns acondition
that checks the contained value of web-element wrappers that can have a value.- Parameters:
value
- expected contained value as a string presentation value- Returns:
condition
that checks contained value, which can be checked by web-element wrapper for components that have a value
-
label
Creates and returns acondition
that checks the label value of web-element wrappers for field components.- Parameters:
label
- expected label value as a string presentation value- Returns:
condition
that checks label, which can be checked by web-element wrapper for field components
-
visibleItems
Creates and returns acondition
that checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay
).- Parameters:
visibleItems
- expected visible items as a string presentation value- Returns:
condition
that checks visible items, which can be checked by overlay web-element wrapper- See Also:
-
visibleItems
Creates and returns acondition
that checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay
).- Parameters:
visibleItems
- list of expected visible items as a string presentation value- Returns:
condition
that checks visible items, which can be checked by overlay web-element wrapper- See Also:
-
visibleItemsContains
public static com.codeborne.selenide.WebElementCondition visibleItemsContains(String... visibleItemsContains) Creates and returns acondition
that checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay
).- Parameters:
visibleItemsContains
- expected visible contained items as a string presentation value- Returns:
condition
that checks visible contained items, which can be checked by overlay web-element wrapper- See Also:
-
visibleItemsContains
public static com.codeborne.selenide.WebElementCondition visibleItemsContains(List<String> visibleItemsContains) Creates and returns acondition
that checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay
).- Parameters:
visibleItemsContains
- list of expected visible contained items as a string presentation value- Returns:
condition
that checks visible contained items, which can be checked by overlay web-element wrapper- See Also:
-
visibleItemsCount
public static com.codeborne.selenide.WebElementCondition visibleItemsCount(int count) Creates and returns acondition
that checks visible items count for overlay web-element wrappers (inheritors ofAbstractOverlay
).- Parameters:
count
- expected items count- Returns:
condition
that checks items count, which can be checked by overlay web-element wrappers (inheritors ofAbstractOverlay
)
-
dateValue
Creates and returns acondition
that checks date value for web-element wrappers for components that supports date (e.g.DatePicker
,DateTimePicker
).- Parameters:
value
- expected date value as a string presentation value- Returns:
condition
that checks date value, which can be checked by web-element wrappers for components that supports date
-
timeValue
Creates and returns acondition
that checks time value for web-element wrappers for components that supports time (e.g.TimePicker
,DateTimePicker
).- Parameters:
value
- expected time value as a string presentation value- Returns:
condition
that checks time value, which can be checked by web-element wrappers for components that supports time
-
dialogHeader
Creates and returns acondition
that checks header value forDialogWindow
web-elements wrappers.- Parameters:
value
- expected header value as a string presentation value- Returns:
condition
that checks header value, which can be checked byDialogWindow
web-element wrapper
-