Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Navigation scripting & testing utility for PhantomJS and SlimerJS
JavaScript Python HTML C# CoffeeScript Shell Other
Failed to load latest commit information.
bin ESLint configured to match earlier JSHint
docs Update casper.rst
modules Fix fetchText() to properly handle empty elements
rpm rpm/build topdir fix for BSD mktemp
samples ESLint configured to match earlier JSHint
src ESLint configured to match earlier JSHint
tests Add test for fetchText() of empty element
.eslintignore
.eslintrc ESLint configured to match earlier JSHint
.gitattributes added gitattributes file
.gitignore added missing files - refs #624
.gitmodules moved sphinx docs to master repository
.travis.yml ESLint configured to match earlier JSHint
CHANGELOG.md bump 1.1-beta1
CONTRIBUTING.md ESLint configured to match earlier JSHint
CONTRIBUTORS.md updated CONTRIBUTORS
LICENSE.md added .md ext for root info files
Makefile ESLint configured to match earlier JSHint
README.md Update README.md
casperjs.gemspec closes #335 - dropped support for phantomjs 1.6 (1.7 & 1.8 are both s…
package.json fixed version in package.json

README.md

CasperJS

Important note: the master branch hosts the development version of CasperJS, which is now pretty stable and should be the right version to use if you ask me.

Use the 1.0 branch if you want to keep in sync with the stable old version, or use tagged versions.

Currently, available documentation is:

Travis-CI build status:

  • Build Status master branch
  • 1.0 tests unfortunately have to be run manually using the casperjs selftest command

CasperJS is a navigation scripting & testing utility for PhantomJS and SlimerJS. It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntaxic sugar for doing common tasks such as:

Browse the sample examples repository. Don't hesitate to pull request for any cool example of yours as well!

Read the full documentation on casperjs documentation website.

Subscribe to the project mailing-list

Follow the CasperJS project on twitter and Google+.

Show me some code!

First install CasperJS, we'll use 1.1 beta here.

Sample test to see if some dropdown can be opened:

casper.test.begin('a twitter bootstrap dropdown can be opened', 2, function(test) {
    casper.start('http://getbootstrap.com/2.3.2/javascript.html#dropdowns', function() {
        test.assertExists('#navbar-example');
        this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle');
        this.waitUntilVisible('#dropdowns .nav-pills .open', function() {
            test.pass('Dropdown is open');
        });
    }).run(function() {
        test.done();
    });
});

Run the script:

Support

Need help with getting CasperJS up and running? Got a time-consuming problem you want to get solved quickly?

Get CasperJS support on CodersClan.

Contributing

Contributing code

Please read the CONTRIBUTING.md file contents.

Contributing documentation

CasperJS's documentation is written using the Markdown format, and hosted on Github thanks to the Github Pages Feature.

To view the source files on github, head to the gh-pages branch, and check the documentation's README for further instructions.

Team

License

MIT

Something went wrong with that request. Please try again.