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 MuiConfiggetConfig()Gets the Mui configurationstatic MuiComponentsmui()Creates an instance ofMuiComponentswith defaultMuiConfig.static MuiComponentsmui(MuiConfig config)Creates an instance ofMuiComponentswith givenMuiConfig.static MuiComponentsmuiV5()Creates an instance ofMuiComponentswithMuiConfigfor Material UI version v5.MuiAccordiontoAccordion()Wraps the currentWebComponenttoMuiAccordion.MuiAppBartoAppBar()Wraps the currentWebComponenttoMuiAppBar.MuiAutocompletetoAutocomplete()Wraps the currentWebComponenttoMuiAutocomplete.MuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator.MuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator, MuiAutocompleteTagLocators tagLocators)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator and tagLocators (for multiple selection feature).MuiAutocompletetoAutocomplete(org.openqa.selenium.By optionLocator, MuiAutocompleteTagLocators tagLocators, OpenOptionsAction openOptionsAction, CloseOptionsAction closeOptionsAction)Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator, tagLocators (for multiple selection feature), and actions for opening and closing the options.MuiAvatartoAvatar()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.MuiCalendarPickertoCalendarPicker()Wraps the currentWebComponenttoMuiCalendarPicker.MuiCalendarPickertoCalendarPicker(List<MuiCalendarPicker.ViewType> view)Wraps the currentWebComponenttoMuiCalendarPicker.MuiCheckboxtoCheckbox()Wraps the currentWebComponenttoMuiCheckboxinstance forMuiVersion.V4andMuiCheckboxV5forMuiVersion.V5.MuiChiptoChip()Wraps the currentWebComponenttoMuiChip.MuiDatePickerFormFieldtoDatePickerFormField()Wraps the currentWebComponenttoMuiDatePickerFormField.MuiDatePickerFormFieldtoDatePickerFormField(MuiCalendarPicker.ViewType... views)Wraps the currentWebComponenttoMuiDatePickerFormFieldwith specific views.MuiDialogtoDialog()Wraps the currentWebComponenttoMuiDialog.MuiDividertoDivider()Wraps the currentWebComponenttoMuiDivider.MuiFabtoFab()Wraps the currentWebComponenttoMuiFabinstance.MuiGridtoGrid()Wraps the currentWebComponenttoMuiGridinstance.MuiLinktoLink()Wraps the currentWebComponenttoMuiLink.MuiListtoList()Wraps the currentWebComponenttoMuiList.MuiListItemtoListItem()Wraps the currentWebComponenttoMuiListItem.MuiMenutoMenu()Wraps the currentWebComponenttoMuiMenu.MuiMonthPickertoMonthPicker()Wraps the currentWebComponenttoMuiMonthPicker.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 currentWebComponenttoMuiRadioGroup.MuiSelecttoSelect(org.openqa.selenium.By optionLocator)Wraps the currentWebComponenttoMuiSelectinstance.MuiSelecttoSelect(org.openqa.selenium.By optionLocator, String optionValueAttribute)Wraps the currentWebComponenttoMuiSelectinstance.MuiSelecttoSelect(org.openqa.selenium.By optionLocator, java.util.function.Consumer<MuiSelectConfig.MuiSelectConfigBuilder> configEnrichConsumer)Wraps the currentWebComponenttoMuiSelectinstance.MuiSlidertoSlider()MuiSlidertoSlider(java.util.function.UnaryOperator<Double> inverseScaleFunction)Wraps the currentWebComponenttoMuiSliderinstance with scale function configured.MuiSnackbartoSnackbar()Wraps the currentWebComponenttoMuiSnackbar.MuiSnackbartoSnackbar(long autoHideDuration)Wraps the currentWebComponenttoMuiSnackbarwith custom auto hide duration for further checking.MuiSwitchtoSwitch()Wraps the currentWebComponenttoMuiSwitchinstance with scale function configured.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.
-
muiV5
public static MuiComponents muiV5()
Creates an instance ofMuiComponentswithMuiConfigfor Material UI version v5.- Returns:
- the newly created instance with
MuiConfigfor Material UI version v5
-
mui
public static MuiComponents mui(MuiConfig config)
Creates an instance ofMuiComponentswith givenMuiConfig.- Parameters:
config- the config instance- Returns:
- the instance of
MuiComponentswith givenMuiConfig.
-
toAutocomplete
public MuiAutocomplete toAutocomplete()
Wraps the currentWebComponenttoMuiAutocomplete.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAutocomplete-root".- Returns:
- the wrapped
MuiAutocompleteinstance on the given component
-
toAutocomplete
public MuiAutocomplete toAutocomplete(@Nullable org.openqa.selenium.By optionLocator)
Wraps the currentWebComponenttoMuiAutocompletewith customized optionLocator.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAutocomplete-root".- 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 and tagLocators (for multiple selection feature).It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAutocomplete-root".- 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, tagLocators (for multiple selection feature), and actions for opening and closing the options.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAutocomplete-root".- 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
-
toButton
public MuiButton toButton()
Wraps the currentWebComponenttoMuiButtoninstance.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiButton-root".- Returns:
- wrapped
MuiButtoninstance on the given component
-
toButtonGroup
public MuiButtonGroup toButtonGroup()
Wraps the currentWebComponenttoMuiButtonGroupinstance.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have below structure:<div class="MuiButtonGroup-root"> <div class="MuiButton-root ..."></div> <div class="MuiButton-root ..."></div> <div class="MuiButton-root ..."></div> </div>- Returns:
- wrapped
MuiButtonGroupinstance on the given component
-
toCheckbox
public MuiCheckbox toCheckbox()
Wraps the currentWebComponenttoMuiCheckboxinstance forMuiVersion.V4andMuiCheckboxV5forMuiVersion.V5. Developer should cast the class toMuiCheckboxV5for additional APIs such asMuiCheckboxV5.isIndeterminate().The
WebElementshould have css class "MuiCheckbox-root".- Returns:
- wrapped
MuiCheckboxinstance on the given component
-
toFab
public MuiFab toFab()
Wraps the currentWebComponenttoMuiFabinstance.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiFab-root".- Returns:
- wrapped
MuiFabinstance on the given component
-
toRadio
public MuiRadio toRadio()
Wraps the currentWebComponenttoMuiRadio.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiRadio-root".- Returns:
- the wrapped
MuiRadioinstance on the given component
-
toRadioGroup
public MuiRadioGroup toRadioGroup()
Wraps the currentWebComponenttoMuiRadioGroup.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have below structure:<div class="MuiFormGroup-root"> .... <span class="MuiRadio-root ..."></span> <span class="MuiRadio-root ..."></span> <span class="MuiRadio-root ..."></span> </div>- Returns:
- the wrapped
MuiRadioGroupinstance on the given component
-
toSelect
public MuiSelect toSelect(org.openqa.selenium.By optionLocator)
Wraps the currentWebComponenttoMuiSelectinstance.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiSelect-root".- 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.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiSelect-root".- 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
-
toSelect
public MuiSelect toSelect(org.openqa.selenium.By optionLocator, java.util.function.Consumer<MuiSelectConfig.MuiSelectConfigBuilder> configEnrichConsumer)
Wraps the currentWebComponenttoMuiSelectinstance.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiSelect-root".- Parameters:
optionLocator- the locator for locating the options (NOTE: it is the option element NOT the option container)configEnrichConsumer- allows developer to configure using the builder- Returns:
- wrapped
MuiSelectinstance on the given component
-
toSlider
public MuiSlider toSlider()
Wraps the currentWebComponenttoMuiSliderforMuiVersion.V4andMuiSliderV5forMuiVersion.V5The
WebElementshould have css class "MuiSlider-root".- 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.MuiSliderforMuiVersion.V4andMuiSliderV5forMuiVersion.V5.The
WebElementshould have css class "MuiSlider-root".- Parameters:
inverseScaleFunction- the non-null customized inverse scale function- Returns:
- the wrapped
MuiSliderinstance on the given component
-
toSwitch
public MuiSwitch toSwitch()
Wraps the currentWebComponenttoMuiSwitchinstance with scale function configured.MuiSwitchforMuiVersion.V4andMuiSwitchV5forMuiVersion.V5.The
WebElementshould have css class "MuiSwitch-root".- Returns:
- the wrapped
MuiSwitchinstance on the given component
-
toTextField
public MuiTextField toTextField()
Wraps the currentWebComponenttoMuiTextField.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiTextField-root".- Returns:
- the wrapped
MuiTextFieldinstance on the given component
-
toAvatar
public MuiAvatar toAvatar()
Wraps the currentWebComponenttoMuiAvatar.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAvatar-root".- Returns:
- the wrapped
MuiAvatarinstance on the given component
-
toBadge
public MuiBadge toBadge()
Wraps the currentWebComponenttoMuiBadge.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiBadge-root".- Returns:
- the wrapped
MuiBadgeinstance on the given component
-
toChip
public MuiChip toChip()
Wraps the currentWebComponenttoMuiChip.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiChip-root".- Returns:
- the wrapped
MuiChipinstance on the given component
-
toDivider
public MuiDivider toDivider()
Wraps the currentWebComponenttoMuiDivider.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiDivider-root".- Returns:
- the wrapped
MuiDividerinstance on the given component
-
toList
public MuiList toList()
Wraps the currentWebComponenttoMuiList.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiList-root".- Returns:
- the wrapped
MuiListinstance on the given component
-
toListItem
public MuiListItem toListItem()
Wraps the currentWebComponenttoMuiListItem.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiListItem-root".- Returns:
- the wrapped
MuiListIteminstance on the given component
-
toBackdrop
public MuiBackdrop toBackdrop()
Wraps the currentWebComponenttoMuiBackdrop.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiBackdrop-root".- Returns:
- the wrapped
MuiBackdropinstance on the given component
-
toDialog
public MuiDialog toDialog()
Wraps the currentWebComponenttoMuiDialog.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.Using
MuiModalFinder.findTopVisibleOverlay()to locate the top overlay and find the component inside. TheWebElementshould have css class "MuiDialog-root".- Returns:
- the wrapped
MuiDialoginstance on the given component
-
toSnackbar
public MuiSnackbar toSnackbar()
Wraps the currentWebComponenttoMuiSnackbar.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiSnackbar-root".- Returns:
- the wrapped
MuiSnackbarinstance on the given component
-
toSnackbar
public MuiSnackbar toSnackbar(long autoHideDuration)
Wraps the currentWebComponenttoMuiSnackbarwith custom auto hide duration for further checking.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiSnackbar-root".- 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.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAccordion-root".- Returns:
- the wrapped
MuiAccordioninstance on the given component
-
toAppBar
public MuiAppBar toAppBar()
Wraps the currentWebComponenttoMuiAppBar.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiAppBar-root". Note there is usually another layer named "MuiToolbar-root" from the Material UI example. within with contains the actual children.- Returns:
- the wrapped
MuiAppBarinstance on the given component
-
toBottomNavigation
public MuiBottomNavigation toBottomNavigation()
Wraps the currentWebComponenttoMuiBottomNavigation.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiBottomNavigation-root".- Returns:
- the wrapped
MuiBottomNavigationinstance on the given component
-
toBreadcrumbs
public MuiBreadcrumbs toBreadcrumbs()
Wraps the currentWebComponenttoMuiBreadcrumbs.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiBreadcrumbs-root".- Returns:
- the wrapped
MuiBreadcrumbsinstance on the given component
-
toLink
public MuiLink toLink()
Wraps the currentWebComponenttoMuiLink.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiLink-root".- Returns:
- the wrapped
MuiLinkinstance on the given component
-
toMenu
public MuiMenu toMenu()
Wraps the currentWebComponenttoMuiMenu.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiMenu-root". it is the top layer of the overlay.- Returns:
- the wrapped
MuiMenuinstance on the given component
-
toPagination
public MuiPagination toPagination()
Wraps the currentWebComponenttoMuiPagination.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiPagination-root". it is the top layer of the overlay.- Returns:
- the wrapped
MuiPaginationinstance on the given component
-
toPagination
public MuiPagination toPagination(@Nullable MuiPaginationLocators locators)
Wraps the currentWebComponenttoMuiPaginationwith customized button locatorsIt supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have css class "MuiPagination-root". it is the top layer of the overlay.- Parameters:
locators- the customized locators for pagination buttons and index- Returns:
- the wrapped
MuiPaginationinstance on the given component
-
toTabs
public MuiTabs toTabs()
Wraps the currentWebComponenttoMuiTabs.It supports both Material UI version
MuiVersion.V4andMuiVersion.V5.The
WebElementshould have below structure:<div class="MuiTabs-root"> .... <button class="MuiTab-root ..."></span> <button class="MuiTab-root ..."></span> <button class="MuiTab-root ..."></span> </div>- Returns:
- the wrapped
MuiTabsinstance on the given component
-
toCalendarPicker
public MuiCalendarPicker toCalendarPicker()
Wraps the currentWebComponenttoMuiCalendarPicker.It supports
MuiVersion.V5.The
WebElementshould have below structure:<div class="MuiCalendarPicker-root ..."> <div> <div> <div class="PrivatePickersFadeTransitionGroup-root ...">October</div> <div class="PrivatePickersFadeTransitionGroup-root ...">2021</div> <button class="MuiIconButton-root ..." data-testid="ArrowDropDownIcon">...</button> </div> <div> <button class="MuiIconButton-root ..." title="Previous month"></span> <button class="MuiIconButton-root ..." title="Next month"></span> </div> </div> <div class="MuiCalendarPicker-viewTransitionContainer ..."> <!-- could either be below snippets or MuiYearPicker if year selection is open --> <div> <div> <span class="MuiTypography-root ...">S</span> <span class="MuiTypography-root ...">M</span> <span class="MuiTypography-root ...">T</span> <span class="MuiTypography-root ...">W</span> <span class="MuiTypography-root ...">T</span> <span class="MuiTypography-root ...">F</span> <span class="MuiTypography-root ...">S</span> </div> <div class="PrivatePickersSlideTransition-root"> <div role="grid"> {Array.from(Array(5 or 6).keys()).map(key -> <div role="row"> Array.from(Array(7).keys()).map(key -> <div role="cell"> <div class="MuiPickersDay-root ...">${either empty or day number}</div> </div>) </div>)} </div> </div> </div> </div>- Returns:
- the wrapped
MuiCalendarPickerinstance on the given component
-
toCalendarPicker
public MuiCalendarPicker toCalendarPicker(List<MuiCalendarPicker.ViewType> view)
Wraps the currentWebComponenttoMuiCalendarPicker.It supports
MuiVersion.V5.The
WebElementshould have below structure:<div class="MuiCalendarPicker-root ..."> <div> <div> <div class="PrivatePickersFadeTransitionGroup-root ...">October</div> <div class="PrivatePickersFadeTransitionGroup-root ...">2021</div> <button class="MuiIconButton-root ..." data-testid="ArrowDropDownIcon">...</button> </div> <div> <button class="MuiIconButton-root ..." title="Previous month"></span> <button class="MuiIconButton-root ..." title="Next month"></span> </div> </div> <div class="MuiCalendarPicker-viewTransitionContainer ..."> <!-- could either be below snippets or MuiYearPicker if year selection is open --> <div> <div> <span class="MuiTypography-root ...">S</span> <span class="MuiTypography-root ...">M</span> <span class="MuiTypography-root ...">T</span> <span class="MuiTypography-root ...">W</span> <span class="MuiTypography-root ...">T</span> <span class="MuiTypography-root ...">F</span> <span class="MuiTypography-root ...">S</span> </div> <div class="PrivatePickersSlideTransition-root"> <div role="grid"> {Array.from(Array(5 or 6).keys()).map(key -> <div role="row"> Array.from(Array(7).keys()).map(key -> <div role="cell"> <div class="MuiPickersDay-root ...">${either empty or day number}</div> </div>) </div>)} </div> </div> </div> </div>- Parameters:
view- the view type of the calendar, could beMuiCalendarPicker.ViewType.YEAR,MuiCalendarPicker.ViewType.MONTHorMuiCalendarPicker.ViewType.DAY- Returns:
- the wrapped
MuiCalendarPickerinstance on the given component
-
toMonthPicker
public MuiMonthPicker toMonthPicker()
Wraps the currentWebComponenttoMuiMonthPicker.It supports
MuiVersion.V5.The
WebElementshould have below structure:<div class="MuiMonthPicker-root ..."> <button class="PrivatePickersMonth-root ...">Jan</button> ... <button class="PrivatePickersMonth-root ...">Dec</button> </div>- Returns:
- the wrapped
MuiMonthPickerinstance on the given component
-
toDatePickerFormField
public MuiDatePickerFormField toDatePickerFormField()
Wraps the currentWebComponenttoMuiDatePickerFormField.It only supports Material UI
MuiVersion.V5.The
WebElementshould have below structure:<div class="MuiTextField-root ..."> <div class="MuiInputBase-root ..."> <input .../> <div ...> <button class="MuiIconButton-root" aria-label="Choose Date"> <svg data-testid="CalendarIcon"> ... </svg> </button> </div> </div> </div>- Returns:
- the wrapped
MuiDatePickerFormFieldinstance on the given component
-
toDatePickerFormField
public MuiDatePickerFormField toDatePickerFormField(MuiCalendarPicker.ViewType... views)
Wraps the currentWebComponenttoMuiDatePickerFormFieldwith specific views.It only supports Material UI
MuiVersion.V5.The
WebElementshould have below structure:<div class="MuiTextField-root ..."> <div class="MuiInputBase-root ..."> <input .../> <div ...> <button class="MuiIconButton-root" aria-label="Choose Date"> <svg data-testid="CalendarIcon"> ... </svg> </button> </div> </div> </div>- Parameters:
views- the view type of the calendar, could beMuiCalendarPicker.ViewType.YEAR,MuiCalendarPicker.ViewType.MONTHand/orMuiCalendarPicker.ViewType.DAYshould follow the same defined in components in order.- Returns:
- the wrapped
MuiDatePickerFormFieldinstance on the given component
-
toGrid
public MuiGrid toGrid()
Wraps the currentWebComponenttoMuiGridinstance.- Returns:
- wrapped
MuiGridinstance on the given component
-
toPager
public MuiPager toPager()
Wraps the currentWebComponenttoMuiPager.- Returns:
- the wrapped
MuiPagerinstance on the given component
-
toPickersDialog
public MuiPickersDialog toPickersDialog()
Wraps the currentWebComponenttoMuiPickersDialog.- Returns:
- the wrapped
MuiPickersDialoginstance on the given component
-
getConfig
public MuiConfig getConfig()
Gets the Mui configuration- Returns:
- the Mui configuration
-
-