Package allurium.primitives
Class Symbol
java.lang.Object
allurium.primitives.UIElement
allurium.primitives.Symbol
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents a `Symbol` element in the UI, extending
UIElement.
This class encapsulates the behavior and attributes of a symbol element, which is often used to display icons, special characters, or graphical representations in a user interface.
Features:
- Encapsulates behavior and attributes of a `Symbol` element.
- Supports multiple initialization methods through constructors and static factory methods.
- Extends
UIElementto provide generic interaction capabilities.
Purpose:
- Standardizes interactions with symbol elements in the UI.
- Simplifies the creation and management of symbol elements in tests.
Constructors:
Symbol()- Default constructor.Symbol(String)- Creates a `Symbol` using a Selenide locator string.Symbol(String, String)- Creates a `Symbol` using a Selenide locator string and a name.Symbol(By)- Creates a `Symbol` using a SeleniumBylocator.Symbol(By, String)- Creates a `Symbol` using a SeleniumBylocator and a name.Symbol(SelenideElement)- Creates a `Symbol` using aSelenideElement.Symbol(SelenideElement, String)- Creates a `Symbol` using aSelenideElementand a name.
Static Factory Methods:
$symbol(By)- Creates a `Symbol` using a SeleniumBylocator.$symbol(By, String)- Creates a `Symbol` using a SeleniumBylocator and a name.$symbol(SelenideElement)- Creates a `Symbol` using aSelenideElement.$symbol(SelenideElement, String)- Creates a `Symbol` using aSelenideElementand a name.$symbol(String)- Creates a `Symbol` using a Selenide locator string.$symbol(String, String)- Creates a `Symbol` using a Selenide locator string and a name._$symbol(String)- Creates a `Symbol` using an XPath expression.
Usage Example:
// Creating a symbol using a Selenide locator
Symbol symbol = $symbol("span.icon-class");
// Creating a symbol using a Selenium locator and assigning a custom name
Symbol namedSymbol = $symbol(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
ConstructorsConstructorDescriptionSymbol()Default constructor.Symbol(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Symbol` using aSelenideElement.Constructor that initializes a `Symbol` using aSelenideElementand a name.Constructor that initializes a `Symbol` using a Selenide locator string.Constructor that initializes a `Symbol` using a Selenide locator string and a name.Symbol(org.openqa.selenium.By locator) Constructor that initializes a `Symbol` using a SeleniumBylocator.Constructor that initializes a `Symbol` using a SeleniumBylocator and a name. -
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
-
Symbol
public Symbol()Default constructor. Initializes the element type as "symbol". -
Symbol
Constructor that initializes a `Symbol` using a Selenide locator string.- Parameters:
selenideLocator- the Selenide locator as a string
-
Symbol
Constructor that initializes a `Symbol` using a Selenide locator string and a name.- Parameters:
selenideLocator- the Selenide locator as a stringname- the name of the symbol
-
Symbol
public Symbol(org.openqa.selenium.By locator) Constructor that initializes a `Symbol` using a SeleniumBylocator.- Parameters:
locator- the Selenium locator for the symbol
-
Symbol
Constructor that initializes a `Symbol` using a SeleniumBylocator and a name.- Parameters:
locator- the Selenium locator for the symbolname- the name of the symbol
-
Symbol
public Symbol(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Symbol` using aSelenideElement.- Parameters:
selenideElement- the Selenide element representing the symbol
-
Symbol
Constructor that initializes a `Symbol` using aSelenideElementand a name.- Parameters:
selenideElement- the Selenide element representing the symbolname- the name of the symbol
-
-
Method Details
-
$symbol
-
$symbol
-
$symbol
-
$symbol
-
$symbol
-
$symbol
-
_$symbol
-