Package allurium.carousels
Class AbstractCarousel
java.lang.Object
allurium.primitives.UIElement
allurium.AbstractWidget
allurium.carousels.AbstractCarousel
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
- Direct Known Subclasses:
Carousel
Represents the base class for carousels in the UI, extending
AbstractWidget.
This class provides a foundation for creating carousel components with features such as forward and backward scrolling. It integrates with the widget framework and supports dynamic extensions for carousel-specific behavior.
Features:
- Encapsulates common behavior and attributes of carousel components.
- Provides abstract methods for forward and backward scrolling.
- Uses the
Widgetannotation for enhanced identification and integration.
Purpose:
- Standardizes the implementation of carousel-like components in the UI.
- Facilitates integration with the UI framework and test infrastructure.
Usage Example:
public class ImageCarousel extends AbstractCarousel {
public ImageCarousel(SelenideElement rootElement) {
super(rootElement);
}- See Also:
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractCarousel(com.codeborne.selenide.SelenideElement selenideRootElement) Constructor that initializes the carousel using a Selenide element.AbstractCarousel(String selenideRootLocator) Constructor that initializes the carousel using a Selenide locator string.AbstractCarousel(org.openqa.selenium.By rootLocator) Constructor that initializes the carousel using a SeleniumBylocator. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidScrolls the carousel backward.abstract voidScrolls the carousel forward.Methods inherited from class allurium.AbstractWidget
getHeight, getRoot, getWidth, setRootMethods inherited from class allurium.primitives.UIElement
_$uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, applyName, applyName, as, assertEmpty, assertEquals, assertExists, assertExists, assertHasCssClass, assertHasCssClass, assertHasNotCssClass, assertHasNotCssClass, assertHasNotCssClass, assertHasText, assertIsNotEmpty, assertNotExist, assertNotExist, assertNotVisible, assertNotVisible, assertNotVisible, assertText, assertVisible, assertVisible, assertVisible, assertVisible, assertVisibleInViewport, click, click, click, click, click, clickAndHold, clickAndHold, clickAndHold, contextClick, contextClick, contextClick, doubleClick, doubleClick, doubleClick, get, getAllureCompiledStep, getAttribute, getId, getStepText, getUiElementName, hover, hover, hover, isDisplayed, logStep, logStepToReport, logStepToReport, scrollTo, scrollTo, scrollTo, setRoot, text, verifyEmpty, verifyIsNotEmpty, wrappedNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface allurium.interfaces.WebElementMeta
getDescription, getMetaKeys, getParent, setAssignNameMethod, setDescription, setParent, setUiElementName
-
Constructor Details
-
AbstractCarousel
public AbstractCarousel()Default constructor. Initializes the carousel as a generic widget with the type "carousel". -
AbstractCarousel
public AbstractCarousel(org.openqa.selenium.By rootLocator) Constructor that initializes the carousel using a SeleniumBylocator.- Parameters:
rootLocator- the Selenium locator for the carousel's root element
-
AbstractCarousel
Constructor that initializes the carousel using a Selenide locator string.- Parameters:
selenideRootLocator- the Selenide locator string for the carousel's root element
-
AbstractCarousel
public AbstractCarousel(com.codeborne.selenide.SelenideElement selenideRootElement) Constructor that initializes the carousel using a Selenide element.- Parameters:
selenideRootElement- the Selenide element representing the carousel's root
-
-
Method Details
-
scrollForward
public abstract void scrollForward()Scrolls the carousel forward.This method must be implemented by subclasses to provide the specific behavior for scrolling the carousel to the next set of items.
Step: Processed by Aspect
-
scrollBackward
public abstract void scrollBackward()Scrolls the carousel backward.This method must be implemented by subclasses to provide the specific behavior for scrolling the carousel to the previous set of items.
Step: Processed by Aspect
-