Package allurium.primitives
Class Value
java.lang.Object
allurium.primitives.UIElement
allurium.primitives.Value
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents a `Value` element in the UI, extending
UIElement.
This class encapsulates the behavior and attributes of elements representing values or metrics in the UI, such as numerical displays, calculated values, or status indicators. It provides constructors and factory methods for creating and interacting with value elements.
Features:
- Encapsulates behavior and attributes of value elements.
- Provides constructors for flexible initialization using:
- Selenide locators as strings
- Selenium
Bylocators SelenideElementinstances
- Includes static factory methods for convenient creation of `Value` instances.
Purpose:
- Standardizes interaction with value elements in the UI.
- Simplifies creation and management of value elements in tests.
Constructors:
Value()- Default constructor.Value(String)- Creates a `Value` using a Selenide locator string.Value(String, String)- Creates a `Value` using a Selenide locator string and a name.Value(By)- Creates a `Value` using a SeleniumBylocator.Value(By, String)- Creates a `Value` using a SeleniumBylocator and a name.Value(SelenideElement)- Creates a `Value` using aSelenideElement.Value(SelenideElement, String)- Creates a `Value` using aSelenideElementand a name.
Static Factory Methods:
$value(By)- Creates a `Value` using a SeleniumBylocator.$value(By, String)- Creates a `Value` using a SeleniumBylocator and a name.$value(SelenideElement)- Creates a `Value` using aSelenideElement.$value(SelenideElement, String)- Creates a `Value` using aSelenideElementand a name.$value(String)- Creates a `Value` using a Selenide locator string.$value(String, String)- Creates a `Value` using a Selenide locator string and a name._$value(String)- Creates a `Value` using an XPath expression.
Usage Example:
// Creating a value element using a Selenide locator
Value value = $value(".value-display");
// Creating a value element with a custom name
Value namedValue = $value(By.cssSelector(".value-display"), "Total Value");
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
ConstructorsConstructorDescriptionValue()Default constructor.Value(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Value` element using aSelenideElement.Constructor that initializes a `Value` element using aSelenideElementand a name.Constructor that initializes a `Value` element using a Selenide locator string.Constructor that initializes a `Value` element using a Selenide locator string and a name.Value(org.openqa.selenium.By locator) Constructor that initializes a `Value` element using a SeleniumBylocator.Constructor that initializes a `Value` element 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
-
Value
public Value()Default constructor. Initializes the element type as "value". -
Value
Constructor that initializes a `Value` element using a Selenide locator string.- Parameters:
selenideLocator- the Selenide locator as a string
-
Value
Constructor that initializes a `Value` element using a Selenide locator string and a name.- Parameters:
selenideLocator- the Selenide locator as a stringname- the name of the value element
-
Value
public Value(org.openqa.selenium.By locator) Constructor that initializes a `Value` element using a SeleniumBylocator.- Parameters:
locator- the Selenium locator for the value element
-
Value
Constructor that initializes a `Value` element using a SeleniumBylocator and a name.- Parameters:
locator- the Selenium locator for the value elementname- the name of the value element
-
Value
public Value(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Value` element using aSelenideElement.- Parameters:
selenideElement- the Selenide element representing the value element
-
Value
Constructor that initializes a `Value` element using aSelenideElementand a name.- Parameters:
selenideElement- the Selenide element representing the value elementname- the name of the value element
-
-
Method Details
-
$value
-
$value
-
$value
-
$value
-
$value
-
$value
-
_$value
-