Package allurium.primitives
Class ListItem
java.lang.Object
allurium.primitives.UIElement
allurium.primitives.ListItem
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents a `ListItem` element in the UI, extending `),
commonly used in unordered or ordered lists within a user interface.
UIElement.
This class is designed to encapsulate the behavior and attributes of list item elements (`
Features:
- Encapsulates behavior and attributes of list item elements.
- Supports initialization using various constructors and static factory methods.
- Provides a consistent interface for interacting with list items in UI tests.
Purpose:
- Standardizes the interaction with list item elements in the UI.
- Simplifies the creation and manipulation of list item elements in tests.
Constructors:
ListItem()- Default constructor.ListItem(String)- Creates a `ListItem` using a Selenide locator string.ListItem(String, String)- Creates a `ListItem` using a Selenide locator string and a name.ListItem(By)- Creates a `ListItem` using a SeleniumBylocator.ListItem(By, String)- Creates a `ListItem` using a SeleniumBylocator and a name.ListItem(SelenideElement)- Creates a `ListItem` from aSelenideElement.ListItem(SelenideElement, String)- Creates a `ListItem` from aSelenideElementwith a name.
Static Factory Methods:
_$listItem(String)- Creates a `ListItem` using an XPath expression.$listItem(By)- Creates a `ListItem` using a SeleniumBylocator.$listItem(By, String)- Creates a `ListItem` using a SeleniumBylocator and a name.$listItem(SelenideElement)- Creates a `ListItem` from aSelenideElement.$listItem(SelenideElement, String)- Creates a `ListItem` from aSelenideElementwith a name.$listItem(String)- Creates a `ListItem` using a Selenide locator string.$listItem(String, String)- Creates a `ListItem` using a Selenide locator string and a name.
Usage Example:
// Creating a list item using a Selenide locator
ListItem listItem = ListItem.$listItem("ul > li:nth-child(1)");
// Creating a list item with a custom name
ListItem namedListItem = ListItem.$listItem(By.cssSelector("ul > li.item"), "Custom List Item");
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
Constructors -
Method Summary
Methods 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, getHeight, getId, getStepText, getUiElementName, getWidth, hover, hover, hover, isDisplayed, logStep, logStepToReport, logStepToReport, scrollTo, scrollTo, scrollTo, setRoot, 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.AlluriumElement
getRootMethods inherited from interface allurium.interfaces.WebElementMeta
getDescription, getMetaKeys, getParent, setAssignNameMethod, setDescription, setParent, setUiElementName
-
Constructor Details
-
ListItem
public ListItem() -
ListItem
-
ListItem
-
ListItem
public ListItem(org.openqa.selenium.By locator) -
ListItem
-
ListItem
public ListItem(com.codeborne.selenide.SelenideElement selenideElement) -
ListItem
-
-
Method Details
-
_$listItem
-
$listItem
-
$listItem
-
$listItem
-
$listItem
-
$listItem
-
$listItem
-