java - wait until a download completes before calling a function in clojure -


i using webdriver navigate webpage , download json file. need wait completion (or failure, @ give user message) file download before can call function pull in data program. there can use in clojure or java ecosystem allow me this?

(defn web-driver [] (taxi/set-driver! {:browser :chrome} "https://website.net") (taxi/quick-fill-submit {"#user_email" "myemail@something.com"}                       {"#user_password" "password"}                       {"#user_password" taxi/submit})  (taxi/click "a[href*='/admin/...../export']") (taxi/wait-until #(taxi/exists? {:xpath"/html/body/....})) (taxi/click {:xpath "/html/body/...."}) (taxi/click {:xpath "/html/body/...."}) (taxi/click {:xpath "/html/body/...button"}))  (defn find-file [] (let [file-name (for [file (me/list-dir "/users/.../downloads")             :let [s (.tostring file)]             :when (.contains s "im looking for")] s)] (apply str file-name))) 

so want wait until after run webdriver download complete before call (find-file). using selenium web-driver.

https://github.com/semperos/clj-webdriver


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -