 ;; locators
 ;;
 
-
-(defn by [driver locator]
+(defn use-locator [driver locator]
   (swap! driver assoc :locator locator)
   driver)
+
+(defn use-xpath [driver]
+  (use-locator driver locator-xpath))
+
+(defn use-css [driver]
+  (use-locator driver locator-css))
 
 (defmacro with-locator [driver locator & body]
   `(let [old# (-> ~driver deref :locator)]

   //div[@id='content'] for XPath,
   div.article for CSS selector

   - a keyword :active that means the current active element

   - a map with either :xpath or :css keys with a string term, e.g:
   {:xpath \"//div[@id='content']\"} or

         (swap! ~driver assoc :locator old#)))))

(defmacro with-xpath [driver & body]
  `(with-locator ~driver locator-xpath
     ~@body))

(defmacro with-css [driver & body]
  `(with-locator ~driver locator-css
     ~@body))

;;
