semperos/clj-webdriver — Issue #14: Expose .getScreenshotAs in Clojure
Author: kokaku
Created: 2011-11-09 18:09:59+00:00
State: open

In 0.4.x, to get a screenshot, you need to do something like
```
(def drv (start :firefox "http://google.com"))
(.getScreenshotAs (:webdriver drv) org.openqa.selenium.OutputType/FILE)
```

This is a flawed approach for any number of reasons...
* not checking if TakesScreenshot is impl by the driver
* relies on the underlying clojure driver implementation
* exposes Selenium API

Would be great if this functionality were exposed as a clj-webdriver function
screenshot [driver] -> bytes
screenshot [driver string|File] -> file(where string would create the file first)