You can clone with
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...
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)
I'm happy to add screenshot functionality. As I recall, when I first developed clj-webdriver, only Firefox had screenshot support, which is why it has not been part of the API. Thanks for drawing my attention to this omission.
Just to set expectations on this, I plan to include this addition to the API for the 0.5.x release, which I hope to have out in the next couple of weeks (doing a rather large re-work of how HTML elements are handled).
Add screenshot functionality, fixes #14