Package allurium.inputs
Class AbstractRequiredTextArea
java.lang.Object
allurium.primitives.UIElement
allurium.inputs.AbstractInputElement
allurium.inputs.TextField
allurium.inputs.TextArea
allurium.inputs.AbstractRequiredTextArea
- All Implemented Interfaces:
AlluriumElement,InputElement,ListComponent,RequiredInput,TextInputAsserts,WebElementMeta,Writable
Represents an abstract class for a required text area in the UI, extending
TextArea.
This class implements the RequiredInput interface, adding functionality specific to
required text areas, such as methods to check if the field is marked as required and assert its state.
It also includes utility methods to verify if an error message is displayed.
Features:
- Implements
RequiredInputfor standardized handling of required fields. - Checks for required field indicators using
isMarked(). - Assertions to validate the required state of the text area:
assertMarkedAsRequired()ensures the text area is marked as required.assertNotMarkedAsRequired()ensures the text area is not marked as required.
- Designed for extension to implement specific behaviors of required text areas.
Purpose:
- Encapsulates behavior specific to required text areas.
- Provides utility methods for asserting required field states and error indicators in tests.
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractRequiredTextArea(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a required text area using a Selenide element.AbstractRequiredTextArea(com.codeborne.selenide.SelenideElement selenideElement, String name) Constructor that initializes a required text area using a Selenide element and a name.AbstractRequiredTextArea(String selenideLocator) Constructor that initializes a required text area using a Selenide locator string.AbstractRequiredTextArea(String selenideLocator, String name) Constructor that initializes a required text area using a Selenide locator string and a name.AbstractRequiredTextArea(org.openqa.selenium.By rootLocator) Constructor that initializes a required text area using a SeleniumBylocator.AbstractRequiredTextArea(org.openqa.selenium.By rootLocator, String name) Constructor that initializes a required text area using a SeleniumBylocator and a name. -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts that the text area is marked as required.voidAsserts that the text area is not marked as required.abstract booleanChecks if an error message is shown for the required text area.abstract booleanisMarked()Checks if the text area is marked as required.Methods inherited from class allurium.inputs.TextArea
_$textArea, $textArea, $textArea, $textArea, $textArea, $textArea, $textAreaMethods inherited from class allurium.inputs.TextField
_$textField, $textField, $textField, $textField, $textField, $textField, $textField, assertCurrentValue, assertCurrentValueContains, assertEmpty, assertNotEmpty, clear, clearAndWrite, getId, pressEnter, value, writeMethods inherited from class allurium.inputs.AbstractInputElement
assertDisabled, assertEnabled, isDisabledMethods inherited from class allurium.primitives.UIElement
_$uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, applyName, applyName, as, 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, 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.InputElement
isDisabledMethods inherited from interface allurium.interfaces.WebElementMeta
getDescription, getMetaKeys, getParent, setAssignNameMethod, setDescription, setParent, setUiElementName
-
Constructor Details
-
AbstractRequiredTextArea
public AbstractRequiredTextArea()Default constructor. Initializes the element type as "textarea_required". -
AbstractRequiredTextArea
public AbstractRequiredTextArea(org.openqa.selenium.By rootLocator) Constructor that initializes a required text area using a SeleniumBylocator.- Parameters:
rootLocator- the Selenium locator for the required text area
-
AbstractRequiredTextArea
Constructor that initializes a required text area using a SeleniumBylocator and a name.- Parameters:
rootLocator- the Selenium locator for the required text areaname- the name of the required text area
-
AbstractRequiredTextArea
Constructor that initializes a required text area using a Selenide locator string.- Parameters:
selenideLocator- the Selenide locator as a string
-
AbstractRequiredTextArea
Constructor that initializes a required text area using a Selenide locator string and a name.- Parameters:
selenideLocator- the Selenide locator as a stringname- the name of the required text area
-
AbstractRequiredTextArea
public AbstractRequiredTextArea(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a required text area using a Selenide element.- Parameters:
selenideElement- the Selenide element representing the required text area
-
AbstractRequiredTextArea
public AbstractRequiredTextArea(com.codeborne.selenide.SelenideElement selenideElement, String name) Constructor that initializes a required text area using a Selenide element and a name.- Parameters:
selenideElement- the Selenide element representing the required text areaname- the name of the required text area
-
-
Method Details
-
isErrorMessageShown
public abstract boolean isErrorMessageShown()Checks if an error message is shown for the required text area.- Returns:
trueif an error message is displayed,falseotherwise
-
isMarked
public abstract boolean isMarked()Checks if the text area is marked as required.- Specified by:
isMarkedin interfaceRequiredInput- Returns:
trueif the field is marked as required,falseotherwise
-
assertMarkedAsRequired
public void assertMarkedAsRequired()Asserts that the text area is marked as required.= Step: Processed by Aspect =
- Specified by:
assertMarkedAsRequiredin interfaceRequiredInput
-
assertNotMarkedAsRequired
public void assertNotMarkedAsRequired()Asserts that the text area is not marked as required.= Step: Processed by Aspect =
- Specified by:
assertNotMarkedAsRequiredin interfaceRequiredInput
-