Package allurium.primitives
Class Icon
java.lang.Object
allurium.primitives.UIElement
allurium.primitives.Icon
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents an `Icon` element in the UI, extending
UIElement.
This class provides constructors and static factory methods to initialize and interact
with icon elements, identified by locators or SelenideElement.
Features:
- Encapsulates behavior and attributes of an icon element.
- Provides multiple constructors for initialization using:
- Selenide locators as strings
- Selenium
Bylocators SelenideElementinstances
- Offers static factory methods for convenient creation of `Icon` objects.
- Automatically sets the element type to "icon".
Purpose:
- Standardizes the interaction with icon elements in the UI.
- Simplifies the creation of `Icon` objects using various initialization methods.
Constructors:
Icon()- Default constructor.Icon(String)- Creates an `Icon` using a Selenide locator string.Icon(String, String)- Creates an `Icon` using a Selenide locator string and a name.Icon(By)- Creates an `Icon` using a SeleniumBylocator.Icon(By, String)- Creates an `Icon` using a SeleniumBylocator and a name.Icon(SelenideElement)- Creates an `Icon` from aSelenideElement.Icon(SelenideElement, String)- Creates an `Icon` from aSelenideElementwith a name.
Static Factory Methods:
$icon(By)- Creates an `Icon` using a SeleniumBylocator.$icon(By, String)- Creates an `Icon` using a SeleniumBylocator and a name.$icon(SelenideElement)- Creates an `Icon` from aSelenideElement.$icon(SelenideElement, String)- Creates an `Icon` from aSelenideElementwith a name.$icon(String)- Creates an `Icon` using a Selenide locator string.$icon(String, String)- Creates an `Icon` using a Selenide locator string and a name._$icon(String)- Creates an `Icon` using an XPath expression.
Usage Example:
// Creating an icon using a Selenide locator
Icon icon = Icon.$icon("div.icon-class");
// Creating an icon using a Selenium locator and a custom name
Icon namedIcon = Icon.$icon(By.cssSelector(".icon-class"), "Custom Icon");
-
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
-
Icon
public Icon() -
Icon
-
Icon
-
Icon
public Icon(org.openqa.selenium.By locator) -
Icon
-
Icon
public Icon(com.codeborne.selenide.SelenideElement selenideElement) -
Icon
-
-
Method Details
-
$icon
-
$icon
-
$icon
-
$icon
-
$icon
-
$icon
-
_$icon
-