Class PlaywrightNetworkInterceptor
java.lang.Object
com.shaft.gui.browser.internal.PlaywrightNetworkInterceptor
Owns browser network interception rules for one Playwright browser context.
-
Constructor Summary
ConstructorsConstructorDescriptionPlaywrightNetworkInterceptor(com.microsoft.playwright.BrowserContext browserContext) Creates a Playwright network interceptor backed by BrowserContext routing. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a rule and activates routing for the current browser context.voidclear()Clears all registered rules and removes the Playwright route handler.voidStarts passive network observation for contract recording or validation.
-
Constructor Details
-
PlaywrightNetworkInterceptor
public PlaywrightNetworkInterceptor(com.microsoft.playwright.BrowserContext browserContext) Creates a Playwright network interceptor backed by BrowserContext routing.- Parameters:
browserContext- active Playwright browser context
-
-
Method Details
-
addRule
Adds a rule and activates routing for the current browser context.- Parameters:
rule- rule to add
-
startObserving
public void startObserving()Starts passive network observation for contract recording or validation. -
clear
public void clear()Clears all registered rules and removes the Playwright route handler.
-