Skip to content
This repository
Newer
Older
100644 124 lines (77 sloc) 6.291 kb
41c21fd0 »
2012-01-19 Change README title
1 # Clojure API for Selenium-WebDriver #
03ae48ae »
2011-03-11 Initial commit
2
849cc3c8 »
2012-02-14 Add notes for generating documentation locally
3 This is a Clojure library for driving a web browser using Selenium-WebDriver as the backend. For more comprehensive documentation on all of clj-webdriver's features, read the [Github wiki](https://github.com/semperos/clj-webdriver/wiki). You can generate documentation locally with `lein doc` (API docs) or `lein marg` (annotated source).
03ae48ae »
2011-03-11 Initial commit
4
32962923 »
2011-11-29 Update README with another Selenium-WebDriver link, split up resource…
5 **clj-webdriver Resources**
6
c38290a0 »
2011-08-11 Add primary links for this project's resources to the README
7 * [Project Wiki](https://github.com/semperos/clj-webdriver/wiki)
8 * [Google Group](https://groups.google.com/forum/#!forum/clj-webdriver)
9 * [Issue Queue](https://github.com/semperos/clj-webdriver/issues)
32962923 »
2011-11-29 Update README with another Selenium-WebDriver link, split up resource…
10
a4251c73 »
2012-02-02 Add link to official CSS syntax by W3C
11 **External Resources**
32962923 »
2011-11-29 Update README with another Selenium-WebDriver link, split up resource…
12
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
13 * [Selenium-WebDriver API (Javadoc)](http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html)
a4251c73 »
2012-02-02 Add link to official CSS syntax by W3C
14 * [Selenium-WebDriver Changelog](http://code.google.com/p/selenium/source/browse/trunk/java/CHANGELOG)
15 * [CSS Selector Syntax](http://www.w3.org/TR/css3-selectors/#selectors)
c38290a0 »
2011-08-11 Add primary links for this project's resources to the README
16
1b5f2187 »
2011-11-03 Please join the Google group
17 **Please join the Google group if you use this library.** I regularly post announcements about upcoming releases, and although I ensure all tests are passing and try to maintain good test coverage before releases, user testing is invaluable. Thank you!
18
4a86f360 »
2012-01-04 Take out Travis status image, build breaking due to server configurat…
19 ## Usage ##
03ae48ae »
2011-03-11 Initial commit
20
0b10bda4 »
2012-01-05 Remove notes from README about custom repository declarations
21 This library is compatible with *Clojure 1.3.0*.
1507bb5b »
2011-08-10 Make important points more prominent in README
22
23 ### Quickstart ###
01d7b2da »
2011-05-13 Fix phirsch's issue with WindowHandle not being found due to namespac…
24
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
25 Here's a complete example of how to log into Github:
03ae48ae »
2011-03-11 Initial commit
26
88cc5b52 »
2011-07-14 Update README to use Github-style md for code blocks
27 ```clj
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
28 (use 'clj-webdriver.taxi)
03ae48ae »
2011-03-11 Initial commit
29
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
30 ;; Start up a browser
31 (set-driver! {:browser :firefox} "https://github.com")
03ae48ae »
2011-03-11 Initial commit
32
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
33 (click "a[href*='login']")
03ae48ae »
2011-03-11 Initial commit
34
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
35 (input-text "#login_field" "your-username")
36 (input-text "#password" "your-password")
03ae48ae »
2011-03-11 Initial commit
37
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
38 (submit "#password")
39 (quit)
88cc5b52 »
2011-07-14 Update README to use Github-style md for code blocks
40 ```
03ae48ae »
2011-03-11 Initial commit
41
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
42 Forms can be filled out en masse using the `quick-fill-submit` function:
3a69fae7 »
2011-08-18 Add section to README for new quick-fill fn, edit other sections
43
44 ```clj
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
45 (quick-fill-submit {"#login_field" "your-username"}
46 {"#password" "your-password"}
47 {"#password" submit})
3a69fae7 »
2011-08-18 Add section to README for new quick-fill fn, edit other sections
48 ```
49
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
50 ## API Documentation ##
3a69fae7 »
2011-08-18 Add section to README for new quick-fill fn, edit other sections
51
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
52 For API documentation on the high-level Taxi API (shown above), please [see its wiki page](https://github.com/semperos/clj-webdriver/wiki/Taxi%3A-Concise%2C-High-level-API).
03ae48ae »
2011-03-11 Initial commit
53
5e8d6829 »
2011-03-15 Add info on Firefox-specific functionality and provide code examples
54 ### Firefox Functionality
55
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
56 **Note: This documentation is still valid, but refers to the lower-level core API for clj-webdriver.**
57
6907a44e »
2012-02-14 Add hierarhical query information back into README, reformat links
58 Support for Firefox currently exceeds that for all other browsers, most notably via support for customizable Firefox profiles. I've included support for several of these advanced featues in the `clj-webdriver.firefox` namespace. Here are a few examples (borrowed from [here](http://code.google.com/p/selenium/wiki/RubyBindings):
5e8d6829 »
2011-03-15 Add info on Firefox-specific functionality and provide code examples
59
88cc5b52 »
2011-07-14 Update README to use Github-style md for code blocks
60 ```clj
61 (use 'clj-webdriver.core)
62 (require '[clj-webdriver.firefox :as ff])
63
f6878e07 »
2012-01-04 Update README with new syntax
64 (def b (new-driver {:browser :firefox,
65 :profile (doto (ff/new-profile)
66 ;; Enable Firebug
67 (ff/enable-extension "/path/to/extensions/firebug.xpi")))
88cc5b52 »
2011-07-14 Update README to use Github-style md for code blocks
68
f6878e07 »
2012-01-04 Update README with new syntax
69 ;; Auto-download certain file types to a specific folder
70 (ff/set-preferences {:browser.download.dir "C:/Users/semperos/Desktop",
71 :browser.download.folderList 2
c33576b7 »
2012-01-04 Correct Clojure syntax in README example for Firefox functionality
72 :browser.helperApps.neverAsk.saveToDisk "application/pdf"})}))
88cc5b52 »
2011-07-14 Update README to use Github-style md for code blocks
73 ```
5e8d6829 »
2011-03-15 Add info on Firefox-specific functionality and provide code examples
74
aacdcb48 »
2011-10-05 Add information about Grid support to the README
75 ### Grid Support ###
76
84caa4d3 »
2012-02-19 Update README with quickstart using Taxi API
77 From a "user" perspective, working with Selenium-WebDriver's Grid 2 support behaves exactly like interacting with a locally-run RemoteWebDriver instance. See the `clj-webdriver.remote.server` and `clj-webdriver.remote.driver` namespaces for details on using this functionality.
aacdcb48 »
2011-10-05 Add information about Grid support to the README
78
6ebec518 »
2012-02-08 Update README with info about Grid/RemoteWebDriver
79 For information about configuring your Grid hub and nodes (which is handled at the command-line using the server-standalone jars), read [the Selenium-WebDriver wiki documentation on Grid 2](http://code.google.com/p/selenium/wiki/Grid2).
5e8d6829 »
2011-03-15 Add info on Firefox-specific functionality and provide code examples
80
849cc3c8 »
2012-02-14 Add notes for generating documentation locally
81 ## Documentation ##
82
83 For reference documentation, run `lein doc` at the root of this repo. For annotated source documentation, run `lein marg`.
84
4b12ba56 »
2011-11-03 Add instructions for contributing, branches
85 ## Contributing ##
86
87 The `master` branch of clj-webdriver houses code intended for the next **minor-version release.** If you want to propose new features for the next release, you're welcome to fork, make a topic branch and issue a pull request against the `master` branch.
88
f6878e07 »
2012-01-04 Update README with new syntax
89 If you want to fix a bug in the **current release**, please pull against the appropriate branch for the current minor version, **0.4.x**.
4b12ba56 »
2011-11-03 Add instructions for contributing, branches
90
ed9aefbe »
2011-03-11 Update README with information about running test suite
91 ## Running Tests
92
6907a44e »
2012-02-14 Add hierarhical query information back into README, reformat links
93 The namespace `clj-webdriver.test.example-app.core` contains a [Ring](https://github.com/mmcgrana/ring) app (routing by [Moustache](https://github.com/cgrand/moustache)) that acts as the "control application" for this project's test suite.
ed9aefbe »
2011-03-11 Update README with information about running test suite
94
9413ec2a »
2012-02-18 Add instructions for running Taxi API tests
95 Use `lein test` to run this library's test suite. Ensure port 5744 is free, or edit `test/clj_webdriver/test/core.clj` before running the tests. To run tests for the Taxi API, make sure you have the `lein-midje` plugin installed and run `lein midje clj-webdriver.test.taxi`.
ed9aefbe »
2011-03-11 Update README with information about running test suite
96
28aa16eb »
2012-01-30 Update readme with how to run tests for individual browsers
97 It is **highly** recommended that you run the test suite for each browser separately, as otherwise you will see strange errors. Each supported browser has its own namespace, for example:
98
99 ```
100 lein test clj-webdriver.test.firefox
101 ```
102
0b763540 »
2011-10-24 Add back part of documentation that gives instructions for starting u…
103 *Note:* If you just want to run the example app that clj-webdriver uses for its testing purposes, do the following:
104
105 * Open a terminal and run `lein repl` or `lein swank` at the root of this project
106 * Evaluate `(use 'clj-webdriver.test.example-app.core 'ring.adapter.jetty)`
107 * Evaluate `(defonce my-server (run-jetty #'routes {:port 5744, :join? false}))`, making sure to adjust the `test-port` in `test/clj_webdriver/test/core.clj` to whatever you use here.
108
fb4d6aee »
2011-09-26 Add acknowledgements section to README
109 ## Acknowledgements
110
6907a44e »
2012-02-14 Add hierarhical query information back into README, reformat links
111 Credits to [mikitebeka/webdriver-clj](https://github.com/mikitebeka/webdriver-clj) for the initial code for this project and many of the low-level wrappers around the Selenium-WebDriver API.
fb4d6aee »
2011-09-26 Add acknowledgements section to README
112
35e16fdc »
2011-11-01 Add link to Eclipse license in README
113 Many thanks to those who have contributed so far (in nick-alphabetical order):
fb4d6aee »
2011-09-26 Add acknowledgements section to README
114
9cae71be »
2011-11-03 Add maxweber to contributors list in README
115 * [maxweber](https://github.com/maxweber) (Max Weber)
fb4d6aee »
2011-09-26 Add acknowledgements section to README
116 * [RobLally](https://github.com/RobLally) (Rob Lally)
117 * [ulsa](https://github.com/ulsa) (Ulrik Sandberg)
118 * [xeqi](https://github.com/xeqi) (Nelson Morris)
119
120 See Github for an [up-to-date list of contributors](https://github.com/semperos/clj-webdriver/contributors)
121
03ae48ae »
2011-03-11 Initial commit
122 ## License
123
35e16fdc »
2011-11-01 Add link to Eclipse license in README
124 Distributed under the [Eclipse Public License](http://opensource.org/licenses/eclipse-1.0.php), the same as Clojure.
Something went wrong with that request. Please try again.