Description
The complete documentation for the current releases is hosted on docs.casperjs.org.
CasperJS is a navigation scripting & testing utility for PhantomJS
and SlimerJS (still experimental).
It eases the process of defining a full navigation
scenario and provides useful high-level functions, methods & syntactic sugar for doing common
tasks such as:
CasperJS alternatives and similar modules
Based on the "Testing" category.
Alternatively, view casperjs alternatives based on common mentions on social networks and blogs.
-
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API. -
Mocha
☕️ simple, flexible, fun javascript test framework for node.js & the browser -
Nightwatch
End-to-end testing framework written in Node.js and using the W3C Webdriver API -
volkswagen
:see_no_evil: Volkswagen detects when your tests are being run in a CI server, and makes them pass. -
WebdriverIO
Next-gen browser and mobile automation test framework for Node.js -
istanbul
Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale. -
fast-check
Property based testing framework for JavaScript (like QuickCheck) written in TypeScript -
toxy
Hackable HTTP proxy for resiliency testing and simulated network conditions -
loadtest
Runs a load test on the selected URL. Easy to extend minimally for your own ends. -
uvu
uvu is an extremely fast and lightweight test runner for Node.js and the browser -
power-assert
Power Assert in JavaScript. Provides descriptive assertion messages through standard assert interface. No API is the best API. -
testdouble.js (AKA td.js)
A minimal test double library for TDD with JavaScript -
testcontainers-node
Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. -
abstruse
Abstruse is a free and open-source CI/CD platform that tests your models and code. -
testen
:heavy_check_mark: Run tests for multiple versions of Node.js in local env.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CasperJS or a related project?
README
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. Users interested in a pretty stable, recent version working with PhantomJS 2.0 and newer should choose the packaged 1.1.0 and following releases.The
1.0
branch is now obsolete. Please note that
- it is only recommended if you need to keep old production tests running that could do with the now unmaintained PhantomJS 1.9
- 1.0 tests unfortunately have to be run manually using the
casperjs selftest
commandNote that all versions up to and including 1.1-beta3 do not support PhantomJS 2.0 and newer.
The complete documentation for the current releases is hosted on docs.casperjs.org.
CasperJS is a navigation scripting & testing utility for PhantomJS and SlimerJS (still experimental). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as:
- defining & ordering navigation steps
- filling forms
- clicking links
- capturing screenshots of a page (or an area)
- making assertions on remote DOM
- logging & events
- downloading resources, even binary ones
- catching errors and react accordingly
- writing functional test suites, exporting results as JUnit XML (xUnit)
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
Help request. If you're stuck using CasperJS and don't understand how to achieve something, please ask on the mailing-list first. If the discussion reveals that you have found a real issue that might need a change within CasperJS, file an issue.
Filing issues. It takes a lot of time to review, validate, and de-duplicate filed issues. This time could be spent better on actually improving on CasperJS. Filing an issue might be a helpful contribution, but we expect you to read our CONTRIBUTING.md guidelines first.
Professional Support. Need help with getting CasperJS up and running? Got a time-consuming problem you want to get solved quickly?
Try to find someone to address your specific problem and post a reward at bountysource.
If you need to have a known issue resolved and don't have the time or skills to do it on your own, you could post a reward for any open issue directly.
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
- Nicolas Perriault (@n1k0)
- Nick Currier (@hexid)
- Laurent Jouanneau (@laurentj)
- Mickaël Andrieu (@mickaelandrieu)
- Matt DuVall (@mduvall)
- Ryan Null (@BIGjuevos)
License
MIT
*Note that all licence references and agreements mentioned in the CasperJS README section above
are relevant to that project's source code only.