etaoin

lotbert 2025-06-25T15:59:07.696329Z

Hi i've got a question on https://github.com/clj-commons/etaoin/blob/master/doc/01-user-guide.adoc#capabilities. Is there a way to use chromedrivers https://developer.chrome.com/docs/chromedriver/mobile-emulation?

lread 2025-06-25T16:39:08.744499Z

Hmmm... dunno. I'll play around in my REPL to see what I can learn.

lotbert 2025-06-25T16:40:41.416839Z

I get a `{:response {:value {:error "invalid argument", :message "invalid argument: entry 0 of 'firstMatch' is invalid\nfrom invalid argument: unrecognized capability: mobileEmulation", ... }` When using the following config:

{:capabilities                           {:mobileEmulation {:deviceName "Pixel 7"}}}

lread 2025-06-25T16:49:56.788909Z

This seems to work:

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

(def driver (e/chrome {:capabilities {:goog:chromeOptions {:mobileEmulation {:deviceName "Pixel 7"}}}}))

(e/go driver "")

👍 1
lotbert 2025-06-25T16:51:40.409439Z

Yes this also works for me 🙂. THX I am curious, how did you find out?

🎉 1
lread 2025-06-25T16:56:31.675899Z

I vaguely remembered browser-specific options and then searched through Etaoin's tests and saw :goog:chromeOptions and gave it a whirl!

🙌 1
lotbert 2025-06-25T16:57:29.071749Z

You just saved my day! :)

lread 2025-06-25T16:58:02.066399Z

Happy to have helped!