Are you over 18 and want to see adult content?
1
More Annotations
A complete backup of punkmetalshop.ru
punkmetalshop.ru
Are you over 18 and want to see adult content?
6
A complete backup of soggypotatogames.weebly.com
soggypotatogames.weebly.com
Are you over 18 and want to see adult content?
5
Favourite Annotations
A complete backup of himalayanmonkrider.com
himalayanmonkrider.com
Are you over 18 and want to see adult content?
3
A complete backup of poloralphlaurenitalia.it
poloralphlaurenitalia.it
Are you over 18 and want to see adult content?
A complete backup of islamtomorrow.com
islamtomorrow.com
Are you over 18 and want to see adult content?
4
Text
CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.
API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6;THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the INDEX — CASPERJS 1.1.0-DEV DOCUMENTATION (ghosts have bills, you know) Navigation. index; CasperJS 1.1.0-DEV documentation»; © Copyright 2011-2018 Nicolas Perriault andcontributors.
THE CLIENTUTILS MODULE The. clientutils. module. ¶. Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the __utils__ object instance of the ClientUtils class from the clientutils module: casper.evaluate(function() { __utils__.echo("Hello World!"); });THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6;THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the INDEX — CASPERJS 1.1.0-DEV DOCUMENTATION (ghosts have bills, you know) Navigation. index; CasperJS 1.1.0-DEV documentation»; © Copyright 2011-2018 Nicolas Perriault andcontributors.
THE CLIENTUTILS MODULE The. clientutils. module. ¶. Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the __utils__ object instance of the ClientUtils class from the clientutils module: casper.evaluate(function() { __utils__.echo("Hello World!"); });THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the CASPERJS DOCUMENTATION You can also search the Index if you’re looking for somethingparticular.
TESTING — CASPERJS 1.1.0-DEV DOCUMENTATION --includes=foo.js,bar.js will include the foo.js and bar.js files before each test file execution.--pre=pre-test.js will add the tests contained in pre-test.js before executing the whole test suite.--post=post-test.js will add the tests contained in post-test.js after having executed the whole test suite.--fail-fast will terminate the current test suite as soon as a first failure is encountered.API DOCUMENTATION
API Documentation¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file anissue.
USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ one, located in the cli module; it exposes passed arguments as positional ones and named options. But no worries for manipulating the cli module parsing API, a Casper instance always contains a ready to use cli property, allowing easy access of all these parameters. WRITING CASPERJS MODULES $ casperjs npm-underscore-test.js Google CasperJS documentation | CasperJS 1.1.0-DEV documentation UPGRADING — CASPERJS 1.1.0-DEV DOCUMENTATION Upgrading¶. Upgrading to 1.1; Previous topic. Changelog. Next topic.Upgrading to 1.1
THE UTILS MODULE
The utils module¶. This module provides simple helper functions, some of them being very specific to CasperJS though. THE COLORIZER MODULE Skipping CasperJS styling operations¶. If you wish to skip the whole coloration operation and get uncolored plain text, just set the colorizerType casper option to Dummy: CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6;THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the INDEX — CASPERJS 1.1.0-DEV DOCUMENTATION (ghosts have bills, you know) Navigation. index; CasperJS 1.1.0-DEV documentation»; © Copyright 2011-2018 Nicolas Perriault andcontributors.
THE CLIENTUTILS MODULE The. clientutils. module. ¶. Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the __utils__ object instance of the ClientUtils class from the clientutils module: casper.evaluate(function() { __utils__.echo("Hello World!"); });THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6;THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the INDEX — CASPERJS 1.1.0-DEV DOCUMENTATION (ghosts have bills, you know) Navigation. index; CasperJS 1.1.0-DEV documentation»; © Copyright 2011-2018 Nicolas Perriault andcontributors.
THE CLIENTUTILS MODULE The. clientutils. module. ¶. Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the __utils__ object instance of the ClientUtils class from the clientutils module: casper.evaluate(function() { __utils__.echo("Hello World!"); });THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git. SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the CASPERJS DOCUMENTATION You can also search the Index if you’re looking for somethingparticular.
TESTING — CASPERJS 1.1.0-DEV DOCUMENTATION --includes=foo.js,bar.js will include the foo.js and bar.js files before each test file execution.--pre=pre-test.js will add the tests contained in pre-test.js before executing the whole test suite.--post=post-test.js will add the tests contained in post-test.js after having executed the whole test suite.--fail-fast will terminate the current test suite as soon as a first failure is encountered.API DOCUMENTATION
API Documentation¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file anissue.
USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ one, located in the cli module; it exposes passed arguments as positional ones and named options. But no worries for manipulating the cli module parsing API, a Casper instance always contains a ready to use cli property, allowing easy access of all these parameters. WRITING CASPERJS MODULES $ casperjs npm-underscore-test.js Google CasperJS documentation | CasperJS 1.1.0-DEV documentation UPGRADING — CASPERJS 1.1.0-DEV DOCUMENTATION Upgrading¶. Upgrading to 1.1; Previous topic. Changelog. Next topic.Upgrading to 1.1
THE UTILS MODULE
The utils module¶. This module provides simple helper functions, some of them being very specific to CasperJS though. THE COLORIZER MODULE Skipping CasperJS styling operations¶. If you wish to skip the whole coloration operation and get uncolored plain text, just set the colorizerType casper option to Dummy: CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6; QUICKSTART — CASPERJS 1.1.0-DEV DOCUMENTATION A minimal testing script¶. CasperJS is also a testing framework; test scripts are slightly different than scraping ones, though they share most of the API.. A simplest test script:THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the TESTING — CASPERJS 1.1.0-DEV DOCUMENTATION --includes=foo.js,bar.js will include the foo.js and bar.js files before each test file execution.--pre=pre-test.js will add the tests contained in pre-test.js before executing the whole test suite.--post=post-test.js will add the tests contained in post-test.js after having executed the whole test suite.--fail-fast will terminate the current test suite as soon as a first failure is encountered. USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API.THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS, A NAVIGATION SCRIPTING AND TESTING UTILITY FORQUICKSTARTDOCUMENTATIONTHE CASPER MODULEUSING THE COMMAND LINESELECTORSINSTALLATION Testing. CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. $ casperjs test sample-test.js Test file: sample-test.js # Hello, Test! CASPERJS DOCUMENTATION CasperJS documentation ¶. CasperJS documentation. ¶. CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript. Installation. Prerequisites. Installing from Homebrew (OSX) Installing from npm. Installing from git.API DOCUMENTATION
API Documentation. ¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file an issue. The casper module.INSTALLATION
Experimental: as of 1.1.0-beta1, SlimerJS 0.8 or greater to run your tests against Gecko (Firefox) instead of Webkit (just add –engine=slimerjs to your command line options). The SlimerJS developers documented the PhantomJS API compatibility of SlimerJS as well as the differences between PhantomJS and SlimerJS.Note that it is known that coffescript support breaks as of SlimerJS 0.9.6; QUICKSTART — CASPERJS 1.1.0-DEV DOCUMENTATION A minimal testing script¶. CasperJS is also a testing framework; test scripts are slightly different than scraping ones, though they share most of the API.. A simplest test script:THE CASPER MODULE
pageSettings ¶. Type: Object Default: {} PhantomJS’s WebPage settings object. Available settings are: javascriptEnabled defines whether to execute the script in the page or not (default to true); loadImages defines whether to load the inlined images or not; localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes a heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All the TESTING — CASPERJS 1.1.0-DEV DOCUMENTATION --includes=foo.js,bar.js will include the foo.js and bar.js files before each test file execution.--pre=pre-test.js will add the tests contained in pre-test.js before executing the whole test suite.--post=post-test.js will add the tests contained in post-test.js after having executed the whole test suite.--fail-fast will terminate the current test suite as soon as a first failure is encountered. USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ parser, located in the cli module. It exposes passed arguments as positional ones and named options. A Casper instance always contains a ready-to-use cli property for easy access to these parameters, so you don’t have to worry about manipulating the cli module parsing API.THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. CASPERJS DOCUMENTATION You can also search the Index if you’re looking for somethingparticular.
INDEX — CASPERJS 1.1.0-DEV DOCUMENTATION (ghosts have bills, you know) Navigation. index; CasperJS 1.1.0-DEV documentation»; © Copyright 2011-2018 Nicolas Perriault andcontributors.
SELECTORS — CASPERJS 1.1.0-DEV DOCUMENTATION Selectors¶. CasperJS makes an heavy use of selectors in order to work with the DOM, and can transparently use either CSS3 or XPath expressions.. All theAPI DOCUMENTATION
API Documentation¶. Here you’ll find a quite complete reference of the CasperJS API. If something is erroneous or missing, please file anissue.
THE TESTER MODULE
The tester module¶. Casper ships with a tester module and a Tester class providing an API for unit & functional testing purpose. By default you can access an instance of this class through the test property of any Casper class instance. USING THE COMMAND LINE Using the command line¶. CasperJS ships with a built-in command line parser on top of PhantomJS’ one, located in the cli module; it exposes passed arguments as positional ones and named options. But no worries for manipulating the cli module parsing API, a Casper instance always contains a ready to use cli property, allowing easy access of all these parameters. WRITING CASPERJS MODULES $ casperjs npm-underscore-test.js Google CasperJS documentation | CasperJS 1.1.0-DEV documentationTHE UTILS MODULE
The utils module¶. This module provides simple helper functions, some of them being very specific to CasperJS though. UPGRADING — CASPERJS 1.1.0-DEV DOCUMENTATION Upgrading¶. Upgrading to 1.1; Previous topic. Changelog. Next topic.Upgrading to 1.1
THE COLORIZER MODULE Skipping CasperJS styling operations¶. If you wish to skip the whole coloration operation and get uncolored plain text, just set the colorizerType casper option to Dummy:* Quickstart
* Documentation
* Contribute
* Support
Navigation
* Quickstart
* Documentation
* Contribute
* Support
CASPERJS NAVIGATION SCRIPTING & TESTING FOR PHANTOMJS AND SLIMERJS Install PhantomJS or SlimerJS, then:
npm install casperjs node_modules/casperjs/bin/casperjs selftest Other install optionsDownload CasperJS
6,337 Stargazers 993 Forks ------------------------- NAVIGATION & AUTOMATION CasperJS allows you to build full navigation scenarios using high-level functions and a straight forward interface to accomplishall sizes of tasks.
var casper = require('casper').create(); casper.start('http://casperjs.org/'); casper.then(function() { this.echo('First Page: ' + this.getTitle());});
casper.thenOpen('http://phantomjs.org', function() { this.echo('Second Page: ' + this.getTitle());});
casper.run();
$ casperjs sample.js First Page: CasperJS - a navigation scripting & testing utility for PhantomJS and SlimerJS written in Javascript Second Page: PhantomJS | PhantomJS -------------------------TESTING
CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser. Output the tests to xunit for long term code health as well. casper.test.begin('Hello, Test!', 1, function(test) {test.assert(true);
test.done();
});
$ casperjs test sample-test.js Test file: sample-test.js# Hello, Test!
PASS Subject is strictly true PASS 1 test executed in 0.023s, 1 passed, 0 failed, 0 dubious, 0 skipped. -------------------------SCRAPING
Capture data from web pages simply that don't contain APIs. Validate your production environment on a regular basis. Alternatively, use this to load your application with data. var casper = require('casper').create();var links;
function getLinks() { // Scrape the links from top-right nav of the website var links = document.querySelectorAll('ul.navigation li a'); return Array.prototype.map.call(links, function (e) { return e.getAttribute('href')});
}
// Opens casperjs homepage casper.start('http://casperjs.org/'); casper.then(function () { links = this.evaluate(getLinks);});
casper.run(function () { for(var i in links) {console.log(links);
}
casper.done();
});
$ casperjs query-casperjs.js http://docs.casperjs.org/en/latest/quickstart.html http://docs.casperjs.org/en/latest/ https://github.com/casperjs/casperjs https://groups.google.com/forum/#!forum/casperjs -------------------------SUPPORT DEVELOPMENT
CasperJS is licensed under MIT License.
Copyright © 2011-2016 Nicolas Perriault and CasperJS Contributors. Logo by Jeremy ForveilleDetails
1
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0