Skip to content

Collection of binaries needed to run CasperJS and PhantomJS as a browser/scraper

License

Notifications You must be signed in to change notification settings

berighton/jsbrowser

Repository files navigation

CasperJS and PhantomJS binaries

This is a full CasperJS library with an added PhantomJS binary for Linux x64

CasperJS is a navigation scripting & testing utility for PhantomJS. 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:

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.

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:

About

Collection of binaries needed to run CasperJS and PhantomJS as a browser/scraper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published