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.WebElementConditionChecks whether a checkbox web-element ischecked.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in thedisabledstate.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in theenabledstate.static final com.codeborne.selenide.WebElementConditionChecks whether a web-element exists (element can be invisible or hidden).static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in theopenedstate.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in thereadonlystate.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in therequiredstate.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in theselectedstate.static final com.codeborne.selenide.WebElementConditionChecks whether the web-element is in thevisiblestate. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.codeborne.selenide.WebElementConditioncheckedItems(String... checkedItems) Creates and returns aconditionthat checks the checked items ofCheckboxGroupweb-element wrapper.static com.codeborne.selenide.WebElementConditioncheckedItems(List<String> checkedItems) Creates and returns aconditionthat checks the checked items ofCheckboxGroupweb-element wrapper.static com.codeborne.selenide.WebElementConditioncheckedItemsContains(String... checkedItems) Creates and returns aconditionthat checks the contained checked items ofCheckboxGroupweb-element wrapper.static com.codeborne.selenide.WebElementConditioncheckedItemsContains(List<String> checkedItems) Creates and returns aconditionthat checks the contained checked items ofCheckboxGroupweb-element wrapper.static com.codeborne.selenide.WebElementConditioncheckedItemsCount(int count) Creates and returns aconditionthat checks items count ofCheckboxGroupweb-element wrapper.static com.codeborne.selenide.WebElementConditionCreates and returns aconditionthat checks date value for web-element wrappers for components that supports date (e.g.static com.codeborne.selenide.WebElementConditiondialogHeader(String value) Creates and returns aconditionthat checks header value forDialogWindowweb-elements wrappers.static com.codeborne.selenide.WebElementConditionCreates and returns aconditionthat checks the label value of web-element wrappers for field components.static com.codeborne.selenide.WebElementConditionnotificationMessage(String message) static com.codeborne.selenide.WebElementConditionnotificationMessageContains(String message) static com.codeborne.selenide.WebElementConditionnotificationPosition(Notification.Position position) static com.codeborne.selenide.WebElementConditionstatic com.codeborne.selenide.WebElementConditionnotificationTitle(String title) static com.codeborne.selenide.WebElementConditionnotificationTitleContains(String title) static com.codeborne.selenide.WebElementConditionselectedItems(String... itemsValue) Creates and returns aconditionthat checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).static com.codeborne.selenide.WebElementConditionselectedItems(List<String> itemsValue) Creates and returns aconditionthat checks the selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).static com.codeborne.selenide.WebElementConditionselectedItemsContains(String... itemsValue) Creates and returns aconditionthat checks the contained selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).static com.codeborne.selenide.WebElementConditionselectedItemsContains(List<String> itemsValue) Creates and returns aconditionthat checks the contained value of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).static com.codeborne.selenide.WebElementConditionselectedItemsCount(int count) Creates and returns aconditionthat checks the count of selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).static com.codeborne.selenide.WebElementConditionCreates and returns aconditionthat checks time value for web-element wrappers for components that supports time (e.g.static com.codeborne.selenide.WebElementConditionCreates and returns aconditionthat checks the value of web-element wrappers that can have a value.static com.codeborne.selenide.WebElementConditionvalueContains(String value) Creates and returns aconditionthat checks the contained value of web-element wrappers that can have a value.static com.codeborne.selenide.WebElementConditionvisibleItems(String... visibleItems) Creates and returns aconditionthat checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay).static com.codeborne.selenide.WebElementConditionvisibleItems(List<String> visibleItems) Creates and returns aconditionthat checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay).static com.codeborne.selenide.WebElementConditionvisibleItemsContains(String... visibleItemsContains) Creates and returns aconditionthat checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay).static com.codeborne.selenide.WebElementConditionvisibleItemsContains(List<String> visibleItemsContains) Creates and returns aconditionthat checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay).static com.codeborne.selenide.WebElementConditionvisibleItemsCount(int count) Creates and returns aconditionthat 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 thedisabledstate. Thisconditioncan be checked by each web-element wrapper. -
ENABLED
public static final com.codeborne.selenide.WebElementCondition ENABLEDChecks whether the web-element is in theenabledstate. Thisconditioncan be checked by each web-element wrapper. -
VISIBLE
public static final com.codeborne.selenide.WebElementCondition VISIBLEChecks whether the web-element is in thevisiblestate. Thisconditioncan be checked by each web-element wrapper. -
READONLY
public static final com.codeborne.selenide.WebElementCondition READONLYChecks whether the web-element is in thereadonlystate. Thisconditioncan 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). Thisconditioncan be checked by each web-element wrapper. -
REQUIRED
public static final com.codeborne.selenide.WebElementCondition REQUIREDChecks whether the web-element is in therequiredstate. Thisconditioncan be checked by web-elements wrapper for fields. -
CHECKED
public static final com.codeborne.selenide.WebElementCondition CHECKEDChecks whether a checkbox web-element ischecked. Thisconditioncan only be checked by checkbox-like components. -
OPENED
public static final com.codeborne.selenide.WebElementCondition OPENEDChecks whether the web-element is in theopenedstate. Thisconditioncan 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 theselectedstate. Thisconditioncan 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:
conditionthat checks the notification position, which can be checked by theNotificationweb-element wrapper
-
notificationTheme
public static com.codeborne.selenide.WebElementCondition notificationTheme(Notification.Theme theme) - Parameters:
theme- expected theme of theNotification- Returns:
conditionthat checks notification theme, which can be checked by theNotificationweb-element wrapper
-
notificationTitle
- Parameters:
title- expected title of theNotification- Returns:
conditionthat checks the notification title, which can be checked by theNotificationweb-element wrapper
-
notificationTitleContains
- Parameters:
title- expected contained title part of theNotification- Returns:
conditionthat checks the contained title value, which can be checked by theNotificationweb-element wrapper
-
notificationMessage
- Parameters:
message- expected message of theNotification- Returns:
conditionthat checks the message, which can be checked by theNotificationweb-element wrapper
-
notificationMessageContains
public static com.codeborne.selenide.WebElementCondition notificationMessageContains(String message) - Parameters:
message- expected contained message part of theNotification- Returns:
conditionthat checks the contained message value, which can be checked by theNotificationweb-element wrapper
-
selectedItems
Creates and returns aconditionthat 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:
conditionthat checks selected items, which can be checked by the multi-select component- See Also:
-
selectedItems
Creates and returns aconditionthat 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:
conditionthat 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 aconditionthat 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:
conditionthat 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 aconditionthat 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:
conditionthat 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 aconditionthat checks the count of selected items of multi-select components web-element wrappers (e.gMultiSelectComboBox,MultiSelectComboBoxPicker).- Parameters:
count- expected selected items count- Returns:
conditionthat checks the selected items count, which can be checked by the multi-select component
-
checkedItems
Creates and returns aconditionthat checks the checked items ofCheckboxGroupweb-element wrapper.- Parameters:
checkedItems- expected checked items as a string presentation value- Returns:
conditionthat checks the checked items, which can be checked by theCheckboxGroupweb-element wrapper- See Also:
-
checkedItems
Creates and returns aconditionthat checks the checked items ofCheckboxGroupweb-element wrapper.- Parameters:
checkedItems- list of expected checked items as a string presentation value- Returns:
conditionthat checks the checked items, which can be checked by theCheckboxGroupweb-element wrapper- See Also:
-
checkedItemsContains
public static com.codeborne.selenide.WebElementCondition checkedItemsContains(String... checkedItems) Creates and returns aconditionthat checks the contained checked items ofCheckboxGroupweb-element wrapper.- Parameters:
checkedItems- expected contained checked items as a string presentation value- Returns:
conditionthat checks the contained checked items, which can be checked by theCheckboxGroupweb-element wrapper- See Also:
-
checkedItemsContains
public static com.codeborne.selenide.WebElementCondition checkedItemsContains(List<String> checkedItems) Creates and returns aconditionthat checks the contained checked items ofCheckboxGroupweb-element wrapper.- Parameters:
checkedItems- list of expected contained checked items as a string presentation value- Returns:
conditionthat checks the contained checked items, which can be checked by theCheckboxGroupweb-element wrapper- See Also:
-
checkedItemsCount
public static com.codeborne.selenide.WebElementCondition checkedItemsCount(int count) Creates and returns aconditionthat checks items count ofCheckboxGroupweb-element wrapper.- Parameters:
count- expected items count- Returns:
conditionthat checks items count, which can be checked by theCheckboxGroupweb-element wrapper
-
value
Creates and returns aconditionthat checks the value of web-element wrappers that can have a value.- Parameters:
value- expected value as a string presentation value- Returns:
conditionthat checks value, which can be checked by web-element wrapper for components that have a value
-
valueContains
Creates and returns aconditionthat checks the contained value of web-element wrappers that can have a value.- Parameters:
value- expected contained value as a string presentation value- Returns:
conditionthat checks contained value, which can be checked by web-element wrapper for components that have a value
-
label
Creates and returns aconditionthat checks the label value of web-element wrappers for field components.- Parameters:
label- expected label value as a string presentation value- Returns:
conditionthat checks label, which can be checked by web-element wrapper for field components
-
visibleItems
Creates and returns aconditionthat checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay).- Parameters:
visibleItems- expected visible items as a string presentation value- Returns:
conditionthat checks visible items, which can be checked by overlay web-element wrapper- See Also:
-
visibleItems
Creates and returns aconditionthat checks visible items for overlay web-element wrappers (inheritors ofAbstractOverlay).- Parameters:
visibleItems- list of expected visible items as a string presentation value- Returns:
conditionthat 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 aconditionthat checks visible contained items for overlay web-element wrappers (inheritors ofAbstractOverlay).- Parameters:
visibleItemsContains- expected visible contained items as a string presentation value- Returns:
conditionthat 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 aconditionthat 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:
conditionthat 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 aconditionthat checks visible items count for overlay web-element wrappers (inheritors ofAbstractOverlay).- Parameters:
count- expected items count- Returns:
conditionthat checks items count, which can be checked by overlay web-element wrappers (inheritors ofAbstractOverlay)
-
dateValue
Creates and returns aconditionthat 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:
conditionthat checks date value, which can be checked by web-element wrappers for components that supports date
-
timeValue
Creates and returns aconditionthat 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:
conditionthat checks time value, which can be checked by web-element wrappers for components that supports time
-
dialogHeader
Creates and returns aconditionthat checks header value forDialogWindowweb-elements wrappers.- Parameters:
value- expected header value as a string presentation value- Returns:
conditionthat checks header value, which can be checked byDialogWindowweb-element wrapper
-