slamdata/purescript-lunapark

Name: purescript-lunapark

Owner: SlamData, Inc.

Description: null

Created: 2018-04-23 14:04:10.0

Updated: 2018-05-15 09:38:15.0

Pushed: 2018-05-15 09:52:18.0

Homepage: null

Size: 27308

Language: PureScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Disclaimer
Purescript W3C webdriver protocol bindings

The main purpose of this library is to provide purescript webdriver/json-wire protocol bindings, such that won't involve any JavaScript dependencies.

Architecture
 = launchAff do
terpreterOrError ? init "http://localhost:4444/wd/hub" { alwaysMatch: [], firstMatch: [[BrowserName Chrome]] }
se intepreterOrError of
Left err ? throwError $ error "An error during selenium session initialization occured"
Right interpret ? Run.runBaseAff' $ Run.runExcept $ interpret do
  go "http://my-site.com"
  el ? findElement $ ByCss $ CSS.fromString ".my-class"
  clickEl el
  login ? findElement $ ByCss $ CSS.fromString "#login"
  password ? findElement $ ByCss $ CSS.fromString "#password"
  moveTo { origin: login, x: 0, y: 0, duration: Milliseconds 1000.0 }
  click
  sendKeys "login"
  moveTo { origin: password, x: 0, y: 0, duration: Milliseconds 100.0 }
  sendKeys "secret"
  sendKeys "\\xE007"

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.