Class BrowserEventScript
java.lang.Object
com.shaft.capture.collector.BrowserEventScript
Loads the browser-side semantic event listener.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns JavaScript that drains fallback signals.static StringReturns JavaScript that installs the fallback queue listener.static StringfallbackInstallation(List<String> testIdAttributes) Returns JavaScript that installs the fallback queue listener with custom test-id attributes.static StringfallbackInstallation(List<String> testIdAttributes, String eventEndpoint, String eventToken) Returns JavaScript that installs the fallback queue listener with a loopback event sink.static StringfallbackInstallation(List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint, String stepsToken) Returns JavaScript that installs the fallback queue listener with a loopback event sink and the control-server steps endpoint used to rehydrate the recorder UI step list across navigations, including cross-origin ones, from the server-side session store rather than page-scoped storage.static StringReturns the BiDi preload function declaration.static StringpreloadFunction(List<String> testIdAttributes) Returns the BiDi preload function declaration with custom test-id attributes.static StringpreloadFunction(List<String> testIdAttributes, String stepsEndpoint, String stepsToken) Returns the BiDi preload function declaration with custom test-id attributes and the control-server steps endpoint used to rehydrate the recorder UI step list across navigations, including cross-origin ones, from the server-side session store rather than page-scoped storage.static StringpreloadFunction(List<String> testIdAttributes, String stepsEndpoint, String stepsToken, String eventEndpoint, String eventToken) Returns the BiDi preload function declaration with the loopback event sink baked in, so preload-installed recorder instances deliver every signal through both the BiDi script channel and the HTTP sink.
-
Method Details
-
preloadFunction
Returns the BiDi preload function declaration.- Returns:
- JavaScript function
-
preloadFunction
-
preloadFunction
public static String preloadFunction(List<String> testIdAttributes, String stepsEndpoint, String stepsToken) Returns the BiDi preload function declaration with custom test-id attributes and the control-server steps endpoint used to rehydrate the recorder UI step list across navigations, including cross-origin ones, from the server-side session store rather than page-scoped storage.- Parameters:
testIdAttributes- locator test-id attributesstepsEndpoint- loopback steps query endpointstepsToken- loopback steps query token- Returns:
- JavaScript function
-
preloadFunction
public static String preloadFunction(List<String> testIdAttributes, String stepsEndpoint, String stepsToken, String eventEndpoint, String eventToken) Returns the BiDi preload function declaration with the loopback event sink baked in, so preload-installed recorder instances deliver every signal through both the BiDi script channel and the HTTP sink. Single-channel preload delivery lost signals from back/forward-cache restored pages.- Parameters:
testIdAttributes- locator test-id attributesstepsEndpoint- loopback steps query endpointstepsToken- loopback steps query tokeneventEndpoint- loopback event endpointeventToken- loopback event token- Returns:
- JavaScript function
-
fallbackInstallation
Returns JavaScript that installs the fallback queue listener.- Returns:
- installation JavaScript
-
fallbackInstallation
-
fallbackInstallation
public static String fallbackInstallation(List<String> testIdAttributes, String eventEndpoint, String eventToken) Returns JavaScript that installs the fallback queue listener with a loopback event sink.- Parameters:
testIdAttributes- locator test-id attributeseventEndpoint- loopback event endpointeventToken- loopback event token- Returns:
- installation JavaScript
-
fallbackInstallation
public static String fallbackInstallation(List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint, String stepsToken) Returns JavaScript that installs the fallback queue listener with a loopback event sink and the control-server steps endpoint used to rehydrate the recorder UI step list across navigations, including cross-origin ones, from the server-side session store rather than page-scoped storage.- Parameters:
testIdAttributes- locator test-id attributeseventEndpoint- loopback event endpointeventToken- loopback event tokenstepsEndpoint- loopback steps query endpointstepsToken- loopback steps query token- Returns:
- installation JavaScript
-
fallbackDrain
Returns JavaScript that drains fallback signals.- Returns:
- queue drain JavaScript
-