   (with-http :post
     [:session *session* :window :maximize] nil _))
 
+(defmacro with-current-handle [bind & body]
+  `(let [~bind (get-window-handle)]
+     ~@body))
+
+(defmulti get-window-handle browser-dispatch)
+
+(defmethod get-window-handle :firefox []
+  (with-http-get [:session *session* :window] resp
+    (-> resp :value)))
+
+(defmethods get-window-handle [:chrome :phantom] []
+  (with-http-get [:session *session* :window_handle] resp
+    (:value resp)))
+
 (defmethod maximize :chrome []
-  (with-window-handle h
+  (with-current-handle h
     (with-http :post
       [:session *session* :window h :maximize] nil _)))
 

    [:session *session* :element]
    {:using *locator* :value q}
    resp
    (-> resp :ELEMENT)))

(defmacro with-el [q bind & body]
  `(let [~bind (get-el ~q)]
     ~@body))

(defn go [url]

    [:session *session* :element]
    {:using *locator* :value q}
    resp
    (-> resp :value first second)))

(defmethods get-el [:chrome :phantom] [q]
  (with-http
