Class MuiSelectConfig


  • public class MuiSelectConfig
    extends Object
    The configuration for MuiSelect.
    Since:
    1.6
    Author:
    Jack Yin
    • Constructor Detail

      • MuiSelectConfig

        public MuiSelectConfig​(org.openqa.selenium.By optionsLocator,
                               String optionValueAttribute,
                               OpenOptionsAction openOptionsAction,
                               CloseOptionsAction closeOptionsAction,
                               boolean isMultiple)
        Constructs an instance, all params are required.
        Parameters:
        optionsLocator - the options locator
        optionValueAttribute - the option value attribute name
        openOptionsAction - the action to open the options
        closeOptionsAction - the action to close the options
        isMultiple - whether the component supports multiple selection
    • Method Detail

      • getOptionValueAttribute

        public String getOptionValueAttribute()
        Gets the option value attribute configuration, the default value is "data-value".
        Returns:
        the name of option value attribute
      • getOptionsLocator

        public org.openqa.selenium.By getOptionsLocator()
        Gets the locator for locating the popup options. MuiSelect will first locate the popover element then use the locator for finding the option elements. Use * By.className("MuiMenuItem-root") if the MuiSelect code is copied from Material UI official website.
        Returns:
        the locator for locating the popup options.
      • isMultiple

        public boolean isMultiple()
        whether the select component allows multiple selection, default value is false.
        Returns:
        whether the select component allows multiple selection
      • builder

        public static MuiSelectConfig.MuiSelectConfigBuilder builder​(org.openqa.selenium.By optionsLocator)
        Creates the builder.
        Parameters:
        optionsLocator - the locator for locating the popup options. MuiSelect will first locate the popover element then use the locator for finding the option elements. Use By.className("MuiMenuItem-root") if the MuiSelect code is copied from Material UI official website.
        Returns:
        the newly created builder instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object