Package allurium.interfaces
Interface Writable
- All Known Implementing Classes:
AbstractRequiredTextArea
,AbstractRequiredTextField
,TextArea
,TextField
public interface Writable
Interface for web components that support writing and clearing text.
This interface is typically implemented by elements such as input fields, text areas, and other components where text can be entered or manipulated programmatically.
Purpose:
- Standardizes the behavior of writable elements in the UI.
- Ensures that implementing classes provide essential methods for writing, clearing, and asserting text values.
Common Implementations:
- Native input fields
- Text areas
- Custom components that mimic writable elements
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertCurrentValue
(String value) Asserts that the current value of the element matches the specified value.void
assertCurrentValueContains
(String value) Asserts that the current value of the element contains the specified substring.void
clear()
Clears the text from the element.void
Writes the specified text into the element.
-
Method Details
-
write
Writes the specified text into the element.- Parameters:
text
- the text to be entered
-
clear
void clear()Clears the text from the element. -
assertCurrentValue
Asserts that the current value of the element matches the specified value.- Parameters:
value
- the expected value of the element
-
assertCurrentValueContains
Asserts that the current value of the element contains the specified substring.- Parameters:
value
- the substring that the element's value should contain
-