Class PollingBrowserEventCollector
java.lang.Object
com.shaft.capture.collector.PollingBrowserEventCollector
- All Implemented Interfaces:
BrowserEventCollector, AutoCloseable
Classic WebDriver fallback for browsers where BiDi collection is unavailable.
-
Constructor Summary
ConstructorsConstructorDescriptionPollingBrowserEventCollector(org.openqa.selenium.WebDriver driver) Creates a classic WebDriver collector.PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning) Creates a classic WebDriver collector.PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes) Creates a classic WebDriver collector.PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken) Creates a classic WebDriver collector.PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint) Creates a classic WebDriver 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.PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint, BooleanSupplier recentBidiActivity) Creates a classic WebDriver collector that skips its own redundant script round-trips whilerecentBidiActivityreports that a BiDi collector running alongside it is already delivering the same signals, and resumes full-rate polling the moment BiDi goes quiet. -
Method Summary
-
Constructor Details
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver) Creates a classic WebDriver collector.- Parameters:
driver- active driver
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning) Creates a classic WebDriver collector.- Parameters:
driver- active driverreportFallbackWarning- whether status should report reduced BiDi coverage
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes) Creates a classic WebDriver collector.- Parameters:
driver- active driverreportFallbackWarning- whether status should report reduced BiDi coveragetestIdAttributes- locator test-id attributes
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken) Creates a classic WebDriver collector.- Parameters:
driver- active driverreportFallbackWarning- whether status should report reduced BiDi coveragetestIdAttributes- locator test-id attributeseventEndpoint- optional loopback event endpointeventToken- optional loopback event token
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint) Creates a classic WebDriver 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- active driverreportFallbackWarning- whether status should report reduced BiDi coveragetestIdAttributes- locator test-id attributeseventEndpoint- optional loopback event endpointeventToken- optional loopback event tokenstepsEndpoint- optional loopback steps query endpoint
-
PollingBrowserEventCollector
public PollingBrowserEventCollector(org.openqa.selenium.WebDriver driver, boolean reportFallbackWarning, List<String> testIdAttributes, String eventEndpoint, String eventToken, String stepsEndpoint, BooleanSupplier recentBidiActivity) Creates a classic WebDriver collector that skips its own redundant script round-trips whilerecentBidiActivityreports that a BiDi collector running alongside it is already delivering the same signals, and resumes full-rate polling the moment BiDi goes quiet.- Parameters:
driver- active driverreportFallbackWarning- whether status should report reduced BiDi coveragetestIdAttributes- locator test-id attributeseventEndpoint- optional loopback event endpointeventToken- optional loopback event tokenstepsEndpoint- optional loopback steps query endpointrecentBidiActivity- reports true while BiDi is proven healthy
-
-
Method Details
-
start
Description copied from interface:BrowserEventCollectorStarts event collection.- Specified by:
startin interfaceBrowserEventCollector- Parameters:
signalConsumer- signal destinationwarningConsumer- safe warning destination
-
close
public void close()Description copied from interface:BrowserEventCollectorStops collection and releases protocol listeners.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBrowserEventCollector
-