This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-05
Channels
- # announcements (14)
- # aws (7)
- # babashka (28)
- # beginners (16)
- # calva (2)
- # cider (1)
- # clj-commons (8)
- # clj-kondo (29)
- # clojure (213)
- # clojure-europe (39)
- # clojure-losangeles (2)
- # clojure-norway (9)
- # clojure-spec (2)
- # clojurescript (11)
- # community-development (1)
- # conjure (2)
- # cursive (6)
- # datalevin (2)
- # datomic (8)
- # emacs (29)
- # events (1)
- # fulcro (22)
- # graalvm (14)
- # improve-getting-started (1)
- # jobs (1)
- # lambdaisland (5)
- # leiningen (4)
- # lsp (7)
- # malli (13)
- # meander (11)
- # membrane (13)
- # off-topic (23)
- # polylith (9)
- # re-frame (4)
- # reagent (7)
- # reitit (6)
- # releases (2)
- # sql (58)
- # testing (8)
- # tools-deps (18)
- # web-security (2)
@U02F0C62TC1 Thanks for the response, dynamic is sometime response fields only be two, some time it would be six, some time response fields are :a :b :c
and some time they are :d :e
Is there a proven puppeteer equivalent for clojure?
i believe its https://github.com/clj-commons/etaoin
or can also just use puppeteer via #nbb https://github.com/babashka/nbb/blob/main/examples/puppeteer/example.cljs
mind blown. Thank Lispy
😄 also can throw https://github.com/babashka/nbb/blob/main/examples/playwright/example.cljs into it too for good measure. im never sure which one's the better 😅
@U03KA8JTY1G I'm a maintainer on etaoin, if you go that route and have questions feel free to drop by #etaoin. I've learned that some folks prefer playwright/puppeteer because it offers more control over such things as waiting for elements.
Hi Clojurians - I have a function where I want to see if the Database record already exists, If yes, I have to update it otherwise insert a new record, it looks something like this, I also have to make sure that I return the record updated/ created. (defn handle-post-client-targets [context a-val b-val arguments] (if-let [client-target (first-item (get-client-target context a-val b-val))] (let [ updated-record (update-client-supplied-study-target context a-val b-val arguments)] (let [ updated-record (insert-client-supplied-study-target context a-val b-val arguments)] updated-record)))) Is there a way to achieve this by making sure I return the object updated.
(defn handle-post-client-targets [context a-val b-val arguments]
(if (first-item (get-client-target context a-val b-val))
(update-client-supplied-study-target context a-val b-val arguments)
(insert-client-supplied-study-target context a-val b-val arguments)))
Unless I'm missing something.Perfect, thanks @UJY23QLS1