chrome-reactive-kotlin is a low level Chrome DevTools Protocol client written in Kotlin and leveraging RxJava3 for easy composability.
Library exposes all protocol [pl.wendigo.chrome.api.ProtocolDomains] in a single, cohesive and highly composable API. It supports both headless and non-headless Chrome automation capabilities.
Contains library main entrypoint class ([Browser]) responsible for connecting to remote headless Chrome instance, creating and managing targets (web pages).
[Browser] object can be obtained using [Browser.Builder]. Then [Target]s can be created using [Browser.target] method.
@sample pl.wendigo.chrome.samples.CreateNewTarget.main @sample pl.wendigo.chrome.samples.CreateBrowser.main
Contains DevTools protocol representation classes:
- [ProtocolConnection] is a class responsible for sending and receiving protocol responses and events over [WebsocketFramesStream]
- [Event] is a parent class of all events that are generated by protocol
- [RawEvent] represents an event that is parameterless
- [Domain] is parent class of all protocol domain classes
- [Domains] is parent class representing whole protocol with all [Domain]s
Contains DevTools protocol WebSocket primitives and utility classes:
- [WebSocketFramesStream] represents stream of frames that are exchanged between protocol client and the browser over the WebSocket connection
- [RequestFrame] represents frame that is sent over the WebSocket connection
- [ResponseFrame] represents different frame types that are received over the WebSocket connection:
- [ErrorResponseFrame] represents error frame that is received if the request is malformed and/or invalid
- [RequestResponseFrame] represents response frame that is received when request was fulfilled successfully
- [EventResponseFrame] represents event frame that is received when [Domain] event is generated
Targets management related classes ([Manager], [SessionTarget], [Target])
Contains auto-generated definitions of domains with methods, events, types.
[ProtocolDomains] is a class that is used to retrieve protocol's domain objects.