This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-08
Channels
- # announcements (50)
- # asami (19)
- # babashka (28)
- # beginners (68)
- # calva (34)
- # cider (11)
- # cljdoc (24)
- # clojure (148)
- # clojure-australia (1)
- # clojure-brasil (6)
- # clojure-europe (48)
- # clojure-france (13)
- # clojure-germany (4)
- # clojure-italy (6)
- # clojure-nl (19)
- # clojure-uk (22)
- # clojurescript (36)
- # conjure (3)
- # cursive (10)
- # data-science (1)
- # datascript (3)
- # datomic (12)
- # etaoin (3)
- # events (3)
- # fulcro (33)
- # graalvm (7)
- # honeysql (4)
- # jobs (4)
- # jobs-discuss (11)
- # kaocha (1)
- # keechma (4)
- # luminus (1)
- # malli (10)
- # membrane (8)
- # off-topic (34)
- # pathom (35)
- # pedestal (1)
- # re-frame (15)
- # releases (1)
- # remote-jobs (1)
- # reveal (41)
- # shadow-cljs (42)
- # startup-in-a-month (2)
- # vim (11)
Hello 👋
I'm using etaoin, and before anything else, i want to say, it's an amazing library, and very comfortable to use it, specially in a REPL driven environment like Clojure can provide 😄
so, i'm using etaoin with firefox was trying to open new windows, and i stumbled on the function create-session
, i quote the docs:
create-session
(create-session driver & [capabilities])
Initiates a new session for a driver. Opens a browser window as a
side-effect. All the further requests are made within specific
session. Some drivers may work with only one active session. Returns
a long string identifier.
And i'm trying on my repl:
(def driver (etaoin/firefox {:host "localhost"}))
(etaoin/create-session driver)
>> Execution error (ExceptionInfo) at slingshot.support/stack-trace (support.clj:201).
throw+: {:response {:value {:error "session not created", :message "Session is already started", :stacktrace ""}}, :path "session", :payload {:desiredCapabilities {}}, :method :post, :type :etaoin/http-error, :port 4444, :host "localhost", :status 500, :driver {:type :firefox, :host "localhost", :port 4444, :url "", :locator "xpath", :capabilities nil}}
As the doc says Some drivers may work with only one active session.
is this the case of firefox? and also, i saw this on mozilla docs:
https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/New_Window
Which seems to be a way to open a window, but i didn't found this function on etaoin, any thoughts ?It seems firefox geckodriver (it's webdriver implementation), actually do requires one geckodriver instance per session: https://github.com/mozilla/geckodriver/issues/1213 And about opening a new window, i don't know if it's a function that is really missing from etaoin's API, but here is the code for opening a new window:
(def driver (etaoin/firefox {:host "localhost"}))
(etaoin/execute {:driver driver
:method :post
:path [:session (:session driver) :window :new]
:data {:type "window"}})