Class StopTracing
java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.tracing.StopTracing
- All Implemented Interfaces:
net.serenitybdd.core.SkipNested,net.serenitybdd.screenplay.Performable
Stop Playwright tracing and save the trace file.
The trace can be viewed using the Playwright Trace Viewer:
npx playwright show-trace trace.zip
Sample usage:
// Stop tracing and save to default location
actor.attemptsTo(StopTracing.andSaveAs("my-trace"));
// Stop tracing and save to specific path
actor.attemptsTo(StopTracing.andSaveTo(Paths.get("traces/checkout.zip")));
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StopTracingStop tracing and save with the given name to the default traces directory.static StopTracingStop tracing and save to the specified path.static StopTracingStop tracing and save to the specified path.<T extends net.serenitybdd.screenplay.Actor>
voidperformAs(T actor) 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
-
Method Details
-
andSaveAs
Stop tracing and save with the given name to the default traces directory. The file will be saved as: target/playwright/traces/{name}.zip- Parameters:
name- The name for the trace file (without extension)
-
andSaveTo
Stop tracing and save to the specified path.- Parameters:
path- The full path for the trace file (should end in .zip)
-
andSaveTo
Stop tracing and save to the specified path.- Parameters:
path- The full path for the trace file (should end in .zip)
-
performAs
public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor) - Specified by:
performAsin interfacenet.serenitybdd.screenplay.Performable
-