Class StartTracing
java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.tracing.StartTracing
- All Implemented Interfaces:
net.serenitybdd.core.SkipNested,net.serenitybdd.screenplay.Performable
Start Playwright tracing to capture screenshots, snapshots, and network activity.
Traces can be viewed using the Playwright Trace Viewer.
Sample usage:
// Start tracing with default options
actor.attemptsTo(StartTracing.withName("my-test"));
// Start tracing with all options enabled
actor.attemptsTo(
StartTracing.withName("checkout-flow")
.withScreenshots()
.withSnapshots()
.withSources()
);
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T extends net.serenitybdd.screenplay.Actor>
voidperformAs(T actor) static StartTracingStart tracing with the given name.Disable screenshot capture during tracing.Disable DOM snapshot capture during tracing.Enable screenshot capture during tracing.Enable DOM snapshot capture during tracing.Enable source code capture in traces.Set a display title for the trace.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
-
withName
Start tracing with the given name.- Parameters:
name- The name for this trace (used in trace file)
-
withScreenshots
Enable screenshot capture during tracing. -
withoutScreenshots
Disable screenshot capture during tracing. -
withSnapshots
Enable DOM snapshot capture during tracing. -
withoutSnapshots
Disable DOM snapshot capture during tracing. -
withSources
Enable source code capture in traces. -
withTitle
Set a display title for the trace. -
performAs
public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor) - Specified by:
performAsin interfacenet.serenitybdd.screenplay.Performable
-