etaoin 2025-06-07

Hey everyone, is there a convenience function for opening a link in a new window tab? Something along the lines of “right click -> open in new tab”? I can’t really find anything in the user guide about this and my default is to just execute JS which is not that pleasant.

https://cljdoc.org/d/etaoin/etaoin/1.1.43/api/etaoin.api#middle-click-on states, that it is > Useful for opening links in a new tab.

Huh! Thanks @lotbert, it seems to work nicely:

(require '[etaoin.api :as e])

(def driver (e/chrome))

(e/go driver "")

(e/middle-click-on driver {:tag :a})

🙌 1

Hi @matthew_lefebvre, I don't know of a way. Since Etaoin is a thin wrapper over WebDriver, I typically search for "webdriver + thing I want to do". I didn't see anything that explicitly supports this case. I assume you know you can (e/new-window driver :tab) to create a new tab. Happy to hear from you or others if there is some technique or trick that more cleanly supports this use case.