Anyone seeing this issue when starting a driver? ; Execution error (IllegalArgumentException) at etaoin.api/wait (api.clj:1854). Here’s a repl transcript. Using chrome 107 and its driver and etaoin 1.0.38
clj꞉user꞉> (require '[etaoin.api :as e])
nil
clj꞉user꞉> (e/chrome {:headless false})
; Execution error (IllegalArgumentException) at etaoin.api/wait (api.clj:1854).
; No matching method sleep found taking 1 args
clj꞉user꞉>
stacktrace
clojure.lang.Reflector/invokeMatchingMethod (Reflector.java:154)
clojure.lang.Reflector/invokeStaticMethod (Reflector.java:332)
etaoin.api/wait (api.clj:1854)
etaoin.api/wait (api.clj:1849)
etaoin.api/wait-predicate (api.clj:1899)
etaoin.api/wait-predicate (api.clj:1870)On OSX 12.6.1 (Monterey)
which JVM is this, 19?
openjdk version “19” 2022-09-20
You guessed right 🙂
how did I know! :)
I'll fix sometime today probably.
Great! Thanks again
That would be nice - thank you. Is there a known JVM that avoids the error?
Ya, JDK17 should be fine.
hanks
You are most welcome
you can also just write (Thread/sleep 1000) yourself?
I think etaoin is waiting internally... so might not be that easy.
This, is the 3rd ping on this issue, so I should really get around to addressing in etaoin.
I hit this problem just yesterday, a (big) hack around it for now (if you're just looking to do something quick) is just to redefine wait in the api ns then jump back to your ns, ie:
(in-ns 'etaoin.api)
(defn wait
"Sleep for `seconds`."
(#_{:clj-kondo/ignore [:unused-binding]} [driver seconds]
(wait seconds))
([seconds]
(Thread/sleep ^long (* seconds 1000))))
(in-ns 'your.ns)yep, intern or alter-var-root will also do
oh yeah, that's better