Commit b16fcb41 b16fcb41303611671d75cfa9d667f2edb5b5e105 by Nicolas Perriault

updated README for master branch

1 parent 9cbbe80d
Showing 1 changed file with 21 additions and 9 deletions
1 # CasperJS [![Build Status](https://secure.travis-ci.org/n1k0/casperjs.png)](http://travis-ci.org/n1k0/casperjs) 1 # CasperJS
2
3 >**Important note:** the `master` branch hosts the development version of CasperJS, and may be rather instable from time to time. Use the [`1.0` branch](https://github.com/n1k0/casperjs/tree/1.0) if you want to keep in sync with the stable version, or [use tagged versions](https://github.com/n1k0/casperjs/tags).
4 >
5 >Currently, available documentation is:
6 >
7 >- hosted on [casperjs.org](http://casperjs.org/) for the 1.0 branch
8 >- hosted on [docs.casperjs.org](http://docs.casperjs.org/) for the development branch
9 >
10 >[Travis-CI](http://travis-ci.org/n1k0/casperjs) build statuses:
11 >
12 >- ![Build Status](https://travis-ci.org/n1k0/casperjs.png?branch=1.0) `1.0` branch
13 >- ![Build Status](https://travis-ci.org/n1k0/casperjs.png?branch=master) `master` branch
2 14
3 CasperJS is a navigation scripting & testing utility for [PhantomJS](http://www.phantomjs.org/). 15 CasperJS is a navigation scripting & testing utility for [PhantomJS](http://www.phantomjs.org/).
4 It eases the process of defining a full navigation scenario and provides useful 16 It eases the process of defining a full navigation scenario and provides useful
...@@ -28,22 +40,22 @@ Follow the CasperJS project [on twitter](https://twitter.com/casperjs_org) and [ ...@@ -28,22 +40,22 @@ Follow the CasperJS project [on twitter](https://twitter.com/casperjs_org) and [
28 Sample test to see if some dropdown can be opened: 40 Sample test to see if some dropdown can be opened:
29 41
30 ```javascript 42 ```javascript
31 casper.start('http://twitter.github.com/bootstrap/javascript.html#dropdowns', function() { 43 casper.test.begin('a twitter bootsrap dropdown can be opened', 2, function(test) {
32 this.test.assertExists('#navbar-example'); 44 casper.start('http://twitter.github.com/bootstrap/javascript.html#dropdowns', function() {
45 test.assertExists('#navbar-example');
33 this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle'); 46 this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle');
34 this.waitUntilVisible('#dropdowns .nav-pills .open', function() { 47 this.waitUntilVisible('#dropdowns .nav-pills .open', function() {
35 this.test.pass('Dropdown is open'); 48 test.pass('Dropdown is open');
49 });
50 }).run(function() {
51 test.done();
36 }); 52 });
37 });
38
39 casper.run(function() {
40 this.test.done();
41 }); 53 });
42 ``` 54 ```
43 55
44 Run the script: 56 Run the script:
45 57
46 ![](http://cl.ly/image/112m0F2n162i/Capture%20d%E2%80%99%C3%A9cran%202012-10-19%20%C3%A0%2016.37.15.png) 58 ![](http://cl.ly/image/271e2i403A0F/Capture%20d%E2%80%99%C3%A9cran%202013-01-20%20%C3%A0%2009.26.15.png)
47 59
48 ## Contributing 60 ## Contributing
49 61
......