This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-21
Channels
- # announcements (3)
- # aws (8)
- # babashka (14)
- # beginners (39)
- # biff (22)
- # cider (5)
- # clj-kondo (1)
- # cljs-dev (12)
- # cljsjs (4)
- # clojure (16)
- # clojure-europe (47)
- # clojure-germany (6)
- # clojure-uk (2)
- # clojurescript (36)
- # core-async (29)
- # cursive (19)
- # datalevin (14)
- # etaoin (10)
- # helix (1)
- # hyperfiddle (6)
- # introduce-yourself (5)
- # kaocha (43)
- # keechma (1)
- # lsp (7)
- # nbb (68)
- # new-channels (1)
- # off-topic (12)
- # pathom (11)
- # quil (14)
- # rdf (3)
- # re-frame (5)
- # reitit (6)
- # shadow-cljs (88)
Hi!
I’m new using etaoin. I’m calling (e/click-single driver [{:tag :div :class "faculty_course_title"} {:tag :a}])
but something is not working. The browser keeps on the same page and on REPL I’m having {:value nil}
.
Could someone can explain me why it is not going to the link on that tag?
This is the HTML where that element is mounted:
<div class="faculty_course_title" title="Course Title">
<a href="...">
Course Title </a>
</div>
Hiya @UNUH8H85U! I’ll take a look sometime soon.
Hmm… I’m learning that safaridriver is rather limited.
I can reproduce your issue with safaridriver Included with Safari 15.5 (15613.2.7.1.9)
.
I see some folks working around this limitation via JavaScript.
I’ve saved your html to fiddle/slack20220621.html
(but changed href
to hit something for testing purposes):
<div class="faculty_course_title" title="Course Title">
<a href="">Course Title</a>
</div>
Then from my REPL I open up your test page with safaridriver:
(require '[etaoin.api :as e]
'[ :as io])
(def driver (e/safari))
(def test-page (-> "fiddle/slack20220621.html" io/file .toURI str))
(e/go driver test-page)
I can confirm this does not work for me either:
(e/click-single driver [{:tag :div :class "faculty_course_title"} {:tag :a}])
But as a work-around I tried using JavaScript to click on the element:
(let [elem (e/query driver [{:tag :div :class "faculty_course_title"} {:tag :a}])]
(e/js-execute driver "arguments[0].click()" (e/el->ref elem)))
And that worked for me.To anybody else reading this who ran into this problem, is this what you do as well for safaridriver?
Thanks a lot ☺️. I thought I was clicking the wrong DOM element.
Is there a way to see safaridriver
errors in order to know whats happening on next time?