]> info9.net Git - wiki.git/blob - tmarble/posts/webica.mdwn
Merge remote-tracking branch 'refs/remotes/origin/master'
[wiki.git] / tmarble / posts / webica.mdwn
1 # webica
2
3 I've just pushed the first version of my new Clojure wrapper
4 for [Selenium][se] called [webica][webica].
5
6 The reason I need **webica** is that I want to do automated
7 browser testing for [ClojureScript][cljs] based web applications.
8 Certainly NodeJS, PhantomJS, Nashorn and the like are useful...
9 but these can't quite emulate the full browser
10 experience. We want to test our ClojureScript web apps in browsers --
11 ideally via our favorite automated continuous integration tools.
12
13 <br/>
14 <br/>
15 <a href="http://docs.seleniumhq.org/">
16 <img src="http://docs.seleniumhq.org/images/big-logo.png" alt="Selenium"/>
17 </a>
18 <br/>
19
20 My new approach with the **webica** library is to do full Java introspection
21 in the spirit that [amazonica][amazonica] does for the AWS API. In fact I
22 wanted to take it a step further by actually generating Clojure source code via
23 introspection that can be used by Codox to generate nice API docs
24 (which you don't get with amazonica). That, alas, was a little
25 trickier than expected due to pesky [Quine][quine]-like problems :) .
26
27 If you load the library on the REPL you can get a feeling for each
28 namespace by calling the `show-functions` function.
29
30 I realize this approach of aggressive introspection, playing fast
31 and loose with types and application level dynamic dispatch are
32 crazy antipatterns. In my defense I started out playing around
33 to see "if I could do it". After seeing the result in the form
34 of a *shell script* in Clojure -- imitating [lmgtfy][lmgtfy] -- perhaps
35 **webica** will actually be useful!
36
37 I plan to talk about **webica** tonight at [clojure.mn][clojuremn] -- hope to
38 see you there!
39
40
41 [[!tag clojure web selenium]]
42
43 [se]: http://docs.seleniumhq.org/
44 [webica]: https://github.com/tmarble/webica
45 [cljs]: https://github.com/clojure/clojurescript
46 [clojuremn]: http://www.meetup.com/clojuremn/events/232762945/
47 [amazonica]: https://github.com/mcohen01/amazonica
48 [quine]: https://en.wikipedia.org/wiki/Quine_%28computing%29
49 [lmgtfy]: https://github.com/tmarble/webica/blob/master/examples/lmgtfy