Skip to content

Instantly share code, notes, and snippets.

@azolotko
Last active December 11, 2015 10:08
Show Gist options
  • Save azolotko/4584490 to your computer and use it in GitHub Desktop.
Save azolotko/4584490 to your computer and use it in GitHub Desktop.
Start REPL and test WebDriver
(use 'clj-webdriver.taxi)
(import 'org.openqa.selenium.phantomjs.PhantomJSDriver
'org.openqa.selenium.remote.DesiredCapabilities)
(use '[clj-webdriver.driver :only [init-driver]])
(set-driver! (init-driver {:webdriver (PhantomJSDriver. (DesiredCapabilities. ))}))
(to "http://google.com")
(html "body")
; Now let's take a screenshot
(take-screenshot :file "phantom.png")
; Isn't that cool?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment