semperos/clj-webdriver — pull request #39 by locopati (2012-02-06 20:07:13+00:00)
Title: Extracted css-value

Pulled .getCssValue into its own function in the IElement protocol
Refactored hover to use css-value instead of .getCssValue

There is no test written for this because I was unable to run ```lein test``` successfully. It appears that the server did not startup. Also, though easy to fix, chromedriver needs manual downloading and setup to make tests work. Would love to help find a way to avoid that as it would lower the bar of entry to working with clj-webdriver.

In my testing code, I've been doing something like this...

```clojure
(defn chromedriver
"Return the name of the chrome driver to be used. This is based on the os name."
[]
(str "driver/chromedriver_" (->> (System/getProperty "os.name")
(re-find #"[^ ]*")
(str/lower-case))))

(defn start-browser
"Return a Webdriver. Defaults to Chrome browser."
([url] (start-browser url :chrome))
([url browser]
(if (= :chrome browser)
(System/setProperty "webdriver.chrome.driver" (chromedriver)))
(start {:browser browser} url)))
```

Mind you, that's hard coding chromedriver and it also means including it in the source repo since it's not available on clojars or the maven repo. Agree that that's less than ideal, but I do like that starting the browser automatically configures itself.