Class Enter
java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.Enter
- All Implemented Interfaces:
net.serenitybdd.core.SkipNested,net.serenitybdd.screenplay.Performable
Enter a text value into an input field.
This task waits for an element matching selector, waits for actionability checks, focuses the element,
fills it and triggers an input event after filling. If the element is inside the label element that has associated control,
that control will be filled instead.
If the element to be filled is not an input, textarea or [contenteditable] element, this method throws an error.
Note that you can pass an empty string to clear the input field.
Sample usage:
Enter.theValue("pengins").into("#searchfield");
Or
Target SEARCH_FIELD = Target.the("Search field").locatedBy("#search_form_input_homepage")
Enter.theValue("penguins").into(SEARCH_FIELD);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.serenitybdd.screenplay.Performablenet.serenitybdd.screenplay.Performable<T extends net.serenitybdd.screenplay.Actor>
voidperformAs(T actor) static Enternet.serenitybdd.screenplay.PerformablewithOptions(com.microsoft.playwright.Locator.FillOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.serenitybdd.screenplay.Performable
then
-
Constructor Details
-
Enter
public Enter()Default constructor required by Screenplay -
Enter
-
-
Method Details
-
theValue
-
into
-
into
-
withOptions
public net.serenitybdd.screenplay.Performable withOptions(com.microsoft.playwright.Locator.FillOptions options) -
performAs
public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor) - Specified by:
performAsin interfacenet.serenitybdd.screenplay.Performable
-