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?
Hmmm... dunno. I'll play around in my REPL to see what I can learn.
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"}}}This seems to work:
(require '[etaoin.api :as e])
(def driver (e/chrome {:capabilities {:goog:chromeOptions {:mobileEmulation {:deviceName "Pixel 7"}}}}))
(e/go driver "") Yes this also works for me 🙂. THX I am curious, how did you find out?
I vaguely remembered browser-specific options and then searched through Etaoin's tests and saw :goog:chromeOptions and gave it a whirl!
You just saved my day! :)
Happy to have helped!