 
 (defmethod js-execute :default
   [driver script & args]
-  (with-resp driver :post
-    [:session (:session @driver) :execute]
-    {:script script :args (vec args)}
-    resp
-    (:value resp)))
+  (:value (execute {:driver driver
+                    :method :post
+                    :path [:session (:session @driver) :execute]
+                    :data {:script script :args (vec args)}})))
 
 (defmethod js-execute :firefox
   [driver script & args]
-  (with-resp driver :post
-    [:session (:session @driver) :execute :sync]
-    {:script script :args (vec args)}
-    resp
-    (:value resp)))
+  (:value (execute {:driver driver
+                    :method :post
+                    :path [:session (:session @driver) :execute :sync]
+                    :data {:script script :args (vec args)}})))
 
 (defmulti js-async
   "Executes an asynchronous script in the browser and returns the result.

(defmethods double-click-el
  [:chrome :phantom]
  [driver el]
  (with-resp driver :post
    [:session (:session @driver) :element el :doubleclick]
    nil _))

(defn double-click
  "Performs double click on an element.


(defmethod accept-alert :firefox
  [driver]
  (execute {:driver driver
            :method :post
            :path [:session (:session @driver) :alert :accept]}))

(defmethods accept-alert
  [:chrome :safari]
  [driver]
  (execute {:driver driver
            :method :post
            :path [:session (:session @driver) :accept_alert]}))

;;
;; network
