Class InTheBrowser

java.lang.Object
net.serenitybdd.screenplay.actions.InTheBrowser
All Implemented Interfaces:
net.serenitybdd.core.SkipNested, net.serenitybdd.markers.CanBeSilent, net.serenitybdd.screenplay.Performable

public class InTheBrowser extends Object implements net.serenitybdd.screenplay.Performable, net.serenitybdd.markers.CanBeSilent
Perform an action directly with the Serenity WebDriver API. For example:
     
         actor.attemptsTo(
             InTheBrowser.perform(
                 browser -> browser.evaluateJavascript("window.localStorage.clear()")
             )
         );
     
 
You can access the Driver instance directly using browser.getDriver().
  • Constructor Details

  • Method Details

    • perform

      public static InTheBrowser perform(Consumer<BrowseTheWeb> action)
    • performAs

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

      public boolean isSilent()
      Specified by:
      isSilent in interface net.serenitybdd.markers.CanBeSilent
    • withNoReporting

      public net.serenitybdd.screenplay.Performable withNoReporting()