semperos/clj-webdriver — pull request #74 by smidas (2012-09-08 00:20:31+00:00)
Title: Added DesiredCapabilities functionality

Changes in these commits have two overall focal points related to Selenium's DesiredCapabilities functionality.

With these changes:

It is now possible to pass a map of desired capabilities with the driver spec when instantiating a RemoteWebDriver session on the key :capabilities. Included are passing tests.

Ex.
```clj
(let [capabilities {"browserName" "firefox", "version" "14.0.0", "seleniumProtocol" "Selenium", "platform" "MAC" }
[server driver] (new-remote-session {:port (hub-port)
:host (hub-host)
:existing true}
{:capabilities capabilities})]
(set-driver! driver)
(to "http://www.google.com")
(quit))
```

Moved the IDesiredCapabilities protocol to the clj-webdriver.remote.driver namespace and also added the javascript functionality from the capabilities interface.

Ex.
```clj
(let [capabilities {"browserName" "firefox", "version" "14.0.0", "seleniumProtocol" "Selenium", "platform" "MAC" }
[server driver] (new-remote-session {:port (hub-port)
:host (hub-host)
:existing true}
{:capabilities capabilities})]
(set-driver! driver)
(to "http://www.google.com")
(javascript? driver) => true
(javascript! driver false)
(javascript? driver) => false
(quit))
```
Moving the IDesiredCapabilities protocol may not be necessary, but it seemed more appropriate in the .remote.* namespace.