Coder Social home page Coder Social logo

wally's Introduction

Clojars Project

Wally

A Clojure Playwright wrapper.

Wally is a very nice person I work with, so I have created this library for him, also because I needed a library where I could use the w alias, but mostly because I am very fond of this good man =D

Very early alpha version, expect breaking changes!

Playwright in the same category as the etaoin webdriver (parts of the API were heavily influenced by it), but leaning towards Cypress as there is huge support for testing, but, different from Cypress and like etaoin, PW just works in the REPL.

Walstrom.mp4

Usage

;; Here you have the main Wally namespace.
(require '[wally.main :as w])

;; Here you have some custom garden selectors + the usual ones.
(require '[wally.selectors :as ws])
(require '[garden.selectors :as s])

;; Copy jsonista deps.edn dep.
(do
  ;; When some command is run for the first time, Playwright
  ;; will kick in and open a browser.
  (w/navigate "https://clojars.org/metosin/jsonista")
  (w/click [(ws/text "Copy") (ws/nth= "1")]))

;; Check number of downloads for reitit.
(do
  (w/fill :#search "reitit")
  (w/keyboard-press "Enter")
  (w/click (s/a (s/attr= :href "/metosin/reitit")))
  (.textContent (w/-query (ws/text "Downloads"))))

;; Get the Playwright page object.
;; https://playwright.dev/docs/api/class-page.
(w/get-page)

wally's People

Contributors

pfeodrippe avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.