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 Tdisabled()Checks if element is disabled on the current page.default TChecks if element is visible on the current page.default Tenabled()Checks if element is not disabled on the current page.default Texists()Checks if element exist true on the current page.com.codeborne.selenide.SelenideElementdefault Tshould(com.codeborne.selenide.WebElementCondition... condition) Sequentially checks that given element meets all given conditions.default TWait until given element meets given condition (with given timeout).default TshouldBe(com.codeborne.selenide.WebElementCondition... condition) Same asshould(WebElementCondition...).default TWait until given element meets given condition (with given timeout).default TshouldHave(com.codeborne.selenide.WebElementCondition... condition) Same asshould(WebElementCondition...).default TshouldHave(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element meets given condition (with given timeout).default TshouldHaveAttribute(String name) Checks whether the given element has an attribute with given name.default TshouldHaveAttributeValue(String name, String expectedAttributeValue) Checks whether the given element has an attribute with given name and value.default TshouldHaveCss(String cssClass) Checks that element has the given CSS class.default TshouldHaveCssValue(String cssAttribute, String expectedCssValue) Checks that element has the given CSS attribute with the given value.default TshouldNot(com.codeborne.selenide.WebElementCondition... condition) Sequentially checks that given element doesn't meet given conditions.default TWait until given element doesn't meet given condition (with given timeout).default TshouldNotBe(com.codeborne.selenide.WebElementCondition... condition) Same asshouldNot(WebElementCondition...).default TshouldNotBe(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element doesn't meet given condition (with given timeout).default TshouldNotHave(com.codeborne.selenide.WebElementCondition... condition) Same asshouldNot(WebElementCondition...).default TshouldNotHave(com.codeborne.selenide.WebElementCondition condition, Duration timeout) Wait until given element doesn't meet given condition (with given timeout).default TshouldNotHaveAttribute(String name) Checks whether the given element hasn't an attribute with given name.default TshouldNotHaveAttributeValue(String name, String expectedAttributeValue) Checks whether the given element hasn't an attribute with given name and value.default TshouldNotHaveCss(String cssClass) Checks that element hasn't the given CSS class.default TshouldNotHaveCssValue(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 anyWebDriverexception happened.- Returns:
thisto call fluent API
-
displayed
Checks if element is visible on the current page. Throws an exception if element is invisible, browser is closed or anyWebDriverexception happened.- Returns:
thisto 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 anyWebDriverexception happened.- Returns:
thisto 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 anyWebDriverexception happened.- Returns:
thisto 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:
thisto 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:
thisto call fluent API- See Also:
-
shouldHave
Same asshould(WebElementCondition...). Should be used for better readability.- Parameters:
condition- conditions for checks- Returns:
thisto call fluent API
-
shouldHave
Wait until given element meets given condition (with given timeout).- Parameters:
condition- conditions for checkstimeout- timeout for checks- Returns:
thisto call fluent API- See Also:
-
shouldBe
Same asshould(WebElementCondition...). Should be used for better readability.- Parameters:
condition- conditions for checks- Returns:
thisto call fluent API
-
shouldBe
Wait until given element meets given condition (with given timeout).- Parameters:
condition- conditions for checkstimeout- timeout for checks- Returns:
thisto 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:
thisto 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:
thisto call fluent API- See Also:
-
shouldNotHave
Same asshouldNot(WebElementCondition...). Should be used for better readability.- Parameters:
condition- conditions for checks- Returns:
thisto 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:
thisto call fluent API- See Also:
-
shouldNotBe
Same asshouldNot(WebElementCondition...). Should be used for better readability.- Parameters:
condition- conditions for checks- Returns:
thisto 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:
thisto 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:
thisto 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:
thisto 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:
thisto 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:
thisto call fluent API
-
shouldHaveCss
Checks that element has the given CSS class.- Parameters:
cssClass- CSS class name to check- Returns:
thisto call fluent API
-
shouldNotHaveCss
Checks that element hasn't the given CSS class.- Parameters:
cssClass- CSS class name to check- Returns:
thisto 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:
thisto 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:
thisto call fluent API
-