 ;;
 ;; human actions
 ;;
+
+(defn fill-human* [driver el text]
+  (let [mistake-prob 0.1
+        pause-max 0.2
+        rand-char #(-> 26 rand-int (+ 97) char)
+        wait-key #(let [r (rand)]
+                    (wait (if (> r pause-max) pause-max r)))]
+    (doseq [key text]
+      (when (< (rand) mistake-prob)
+        (fill* driver el (rand-char))
+        (wait-key)
+        (fill* driver el keys/backspace)
+        (wait-key))
+      (fill* driver el key)
+      (wait-key))))
+
+(defn fill-human [driver q text]
+  (fill-human* driver (find driver q) text))
 
 ;;
 ;; screenshot

;; submit
;;

;;
;; forms
;;


(defmulti get-element-location* dispatch-driver)

(defmethods get-element-location*
  [:chrome :phantom :safari]
  [driver el]
  (with-resp driver :get
