Class MuiComponents
- java.lang.Object
-
- com.github.grossopa.selenium.core.component.AbstractComponents
-
- com.github.grossopa.selenium.component.mui.MuiComponents
-
- All Implemented Interfaces:
com.github.grossopa.selenium.core.component.Components
public class MuiComponents extends com.github.grossopa.selenium.core.component.AbstractComponentsContains the definition of Material UI components.- Since:
- 1.0
- Author:
- Jack Yin
-
-
Constructor Summary
Constructors Constructor Description MuiComponents()Constructs an instance with defaultMuiConfig.MuiComponents(MuiConfig config)Constructs an instance with providedMuiConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MuiComponentsmui()Creates an instance ofMuiComponentswith defaultMuiConfig.static MuiComponentsmui(MuiConfig config)Creates an instance ofMuiComponentswith givenMuiConfig.MuiAccordiontoAccordion()Wraps the currentWebComponenttoMuiAccordion.MuiAppBartoAppBar()Wraps the currentWebComponenttoMuiAppBar.MuiAutocompletetoAutocomplete()Wraps the currentWebComponenttoMuiAutocomplete.MuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocatorMuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator, MuiAutocompleteTagLocators tagLocators)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocatorMuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator, MuiAutocompleteTagLocators tagLocators, OpenOptionsAction openOptionsAction, CloseOptionsAction closeOptionsAction)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocatorMuiAvatartoAvatar()Wraps the currentWebComponenttoMuiAvatar.MuiBackdroptoBackdrop()Wraps the currentWebComponenttoMuiBackdrop.MuiBadgetoBadge()Wraps the currentWebComponenttoMuiBadge.MuiBottomNavigationtoBottomNavigation()Wraps the currentWebComponenttoMuiBottomNavigation.MuiBreadcrumbstoBreadcrumbs()Wraps the currentWebComponenttoMuiBreadcrumbs.MuiButtontoButton()Wraps the currentWebComponenttoMuiButtoninstance.MuiButtonGrouptoButtonGroup()Wraps the currentWebComponenttoMuiButtonGroupinstance.MuiCheckboxtoCheckbox()Wraps the currentWebComponenttoMuiCheckboxinstance.MuiChiptoChip()Wraps the currentWebComponenttoMuiChip.MuiDialogtoDialog()Wraps the currentWebComponenttoMuiDialog.MuiDividertoDivider()Wraps the currentWebComponenttoMuiDivider.MuiFabtoFab()Wraps the currentWebComponenttoMuiFabinstance.MuiLinktoLink()Wraps the currentWebComponenttoMuiLink.MuiListtoList()Wraps the currentWebComponenttoMuiList.MuiListItemtoListItem()Wraps the currentWebComponenttoMuiListItem.MuiMenutoMenu()Wraps the currentWebComponenttoMuiMenu.MuiPagertoPager()Wraps the currentWebComponenttoMuiPager.MuiPaginationtoPagination()Wraps the currentWebComponenttoMuiPagination.MuiPaginationtoPagination(MuiPaginationLocators locators)Wraps the currentWebComponenttoMuiPaginationwith customized button locatorsMuiPickersDialogtoPickersDialog()Wraps the currentWebComponenttoMuiPickersDialog.MuiRadiotoRadio()Wraps the currentWebComponenttoMuiRadio.MuiRadioGrouptoRadioGroup()Wraps the currentWebComponenttoMuiRadio.MuiSelecttoSelect(org.openqa.selenium.By optionLocator)Wraps the currentWebComponenttoMuiSelectinstance.MuiSelecttoSelect(org.openqa.selenium.By optionLocator, String optionValueAttribute)Wraps the currentWebComponenttoMuiSelectinstance.MuiSlidertoSlider()Wraps the currentWebComponenttoMuiSliderinstance.MuiSlidertoSlider(java.util.function.UnaryOperator<Double> inverseScaleFunction)Wraps the currentWebComponenttoMuiSliderinstance with scale function configured.MuiSnackbartoSnackbar()Wraps the currentWebComponenttoMuiSnackbar.MuiSnackbartoSnackbar(long autoHideDuration)Wraps the currentWebComponenttoMuiSnackbar.MuiSwitchtoSwitch()Wraps the currentWebComponenttoMuiSwitch.MuiTabstoTabs()Wraps the currentWebComponenttoMuiTabs.MuiTextFieldtoTextField()Wraps the currentWebComponenttoMuiTextField.
-
-
-
Method Detail
-
mui
public static MuiComponents mui()
Creates an instance ofMuiComponentswith defaultMuiConfig.- Returns:
- the newly created instance with default
MuiConfig.
-
mui
public static MuiComponents mui(MuiConfig config)
Creates an instance ofMuiComponentswith givenMuiConfig.- Parameters:
config- the config instance- Returns:
- the instance of
MuiComponentswith givenMuiConfig.
-
toButton
public MuiButton toButton()
Wraps the currentWebComponenttoMuiButtoninstance.- Returns:
- wrapped
MuiButtoninstance on the given component
-
toFab
public MuiFab toFab()
Wraps the currentWebComponenttoMuiFabinstance.- Returns:
- wrapped
MuiFabinstance on the given component
-
toButtonGroup
public MuiButtonGroup toButtonGroup()
Wraps the currentWebComponenttoMuiButtonGroupinstance.- Returns:
- wrapped
MuiButtonGroupinstance on the given component
-
toCheckbox
public MuiCheckbox toCheckbox()
Wraps the currentWebComponenttoMuiCheckboxinstance.- Returns:
- wrapped
MuiCheckboxinstance on the given component
-
toSelect
public MuiSelect toSelect(org.openqa.selenium.By optionLocator)
Wraps the currentWebComponenttoMuiSelectinstance.- Parameters:
optionLocator- the locator for locating the options (NOTE: it is the option element NOT the option container)- Returns:
- wrapped
MuiSelectinstance on the given component
-
toSelect
public MuiSelect toSelect(org.openqa.selenium.By optionLocator, String optionValueAttribute)
Wraps the currentWebComponenttoMuiSelectinstance.- Parameters:
optionLocator- the locator for locating the options (NOTE: it is the option element NOT the option container)optionValueAttribute- if the option value will be marked somewhere in the element. with this attribute it will make sureMuiSelect.selectByValue(String)andMuiSelect.deselectByValue(String)works properly.- Returns:
- wrapped
MuiSelectinstance on the given component
-
toSlider
public MuiSlider toSlider()
Wraps the currentWebComponenttoMuiSliderinstance.- Returns:
- the wrapped
MuiSliderinstance on the given component
-
toSlider
public MuiSlider toSlider(java.util.function.UnaryOperator<Double> inverseScaleFunction)
Wraps the currentWebComponenttoMuiSliderinstance with scale function configured.- Parameters:
inverseScaleFunction- the non-null customized inverse scale function- Returns:
- the wrapped
MuiSliderinstance on the given component
-
toSwitch
public MuiSwitch toSwitch()
Wraps the currentWebComponenttoMuiSwitch.- Returns:
- the wrapped
MuiSwitchinstance on the given component
-
toTextField
public MuiTextField toTextField()
Wraps the currentWebComponenttoMuiTextField.- Returns:
- the wrapped
MuiTextFieldinstance on the given component
-
toRadio
public MuiRadio toRadio()
Wraps the currentWebComponenttoMuiRadio.- Returns:
- the wrapped
MuiRadioinstance on the given component
-
toRadioGroup
public MuiRadioGroup toRadioGroup()
Wraps the currentWebComponenttoMuiRadio.- Returns:
- the wrapped
MuiRadioinstance on the given component
-
toLink
public MuiLink toLink()
Wraps the currentWebComponenttoMuiLink.- Returns:
- the wrapped
MuiLinkinstance on the given component
-
toBreadcrumbs
public MuiBreadcrumbs toBreadcrumbs()
Wraps the currentWebComponenttoMuiBreadcrumbs.- Returns:
- the wrapped
MuiBreadcrumbsinstance on the given component
-
toBottomNavigation
public MuiBottomNavigation toBottomNavigation()
Wraps the currentWebComponenttoMuiBottomNavigation.- Returns:
- the wrapped
MuiBottomNavigationinstance on the given component
-
toTabs
public MuiTabs toTabs()
Wraps the currentWebComponenttoMuiTabs.- Returns:
- the wrapped
MuiTabsinstance on the given component
-
toAvatar
public MuiAvatar toAvatar()
Wraps the currentWebComponenttoMuiAvatar.- Returns:
- the wrapped
MuiAvatarinstance on the given component
-
toBadge
public MuiBadge toBadge()
Wraps the currentWebComponenttoMuiBadge.- Returns:
- the wrapped
MuiBadgeinstance on the given component
-
toChip
public MuiChip toChip()
Wraps the currentWebComponenttoMuiChip.- Returns:
- the wrapped
MuiChipinstance on the given component
-
toDivider
public MuiDivider toDivider()
Wraps the currentWebComponenttoMuiDivider.- Returns:
- the wrapped
MuiDividerinstance on the given component
-
toList
public MuiList toList()
Wraps the currentWebComponenttoMuiList.- Returns:
- the wrapped
MuiListinstance on the given component
-
toListItem
public MuiListItem toListItem()
Wraps the currentWebComponenttoMuiListItem.- Returns:
- the wrapped
MuiListIteminstance on the given component
-
toAppBar
public MuiAppBar toAppBar()
Wraps the currentWebComponenttoMuiAppBar.- Returns:
- the wrapped
MuiAppBarinstance on the given component
-
toPager
public MuiPager toPager()
Wraps the currentWebComponenttoMuiPager.- Returns:
- the wrapped
MuiPagerinstance on the given component
-
toMenu
public MuiMenu toMenu()
Wraps the currentWebComponenttoMuiMenu.- Returns:
- the wrapped
MuiMenuinstance on the given component
-
toBackdrop
public MuiBackdrop toBackdrop()
Wraps the currentWebComponenttoMuiBackdrop.- Returns:
- the wrapped
MuiBackdropinstance on the given component
-
toDialog
public MuiDialog toDialog()
Wraps the currentWebComponenttoMuiDialog.- Returns:
- the wrapped
MuiDialoginstance on the given component
-
toSnackbar
public MuiSnackbar toSnackbar()
Wraps the currentWebComponenttoMuiSnackbar.- Returns:
- the wrapped
MuiSnackbarinstance on the given component
-
toSnackbar
public MuiSnackbar toSnackbar(long autoHideDuration)
Wraps the currentWebComponenttoMuiSnackbar.- Parameters:
autoHideDuration- the autoHideDuration, should be a little longer than the value set in the component.- Returns:
- the wrapped
MuiSnackbarinstance on the given component
-
toAccordion
public MuiAccordion toAccordion()
Wraps the currentWebComponenttoMuiAccordion.- Returns:
- the wrapped
MuiAccordioninstance on the given component
-
toPickersDialog
public MuiPickersDialog toPickersDialog()
Wraps the currentWebComponenttoMuiPickersDialog.- Returns:
- the wrapped
MuiPickersDialoginstance on the given component
-
toAutocomplete
public MuiAutocomplete toAutocomplete()
Wraps the currentWebComponenttoMuiAutocomplete.- Returns:
- the wrapped
MuiAutocompleteinstance on the given component
-
toAutocomplete
public MuiAutocomplete toAutocomplete(@Nullable org.openqa.selenium.By optionLocator)
Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator- Parameters:
optionLocator- the option locator for finding the option elements- Returns:
- the wrapped
MuiAutocompleteinstance on the given component
-
toAutocomplete
public MuiAutocomplete toAutocomplete(@Nullable org.openqa.selenium.By optionLocator, @Nullable MuiAutocompleteTagLocators tagLocators)
Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator- Parameters:
optionLocator- the option locator for finding the option elementstagLocators- the tag locators for finding the selected option elements- Returns:
- the wrapped
MuiAutocompleteinstance on the given component
-
toAutocomplete
public MuiAutocomplete toAutocomplete(@Nullable org.openqa.selenium.By optionLocator, @Nullable MuiAutocompleteTagLocators tagLocators, @Nullable OpenOptionsAction openOptionsAction, @Nullable CloseOptionsAction closeOptionsAction)
Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator- Parameters:
optionLocator- the option locator for finding the option elementstagLocators- the tag locators for finding the selected option elementsopenOptionsAction- the customized open options actioncloseOptionsAction- the customized close options action- Returns:
- the wrapped
MuiAutocompleteinstance on the given component
-
toPagination
public MuiPagination toPagination()
Wraps the currentWebComponenttoMuiPagination.- Returns:
- the wrapped
MuiPaginationinstance on the given component
-
toPagination
public MuiPagination toPagination(@Nullable MuiPaginationLocators locators)
Wraps the currentWebComponenttoMuiPaginationwith customized button locators- Parameters:
locators- the customized locators for pagination buttons and index- Returns:
- the wrapped
MuiPaginationinstance on the given component
-
-