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

public class WaitFor extends Object implements net.serenitybdd.screenplay.Performable
Wait for some element or state.

Sample usage:

     WaitFor.selector("#searchbutton");
 
  • Constructor Details

    • WaitFor

      public WaitFor()
      Default constructor required by Screenplay
    • WaitFor

      public WaitFor(Target target)
  • Method Details

    • selector

      public static WaitFor selector(String selector)
    • selector

      public static WaitFor selector(Target target)
      Wait for an element to be in a given state.
    • withOptions

      public WaitFor withOptions(com.microsoft.playwright.Locator.WaitForOptions options)
    • withTimeout

      public WaitFor withTimeout(double timeoutMs)
      Set timeout in milliseconds.
    • performAs

      public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor)
      Specified by:
      performAs in interface net.serenitybdd.screenplay.Performable
    • andThen

      public net.serenitybdd.screenplay.Performable andThen(Consumer<com.microsoft.playwright.Locator> nextAction)