This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-16
Channels
- # announcements (62)
- # babashka (12)
- # babashka-sci-dev (73)
- # beginners (16)
- # biff (10)
- # calva (65)
- # cider (13)
- # clerk (8)
- # clojure (31)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (19)
- # clojure-spec (24)
- # clojure-uk (5)
- # clojuredesign-podcast (18)
- # clojurescript (18)
- # dev-tooling (2)
- # emacs (30)
- # etaoin (4)
- # gratitude (3)
- # hyperfiddle (20)
- # integrant (2)
- # jobs (4)
- # kaocha (7)
- # malli (1)
- # observability (11)
- # off-topic (11)
- # pathom (12)
- # podcasts-discuss (7)
- # portal (12)
- # quil (3)
- # re-frame (6)
- # releases (1)
- # sql (22)
- # squint (5)
- # testing (79)
- # tools-deps (3)
- # xtdb (20)
In the case where I have a vector of letters ["a" "b" "c"] and I want to algorithmically insert multiple (e/add-key-press %)
calls from mapping over the vector. How could I do that using the threaded macro similar to the https://cljdoc.org/d/etaoin/etaoin/1.0.40/doc/user-guide#actions:~:text=Here%E2%80%99s%20a%20slightly%20larger%20working%20annotated%20example%3A? Could I, for example, merge the make-key-input call with a vector of key-presses? Or is the better call to use the https://cljdoc.org/d/etaoin/etaoin/1.0.40/doc/user-guide#actions:~:text=You%20can%20create%20a%20map%20manually%20and%20send%20it%20to%20the%20perform%2Dactions%20method%3A?
A wonky example of what I'm trying to accomplish. 🙂
(let [actions (map (fn [e]
(cond
(= (str e) "\b") (conj (e/add-key-press k/backspace))
:else (conj (e/add-key-press (str e)))))
vector-of-letters)
keyboard (-> (e/make-key-input)
(conj actions))]
(e/perform-actions driver keyboard))
Hi @U03F0727DV0! I've not played too much with webdriver actions, other than verifying that the examples worked while updating the docs...
I am not sure exactly what your goal is (yet). If it is something like Etaoin's fill-human, https://github.com/clj-commons/etaoin/blob/v1.0.40/src/etaoin/api.clj#L2895.