Browse files

Merge pull request #83 from smidas/return-obj

Make taxi/back, taxi/forward return driver and core/focus return element
  • Loading branch information...
2 parents d0fb723 + d066817 commit fef5d6378d5825dacdec73a6cbc54ceec59278c1 @semperos committed Oct 18, 2012
Showing with 6 additions and 3 deletions.
  1. +2 −1 src/clj_webdriver/core_element.clj
  2. +4 −2 src/clj_webdriver/taxi.clj
View
3 src/clj_webdriver/core_element.clj
@@ -59,7 +59,8 @@
(focus [element]
(execute-script*
- (.getWrappedDriver (:webelement element)) "return arguments[0].focus()" (:webelement element)))
+ (.getWrappedDriver (:webelement element)) "return arguments[0].focus()" (:webelement element))
+ element)
(html [element]
(browserbot (.getWrappedDriver (:webelement element)) "getOuterHTML" (:webelement element)))
View
6 src/clj_webdriver/taxi.clj
@@ -277,7 +277,8 @@
([n] (back *driver* n))
([driver n]
(dotimes [m n]
- (core/back driver))))
+ (core/back driver))
+ driver))
(defn close
"Close the browser. If multiple windows are open, this only closes the active window.
@@ -319,7 +320,8 @@
([n] (forward *driver* n))
([driver n]
(dotimes [m n]
- (core/forward *driver*))))
+ (core/forward *driver*))
+ driver))
(defn get-url
"Navigate the browser to `url`.

0 comments on commit fef5d63

Please sign in to comment.