Class BrowserEventScript

java.lang.Object
com.shaft.capture.collector.BrowserEventScript

public final class BrowserEventScript extends Object
Loads the browser-side semantic event listener.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Returns JavaScript that drains fallback signals.
    static String
    Returns JavaScript that installs the fallback queue listener.
    static String
    fallbackInstallation(List<String> testIdAttributes)
    Returns JavaScript that installs the fallback queue listener with custom test-id attributes.
    static String
    fallbackInstallation(List<String> testIdAttributes, String eventEndpoint, String eventToken)
    Returns JavaScript that installs the fallback queue listener with a loopback event sink.
    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.
    static String
    Returns the BiDi preload function declaration.
    static String
    preloadFunction(List<String> testIdAttributes)
    Returns the BiDi preload function declaration with custom test-id attributes.
    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.
    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.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • preloadFunction

      public static String preloadFunction()
      Returns the BiDi preload function declaration.
      Returns:
      JavaScript function
    • preloadFunction

      public static String preloadFunction(List<String> testIdAttributes)
      Returns the BiDi preload function declaration with custom test-id attributes.
      Parameters:
      testIdAttributes - locator test-id attributes
      Returns:
      JavaScript function
    • 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 attributes
      stepsEndpoint - loopback steps query endpoint
      stepsToken - 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 attributes
      stepsEndpoint - loopback steps query endpoint
      stepsToken - loopback steps query token
      eventEndpoint - loopback event endpoint
      eventToken - loopback event token
      Returns:
      JavaScript function
    • fallbackInstallation

      public static String fallbackInstallation()
      Returns JavaScript that installs the fallback queue listener.
      Returns:
      installation JavaScript
    • fallbackInstallation

      public static String fallbackInstallation(List<String> testIdAttributes)
      Returns JavaScript that installs the fallback queue listener with custom test-id attributes.
      Parameters:
      testIdAttributes - locator test-id attributes
      Returns:
      installation JavaScript
    • 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 attributes
      eventEndpoint - loopback event endpoint
      eventToken - 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 attributes
      eventEndpoint - loopback event endpoint
      eventToken - loopback event token
      stepsEndpoint - loopback steps query endpoint
      stepsToken - loopback steps query token
      Returns:
      installation JavaScript
    • fallbackDrain

      public static String fallbackDrain()
      Returns JavaScript that drains fallback signals.
      Returns:
      queue drain JavaScript