Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 421cdcbdc8
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (23 sloc) 0.779 kb
(ns ^{:doc "Utilties atop third-party dependendies."}
(:use [clojure.core.logic :only [lvar?]])
(:require [clj-webdriver.core :as wd])
(:import [org.openqa.selenium InvalidElementStateException]
[org.openqa.selenium.remote ErrorHandler$UnknownServerException]))
(defn fresh?
"Returns true, if `x' is fresh.
`x' must have been `walk'ed before!"
(lvar? x))
(defn ground?
"Returns true, if `x' is ground.
`x' must have been `walk'ed before!"
(not (lvar? x)))
(defmacro careful-attribute
"Wrap calls to wd/attribute in try and catch standard exceptions"
[elem attr]
(wd/attribute ~elem ~attr)
(catch InvalidElementStateException _# nil)
(catch ErrorHandler$UnknownServerException _# nil)))
Jump to Line
Something went wrong with that request. Please try again.