Class MuiChip
- java.lang.Object
-
- com.github.grossopa.selenium.core.component.AbstractDelegatedWebElement
-
- com.github.grossopa.selenium.core.component.DefaultWebComponent
-
- com.github.grossopa.selenium.component.mui.AbstractMuiComponent
-
- com.github.grossopa.selenium.component.mui.datadisplay.MuiChip
-
- All Implemented Interfaces:
com.github.grossopa.selenium.core.component.WebComponent,org.openqa.selenium.interactions.Locatable,org.openqa.selenium.internal.HasIdentity,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebElement,org.openqa.selenium.WrapsDriver,org.openqa.selenium.WrapsElement
public class MuiChip extends AbstractMuiComponent
Chips are compact elements that represent an input, attribute, or action.- Since:
- 1.0
- Author:
- Jack Yin
- See Also:
- https://material-ui.com/components/chips/
-
-
Field Summary
-
Fields inherited from class com.github.grossopa.selenium.component.mui.AbstractMuiComponent
config
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.openqa.selenium.ByavatarLocator()protected org.openqa.selenium.BydeleteIconLocator()com.github.grossopa.selenium.core.component.WebComponentgetAvatar()Gets the avatar element.StringgetComponentName()Gets the current component namecom.github.grossopa.selenium.core.component.WebComponentgetDeleteIcon()Gets the delete icon element.com.github.grossopa.selenium.core.component.WebComponentgetIcon()Gets the icon element.com.github.grossopa.selenium.core.component.WebComponentgetLabel()Gets the label element.booleanhasAvatar()Whether the Chip component has avatar component.booleanhasDeleteIcon()Whether the Chip component has deleteIcon component.booleanhasIcon()Whether the Chip component has icon component.protected org.openqa.selenium.ByiconLocator()booleanisClickable()Whether the Chip component is clickable.booleanisDeletable()Whether the Chip component is deletable.-
Methods inherited from class com.github.grossopa.selenium.component.mui.AbstractMuiComponent
isEnabled, validate
-
Methods inherited from class com.github.grossopa.selenium.core.component.DefaultWebComponent
as, attributeContains, findComponent, findComponentAs, findComponents, findComponentsAs, to
-
Methods inherited from class com.github.grossopa.selenium.core.component.AbstractDelegatedWebElement
clear, click, findElement, findElements, getAttribute, getCoordinates, getCssValue, getId, getLocation, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedDriver, getWrappedElement, isDisplayed, isSelected, sendKeys, submit, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.grossopa.selenium.core.component.WebComponent
findElement, findElements
-
-
-
-
Constructor Detail
-
MuiChip
public MuiChip(org.openqa.selenium.WebElement element, com.github.grossopa.selenium.core.ComponentWebDriver driver, MuiConfig config)Constructs an instance with the delegated element and root driver- Parameters:
element- the delegated elementdriver- the root driverconfig- the Material UI configuration
-
-
Method Detail
-
getComponentName
public String getComponentName()
Description copied from class:AbstractMuiComponentGets the current component name- Specified by:
getComponentNamein classAbstractMuiComponent- Returns:
- the current component name
-
hasAvatar
public boolean hasAvatar()
Whether the Chip component has avatar component.- Returns:
- whether the Chip component has avatar component
-
getAvatar
public com.github.grossopa.selenium.core.component.WebComponent getAvatar()
Gets the avatar element. ThrowsNoSuchElementExceptionif not found.- Returns:
- the avatar element
-
hasIcon
public boolean hasIcon()
Whether the Chip component has icon component.- Returns:
- whether the Chip component has icon component
-
getIcon
public com.github.grossopa.selenium.core.component.WebComponent getIcon()
Gets the icon element. ThrowsNoSuchElementExceptionif not found.- Returns:
- the icon element
-
getLabel
public com.github.grossopa.selenium.core.component.WebComponent getLabel()
Gets the label element.- Returns:
- the label element
-
hasDeleteIcon
public boolean hasDeleteIcon()
Whether the Chip component has deleteIcon component.- Returns:
- whether the Chip component has deleteIcon component
-
getDeleteIcon
public com.github.grossopa.selenium.core.component.WebComponent getDeleteIcon()
Gets the delete icon element. ThrowsNoSuchElementExceptionif not found.- Returns:
- the delete icon element.
-
avatarLocator
protected org.openqa.selenium.By avatarLocator()
-
iconLocator
protected org.openqa.selenium.By iconLocator()
-
deleteIconLocator
protected org.openqa.selenium.By deleteIconLocator()
-
isClickable
public boolean isClickable()
Whether the Chip component is clickable.- Returns:
- whether the Chip component is clickable.
-
isDeletable
public boolean isDeletable()
Whether the Chip component is deletable. it's the alias ofhasDeleteIcon().- Returns:
- whether the Chip component is deletable.
-
-