Class MuiSnackbar
- 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.feedback.MuiSnackbar
-
- 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 MuiSnackbar extends AbstractMuiComponent
Snackbars provide brief messages about app processes. The component is also known as a toast.- Since:
- 1.0
- Author:
- Jack Yin
- See Also:
- https://material-ui.com/components/snackbars/
-
-
Field Summary
-
Fields inherited from class com.github.grossopa.selenium.component.mui.AbstractMuiComponent
config
-
-
Constructor Summary
Constructors Constructor Description MuiSnackbar(org.openqa.selenium.WebElement element, com.github.grossopa.selenium.core.ComponentWebDriver driver, MuiConfig config)Constructs an instance with the delegated element and root driverMuiSnackbar(org.openqa.selenium.WebElement element, com.github.grossopa.selenium.core.ComponentWebDriver driver, MuiConfig config, Long autoHideDuration)Constructs an instance with the delegated element and root driver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetAutoHideDuration()Gets the autoHideDuration in Milliseconds.StringgetComponentName()Gets the current component nameMuiSnackbarContentgetContent()Gets the innerMuiSnackbarContentelement.org.openqa.selenium.support.ui.WebDriverWaitstartAutoHideCheck()Kicks off the check for the snackbar to disappear automatically.org.openqa.selenium.support.ui.WebDriverWaitstartAutoHideCheck(Long autoHideDuration)Kicks off the check for the snackbar to disappear automatically.-
Methods inherited from class com.github.grossopa.selenium.component.mui.AbstractMuiComponent
config, isEnabled, validate
-
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 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
-
MuiSnackbar
public MuiSnackbar(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
-
MuiSnackbar
public MuiSnackbar(org.openqa.selenium.WebElement element, com.github.grossopa.selenium.core.ComponentWebDriver driver, MuiConfig config, Long autoHideDuration)Constructs an instance with the delegated element and root driver- Parameters:
element- the delegated elementdriver- the root driverconfig- the Material UI configurationautoHideDuration- optional, the autoHideDuration in milliseconds
-
-
Method Detail
-
getContent
public MuiSnackbarContent getContent()
Gets the innerMuiSnackbarContentelement.Note that the result would be null if the content is customized.
- Returns:
- the inner
MuiSnackbarContentelement.
-
getComponentName
public String getComponentName()
Description copied from class:AbstractMuiComponentGets the current component name- Specified by:
getComponentNamein classAbstractMuiComponent- Returns:
- the current component name
-
startAutoHideCheck
public org.openqa.selenium.support.ui.WebDriverWait startAutoHideCheck()
Kicks off the check for the snackbar to disappear automatically.- Returns:
- the wait for waiting this to be disappeared
-
startAutoHideCheck
public org.openqa.selenium.support.ui.WebDriverWait startAutoHideCheck(Long autoHideDuration)
Kicks off the check for the snackbar to disappear automatically. throwsIllegalArgumentExceptionwhen the autoHideDuration is null or <= 0.- Parameters:
autoHideDuration- the expected auto hide duration- Returns:
- the wait for waiting this to be disappeared
-
-