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 booleanisSilent()static InTheBrowserperform(java.util.function.Consumer<BrowseTheWeb> action)<T extends Actor>
voidperformAs(T actor)PerformablewithNoReporting()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
-
InTheBrowser
-
-
Method Details
-
perform
-
performAs
- Specified by:
performAsin interfacePerformable
-
isSilent
public boolean isSilent()- Specified by:
isSilentin interfaceCanBeSilent
-
withNoReporting
-