Class MuiChip

  • All Implemented Interfaces:
    MuiComponent, 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.core.component.DefaultWebComponent

        driver
      • Fields inherited from class com.github.grossopa.selenium.core.component.AbstractDelegatedWebElement

        element
    • Constructor Summary

      Constructors 
      Constructor Description
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.openqa.selenium.By avatarLocator()  
      protected org.openqa.selenium.By deleteIconLocator()  
      com.github.grossopa.selenium.core.component.WebComponent getAvatar()
      Gets the avatar element.
      String getComponentName()
      Gets the current component name
      com.github.grossopa.selenium.core.component.WebComponent getDeleteIcon()
      Gets the delete icon element.
      com.github.grossopa.selenium.core.component.WebComponent getIcon()
      Gets the icon element.
      com.github.grossopa.selenium.core.component.WebComponent getLabel()
      Gets the label element.
      boolean hasAvatar()
      Whether the Chip component has avatar component.
      boolean hasDeleteIcon()
      Whether the Chip component has deleteIcon component.
      boolean hasIcon()
      Whether the Chip component has icon component.
      protected org.openqa.selenium.By iconLocator()  
      boolean isClickable()
      Whether the Chip component is clickable.
      boolean isDeletable()
      Whether the Chip component is deletable.
      • Methods inherited from class com.github.grossopa.selenium.core.component.DefaultWebComponent

        as, attributeContains, driver, findComponent, findComponentAs, findComponents, findComponentsAs, isFocused, outerHTML, 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 interface org.openqa.selenium.internal.HasIdentity

        getId
      • Methods inherited from interface org.openqa.selenium.interactions.Locatable

        getCoordinates
      • Methods inherited from interface org.openqa.selenium.TakesScreenshot

        getScreenshotAs
      • Methods inherited from interface com.github.grossopa.selenium.core.component.WebComponent

        findElement, findElements
      • Methods inherited from interface org.openqa.selenium.WebElement

        clear, click, getAttribute, getCssValue, getLocation, getRect, getSize, getTagName, getText, isDisplayed, isSelected, sendKeys, submit
      • Methods inherited from interface org.openqa.selenium.WrapsDriver

        getWrappedDriver
      • Methods inherited from interface org.openqa.selenium.WrapsElement

        getWrappedElement
    • 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 element
        driver - the root driver
        config - the Material UI configuration
    • Method Detail

      • 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. Throws NoSuchElementException if 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. Throws NoSuchElementException if 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. Throws NoSuchElementException if 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 of hasDeleteIcon().
        Returns:
        whether the Chip component is deletable.