Class ListItem

java.lang.Object
allurium.primitives.UIElement
allurium.primitives.ListItem
All Implemented Interfaces:
AlluriumElement, ListComponent, WebElementMeta

public class ListItem extends UIElement
Represents a `ListItem` element in the UI, extending UIElement.

This class is designed to encapsulate the behavior and attributes of list item elements (`

  • `), commonly used in unordered or ordered lists within a user interface.

    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:

    Static Factory Methods:

    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");
     
     
    • Constructor Details

      • ListItem

        public ListItem()
      • ListItem

        public ListItem(String selenideLocator)
      • ListItem

        public ListItem(String selenideLocator, String name)
      • ListItem

        public ListItem(org.openqa.selenium.By locator)
      • ListItem

        public ListItem(org.openqa.selenium.By locator, String name)
      • ListItem

        public ListItem(com.codeborne.selenide.SelenideElement selenideElement)
      • ListItem

        public ListItem(com.codeborne.selenide.SelenideElement selenideElement, String name)
    • Method Details

      • _$listItem

        public static ListItem _$listItem(String xpath)
      • $listItem

        public static ListItem $listItem(org.openqa.selenium.By locator)
      • $listItem

        public static ListItem $listItem(org.openqa.selenium.By locator, String name)
      • $listItem

        public static ListItem $listItem(com.codeborne.selenide.SelenideElement selenideElement)
      • $listItem

        public static ListItem $listItem(com.codeborne.selenide.SelenideElement selenideElement, String name)
      • $listItem

        public static ListItem $listItem(String selenideLocator)
      • $listItem

        public static ListItem $listItem(String selenideLocator, String name)