Module
Lunapark.Types
- Package
- purescript-lunapark
- Repository
- slamdata/purescript-lunapark
This module contains types for requests and response.
Most of them are records with α → Json
and Json → Either String α
functions
not newtypes with Encode|DecodeJson
instances.
#WindowHandle Source
#encodeElement Source
encodeElement :: Element -> Json
#CreateSessionResponse Source
type CreateSessionResponse = { capabilities :: Array Capability, session :: SessionId }
#ServerStatus Source
type ServerStatus = { message :: String, ready :: Boolean }
#Timeouts Source
type Timeouts = { implicit :: Milliseconds, pageLoad :: Milliseconds, script :: Milliseconds }
#encodeTimeouts Source
encodeTimeouts :: Timeouts -> Json
#encodeGoRequest Source
encodeGoRequest :: String -> Json
#encodeFrameId Source
encodeFrameId :: FrameId -> Json
#encodeRectangleLegacy Source
encodeRectangleLegacy :: Rectangle -> { position :: Json, size :: Json }
#encodeRectangle Source
encodeRectangle :: Rectangle -> Json
#RawLocator Source
type RawLocator = { using :: String, value :: String }
#encodeLocator Source
encodeLocator :: Locator -> Json
#encodeSendKeysRequest Source
encodeSendKeysRequest :: String -> Json
#encodeScript Source
encodeScript :: Script -> Json
#encodeCookie Source
encodeCookie :: Cookie -> Json
#Screenshot Source
type Screenshot = { content :: String, encoding :: Encoding }
#encodeButton Source
encodeButton :: Button -> Json
#PointerMove Source
type PointerMove = { duration :: Milliseconds, origin :: PointerMoveOrigin, x :: Int, y :: Int }
#Action Source
type Action = Variant (keyDown :: Char, keyUp :: Char, pause :: Milliseconds, pointerDown :: Button, pointerMove :: PointerMove, pointerUp :: Button)
#pointerDown Source
pointerDown :: forall a r. a -> Variant (pointerDown :: a | r)
#pointerMove Source
pointerMove :: forall a r. a -> Variant (pointerMove :: a | r)
#encodeAction Source
encodeAction :: Action -> Json
#ActionSequence Source
data ActionSequence
Constructors
NoSource (Array (Variant (pause :: Milliseconds)))
Key (Array (Variant (keyDown :: Char, keyUp :: Char, pause :: Milliseconds)))
Pointer PointerType (Array (Variant (pause :: Milliseconds, pointerDown :: Button, pointerMove :: PointerMove, pointerUp :: Button)))
#ActionRequest Source
type ActionRequest = Object ActionSequence
#DriverPaths Source
type DriverPaths = Map BrowserType FilePath
#encodeCapabilities Source
encodeCapabilities :: forall f. Foldable f => f Capability -> Json
#decodeCapabilities Source
decodeCapabilities :: Json -> Either String (Array Capability)
#CapabilitiesRequest Source
type CapabilitiesRequest = { alwaysMatch :: Array Capability, firstMatch :: Array (Array Capability) }
#MoveToRequest Source
type MoveToRequest = { element :: Maybe Element, xoffset :: Int, yoffset :: Int }