etaoin

jdt 2018-12-27T16:28:19.002Z

Just tried upgrading from etaoin 0.2.8-snapshot that I've been using a long time to 0.2.9, and the first problem I'm getting is that switch-window does not like to switch to the handles from get-window-handles. Any ideas?

jdt 2018-12-27T16:28:32.002200Z

(api/get-window-handles driver)
["CDwindow-db761a7b-cb65-4e7f-a03e-d22a9f710eae" "CDwindow-f0a96b22-00d8-466e-8d54-e3cff179a22c"]

(api/switch-window driver (first (api/get-window-handles driver)))
ExceptionInfo throw+: {:response {:sessionId "8df4520bee360e5cb821aa6ffb07eb34", :status 13, :value {:message "unknown error: 'name' must be a string\n  (Session info: chrome=59.0.3071.115)\n  (Driver info: chromedriver=2.32.498513 (2c63aa53b2c658de596ed550eb5267ec5967b351),platform=Linux 4.18.10-100.fc27.x86_64 x86_64)"}}, :path "session/8df4520bee360e5cb821aa6ffb07eb34/window", :payload {:handle "CDwindow-db761a7b-cb65-4e7f-a03e-d22a9f710eae"}, :method :post, :type :etaoin/http-error, :port 9515, :host "127.0.0.1", :status 200, :driver {:args ("/home/dtenny/chromedriver" "--port=9515"), :capabilities {:loggingPrefs {:browser "ALL"}}, :process #object[java.lang.UNIXProcess 0x1a66ff45 "java.lang.UNIXProcess@1a66ff45"], :locator "xpath", :type :chrome, :env nil, :port 9515, :host "127.0.0.1", :url "<http://127.0.0.1:9515>", :session "8df4520bee360e5cb821aa6ffb07eb34"}}  slingshot.support/stack-trace (support.clj:201)

jdt 2018-12-27T16:29:22.002900Z

Somewhat dated versions of chrome and chromedriver, but paired to each other and been using it to good effect for a long while.

jdt 2018-12-27T16:31:44.005200Z

On an unrelated topic, I'm trying to run some ... higher performance ... webdriver stuff, interacting with a websockets enabled page to an auction site. So the pace can be pretty fast on the browser updates and interactions. Just curious if there are tips for the best asynchronous interactions between the etaoin client code and the webdriver? I haven't quite figured out the best way to allow incoming browser/page updates to load and read the responses asap. So far it's involved a lot of small Thread/sleep calls in various loops.