Class SessionCreatedEvent

java.lang.Object
org.openqa.selenium.events.Event
org.openqa.selenium.grid.data.SessionCreatedEvent

public class SessionCreatedEvent extends Event
Event fired when a new session is successfully created on a node. This event provides rich context about the session for sidecar services to consume, enabling functionality such as video recording, logging, or other session lifecycle management.
  • Constructor Details

  • Method Details

    • listener

      public static EventListener<SessionCreatedData> listener(Consumer<SessionCreatedData> handler)
      Creates an event listener that receives full session creation data.
      Parameters:
      handler - the handler to process session creation events
      Returns:
      an EventListener configured for session created events
    • sessionIdListener

      public static EventListener<SessionCreatedData> sessionIdListener(Consumer<org.openqa.selenium.remote.SessionId> handler)
      Convenience method for listeners that only need the SessionId.
      Parameters:
      handler - the handler to process just the session ID
      Returns:
      an EventListener configured for session created events