java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.Enter
All Implemented Interfaces:
net.serenitybdd.core.SkipNested, net.serenitybdd.screenplay.Performable

public class Enter extends Object implements 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
    Constructor
    Description
    Default constructor required by Screenplay
    Enter(String value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.serenitybdd.screenplay.Performable
    into(String selector)
     
    net.serenitybdd.screenplay.Performable
    into(Target target)
     
    <T extends net.serenitybdd.screenplay.Actor>
    void
    performAs(T actor)
     
    static Enter
     
    net.serenitybdd.screenplay.Performable
    withOptions(com.microsoft.playwright.Locator.FillOptions options)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.serenitybdd.screenplay.Performable

    then
  • Constructor Details

    • Enter

      public Enter()
      Default constructor required by Screenplay
    • Enter

      public Enter(String value)
  • Method Details

    • theValue

      public static Enter theValue(String value)
    • into

      public net.serenitybdd.screenplay.Performable into(String selector)
    • into

      public net.serenitybdd.screenplay.Performable into(Target target)
    • 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:
      performAs in interface net.serenitybdd.screenplay.Performable