Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 2.27 KB

package.md

File metadata and controls

46 lines (28 loc) · 2.27 KB

Module Chrome Reactive Kotlin

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.

Package pl.wendigo.chrome

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

Package pl.wendigo.chrome.protocol

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

Package pl.wendigo.chrome.protocol.websocket

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

Package pl.wendigo.chrome.targets

Targets management related classes ([Manager], [SessionTarget], [Target])

Package pl.wendigo.chrome.api

Contains auto-generated definitions of domains with methods, events, types.

[ProtocolDomains] is a class that is used to retrieve protocol's domain objects.