module Selenium::WebDriver::DriverExtensions::HasSessionEvents

Public Instance Methods

fire_session_event(event_type, payload = nil) click to toggle source

Fires a custom session event to the remote server event bus. This allows test code to trigger server-side utilities that subscribe to the event bus.

@param [String] event_type The type of event (e.g., “test:failed”, “log:collect”) @param [Hash] payload Optional data to include with the event @return [Hash] Response data including success status, event type, and timestamp

@example Fire a simple event

driver.fire_session_event("test:started")

@example Fire an event with payload

driver.fire_session_event("test:failed", {
  testName: "LoginTest",
  error: "Element not found"
})
# File lib/selenium/webdriver/common/driver_extensions/has_session_events.rb, line 42
def fire_session_event(event_type, payload = nil)
  @bridge.fire_session_event(event_type, payload)
end