Class InTheBrowser

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

public class InTheBrowser
extends java.lang.Object
implements Performable, 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 Summary

    Constructors 
    Constructor Description
    InTheBrowser​(java.util.function.Consumer<BrowseTheWeb> action)  
  • Method Summary

    Modifier and Type Method Description
    boolean isSilent()  
    static InTheBrowser perform​(java.util.function.Consumer<BrowseTheWeb> action)  
    <T extends Actor>
    void
    performAs​(T actor)  
    Performable withNoReporting()  

    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

    • InTheBrowser

      public InTheBrowser​(java.util.function.Consumer<BrowseTheWeb> action)
  • Method Details