Class MuiSelectConfig
- java.lang.Object
-
- com.github.grossopa.selenium.component.mui.config.MuiSelectConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMuiSelectConfig.MuiSelectConfigBuilderThe builder forMuiSelectConfig.
-
Constructor Summary
Constructors Constructor Description MuiSelectConfig(org.openqa.selenium.By optionsLocator, String optionValueAttribute, OpenOptionsAction openOptionsAction, CloseOptionsAction closeOptionsAction, boolean isMultiple)Constructs an instance, all params are required.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MuiSelectConfig.MuiSelectConfigBuilderbuilder(org.openqa.selenium.By optionsLocator)Creates the builder.booleanequals(Object o)CloseOptionsActiongetCloseOptionsAction()Gets the action to close the options layer, default value isDefaultCloseOptionsActionOpenOptionsActiongetOpenOptionsAction()Gets the action to open the options layer, default value isDefaultOpenOptionsActionorg.openqa.selenium.BygetOptionsLocator()Gets the locator for locating the popup options.StringgetOptionValueAttribute()Gets the option value attribute configuration, the default value is "data-value".inthashCode()booleanisMultiple()whether the select component allows multiple selection, default value is false.StringtoString()
-
-
-
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 locatoroptionValueAttribute- the option value attribute nameopenOptionsAction- the action to open the optionscloseOptionsAction- the action to close the optionsisMultiple- 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.MuiSelectwill 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.
-
getOpenOptionsAction
public OpenOptionsAction getOpenOptionsAction()
Gets the action to open the options layer, default value isDefaultOpenOptionsAction- Returns:
- the action to open the options layer
-
getCloseOptionsAction
public CloseOptionsAction getCloseOptionsAction()
Gets the action to close the options layer, default value isDefaultCloseOptionsAction- Returns:
- the action to close the options layer
-
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.MuiSelectwill first locate the popover element then use the locator for finding the option elements. UseBy.className("MuiMenuItem-root")if the MuiSelect code is copied from Material UI official website.- Returns:
- the newly created builder instance
-
-