Class BidiBrowserEventCollector

java.lang.Object
com.shaft.capture.collector.BidiBrowserEventCollector
All Implemented Interfaces:
BrowserEventCollector, AutoCloseable

public final class BidiBrowserEventCollector extends Object implements BrowserEventCollector
WebDriver BiDi collector using preload scripts for immediate cross-context signals.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver)
    Creates a BiDi collector.
    BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes)
    Creates a BiDi collector.
    BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes, String stepsEndpoint, String stepsToken)
    Creates a BiDi collector with a steps-rehydration endpoint so the recorder UI can source its step list from the server-side session store across navigations, including cross-origin ones, instead of page-scoped storage.
    BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes, String stepsEndpoint, String stepsToken, String eventEndpoint, String eventToken)
    Creates a BiDi collector whose preload script also posts every signal to the loopback event sink, so preload-installed recorder instances have two delivery channels (the BiDi script channel and the HTTP sink).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Stops collection and releases protocol listeners.
    void
    start(Consumer<BrowserSignal> signalConsumer, Consumer<String> warningConsumer)
    Starts event collection.

    Methods inherited from class Object

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

    • BidiBrowserEventCollector

      public BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver)
      Creates a BiDi collector.
      Parameters:
      driver - BiDi-capable driver
    • BidiBrowserEventCollector

      public BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes)
      Creates a BiDi collector.
      Parameters:
      driver - BiDi-capable driver
      testIdAttributes - locator test-id attributes
    • BidiBrowserEventCollector

      public BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes, String stepsEndpoint, String stepsToken)
      Creates a BiDi collector with a steps-rehydration endpoint so the recorder UI can source its step list from the server-side session store across navigations, including cross-origin ones, instead of page-scoped storage.
      Parameters:
      driver - BiDi-capable driver
      testIdAttributes - locator test-id attributes
      stepsEndpoint - optional loopback steps query endpoint
      stepsToken - optional loopback steps query token
    • BidiBrowserEventCollector

      public BidiBrowserEventCollector(org.openqa.selenium.WebDriver driver, List<String> testIdAttributes, String stepsEndpoint, String stepsToken, String eventEndpoint, String eventToken)
      Creates a BiDi collector whose preload script also posts every signal to the loopback event sink, so preload-installed recorder instances have two delivery channels (the BiDi script channel and the HTTP sink). Single-channel preload delivery lost signals from back/forward-cache restored pages.
      Parameters:
      driver - BiDi-capable driver
      testIdAttributes - locator test-id attributes
      stepsEndpoint - optional loopback steps query endpoint
      stepsToken - optional loopback steps query token
      eventEndpoint - optional loopback event endpoint
      eventToken - optional loopback event token
  • Method Details