Package io.jmix.masquerade.sys
Interface SelenideElementWrapper<T>
- Type Parameters:
T
- wrapper component type
- All Known Implementing Classes:
AbstractCheckbox
,AbstractComboBox
,AbstractComponent
,AbstractDetails
,AbstractDropdownComponent
,AbstractField
,AbstractMenu
,AbstractMultiSelectComboBox
,AbstractOverlay
,AbstractOverlayComponent
,AbstractSpecificConditionHandler
,AbstractTextInput
,Accordion
,Accordion.Panel
,Button
,Checkbox
,CheckboxGroup
,CodeEditor
,ComboBox
,ComboBoxOverlay
,ComboButton
,Composite
,DataGrid
,DataGrid.AbstractCell
,DataGrid.AbstractRow
,DataGrid.Cell
,DataGrid.HeaderCell
,DataGrid.HeaderRow
,DataGrid.Row
,DatePicker
,DateTimePicker
,Details
,DialogWindow
,DropdownButton
,EntityComboBox
,EntityPicker
,HorizontalMenu
,ListMenu
,MenuBarOverlay
,MultiSelectComboBox
,MultiSelectComboBoxPicker
,MultiValuePicker
,Notification
,PasswordField
,RadioButtonGroup
,Select
,SelectOverlay
,TabSheet
,TabSheet.Tab
,TextArea
,TextField
,TimePicker
,Unknown
,ValuePicker
,View
public interface SelenideElementWrapper<T>
Wrapper component for the
SelenideElement
. By default, delegates execution of standard element check methods
to the wrapped SelenideElement
.-
Method Summary
Modifier and TypeMethodDescriptiondefault T
disabled()
Checks if element is disabled on the current page.default T
Checks if element is visible on the current page.default T
enabled()
Checks if element is not disabled on the current page.default T
exists()
Checks if element exist true on the current page.com.codeborne.selenide.SelenideElement
default T
should
(com.codeborne.selenide.WebElementCondition... condition) Sequentially checks that given element meets all given conditions.default T
Wait until given element meets given condition (with given timeout).default T
shouldBe
(com.codeborne.selenide.WebElementCondition... condition) Same asshould(WebElementCondition...)
.default T
Wait until given element meets given condition (with given timeout).default T
shouldHave
(com.codeborne.selenide.WebElementCondition... condition) Same asshould(WebElementCondition...)
.default T
shouldHave
(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element meets given condition (with given timeout).default T
shouldHaveAttribute
(String name) Checks whether the given element has an attribute with given name.default T
shouldHaveAttributeValue
(String name, String expectedAttributeValue) Checks whether the given element has an attribute with given name and value.default T
shouldHaveCss
(String cssClass) Checks that element has the given CSS class.default T
shouldHaveCssValue
(String cssAttribute, String expectedCssValue) Checks that element has the given CSS attribute with the given value.default T
shouldNot
(com.codeborne.selenide.WebElementCondition... condition) Sequentially checks that given element doesn't meet given conditions.default T
Wait until given element doesn't meet given condition (with given timeout).default T
shouldNotBe
(com.codeborne.selenide.WebElementCondition... condition) Same asshouldNot(WebElementCondition...)
.default T
shouldNotBe
(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element doesn't meet given condition (with given timeout).default T
shouldNotHave
(com.codeborne.selenide.WebElementCondition... condition) Same asshouldNot(WebElementCondition...)
.default T
shouldNotHave
(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element doesn't meet given condition (with given timeout).default T
shouldNotHaveAttribute
(String name) Checks whether the given element hasn't an attribute with given name.default T
shouldNotHaveAttributeValue
(String name, String expectedAttributeValue) Checks whether the given element hasn't an attribute with given name and value.default T
shouldNotHaveCss
(String cssClass) Checks that element hasn't the given CSS class.default T
shouldNotHaveCssValue
(String cssAttribute, String expectedCssValue) Checks that element hasn't the given CSS attribute with the given value.
-
Method Details
-
getDelegate
com.codeborne.selenide.SelenideElement getDelegate()- Returns:
- original wrapped
SelenideElement
-
exists
Checks if element exist true on the current page. Throws an exception if element is not found, browser is closed or anyWebDriver
exception happened.- Returns:
this
to call fluent API
-
displayed
Checks if element is visible on the current page. Throws an exception if element is invisible, browser is closed or anyWebDriver
exception happened.- Returns:
this
to call fluent API
-
disabled
Checks if element is disabled on the current page. Throws an exception if element is not disabled, browser is closed or anyWebDriver
exception happened.- Returns:
this
to call fluent API
-
enabled
Checks if element is not disabled on the current page. Throws an exception if element is disabled, browser is closed or anyWebDriver
exception happened.- Returns:
this
to call fluent API
-
should
Sequentially checks that given element meets all given conditions.NOTE: If element doesn't match then conditions immediately, waits up to 4 seconds until element meets the conditions. It's extremely useful for dynamic content.
- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API- See Also:
-
should
Wait until given element meets given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldHave
Same asshould(WebElementCondition...)
. Should be used for better readability.- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API
-
shouldHave
Wait until given element meets given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldBe
Same asshould(WebElementCondition...)
. Should be used for better readability.- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API
-
shouldBe
Wait until given element meets given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldNot
Sequentially checks that given element doesn't meet given conditions.NOTE: If element doesn't match then conditions immediately, waits up to 4 seconds until element meets the conditions. It's extremely useful for dynamic content.
- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API- See Also:
-
shouldNot
Wait until given element doesn't meet given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldNotHave
Same asshouldNot(WebElementCondition...)
. Should be used for better readability.- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API
-
shouldNotHave
Wait until given element doesn't meet given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldNotBe
Same asshouldNot(WebElementCondition...)
. Should be used for better readability.- Parameters:
condition
- conditions for checks- Returns:
this
to call fluent API
-
shouldNotBe
Wait until given element doesn't meet given condition (with given timeout).- Parameters:
condition
- conditions for checkstimeout
- timeout for checks- Returns:
this
to call fluent API- See Also:
-
shouldHaveAttribute
Checks whether the given element has an attribute with given name.- Parameters:
name
- name of the attribute to check- Returns:
this
to call fluent API
-
shouldNotHaveAttribute
Checks whether the given element hasn't an attribute with given name.- Parameters:
name
- name of the attribute to check- Returns:
this
to call fluent API
-
shouldHaveAttributeValue
Checks whether the given element has an attribute with given name and value.- Parameters:
name
- name of the attribute to checkexpectedAttributeValue
- value of the attribute to check- Returns:
this
to call fluent API
-
shouldNotHaveAttributeValue
Checks whether the given element hasn't an attribute with given name and value.- Parameters:
name
- name of the attribute to checkexpectedAttributeValue
- value of the attribute to check- Returns:
this
to call fluent API
-
shouldHaveCss
Checks that element has the given CSS class.- Parameters:
cssClass
- CSS class name to check- Returns:
this
to call fluent API
-
shouldNotHaveCss
Checks that element hasn't the given CSS class.- Parameters:
cssClass
- CSS class name to check- Returns:
this
to call fluent API
-
shouldHaveCssValue
Checks that element has the given CSS attribute with the given value.- Parameters:
cssAttribute
- CSS attribute name to checkexpectedCssValue
- expected value of the CSS attribute- Returns:
this
to call fluent API
-
shouldNotHaveCssValue
Checks that element hasn't the given CSS attribute with the given value.- Parameters:
cssAttribute
- CSS attribute name to checkexpectedCssValue
- expected value of the CSS attribute- Returns:
this
to call fluent API
-