Last active
December 11, 2015 10:08
-
-
Save azolotko/4584490 to your computer and use it in GitHub Desktop.
Start REPL and test WebDriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein repl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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