Class WaitForResponse
java.lang.Object
net.serenitybdd.screenplay.playwright.network.WaitForResponse
- All Implemented Interfaces:
net.serenitybdd.core.SkipNested,net.serenitybdd.screenplay.Performable
Wait for a network response matching a pattern while performing an action.
This interaction uses Playwright's waitForResponse which expects an action that triggers the response. Use it with whilePerforming() to specify the action.
-
Method Summary
Modifier and TypeMethodDescriptionstatic WaitForResponsecontainingUrl(String substring) Wait for a response where the URL contains the substring.static WaitForResponseWait for a response where the URL matches the glob pattern.static WaitForResponseWait for a response where the URL matches the regex pattern.<T extends net.serenitybdd.screenplay.Actor>
voidperformAs(T actor) whilePerforming(net.serenitybdd.screenplay.Performable action) Specify the action that triggers the response.withTimeout(double timeoutMs) Set a custom timeout in milliseconds.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
-
matching
Wait for a response where the URL matches the glob pattern. -
matching
Wait for a response where the URL matches the regex pattern. -
containingUrl
Wait for a response where the URL contains the substring. -
whilePerforming
Specify the action that triggers the response. The action will be performed while waiting for the response. -
withTimeout
Set a custom timeout in milliseconds. -
performAs
public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor) - Specified by:
performAsin interfacenet.serenitybdd.screenplay.Performable
-