casperjs presentation
-
Upload
ansvialab -
Category
Technology
-
view
107 -
download
0
description
Transcript of casperjs presentation
is a navigation scripting & testing utility for PhantomJS and SlimerJS written in Javascript
CasperJs.A Andriana K
Why using casperjs ?Scripting a browsing workflow using Javascript is painfully hard if you intend to use chained callbacks. This kind of code is a nightmare to write, to read, to understand and to maintain:
l Well, CasperJS solves this kind of problem using a convenient APIl for dealing with asynchronous stuff:
API docummentation
Simulate UI testing.
What is PhantomJS?
PhantomJS is a headless WebKit with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selectors, JSON, Canvas and SVG.
Capturing screenshotsl Capturing a screenshot of a given area is as easy as this:
Creating navigation scenarios
l Want to simulate the user navigation as if he were clicking through links?l No problem:
Filling and handling forms
l Filling and submitting a form is not much harder:
Asynchronous rendering of page
l Sometimes (ok, often), lots of stuff is loaded asynchronously throughl Ajax or any other fancy invention of the Devil. You can just wait for it to happen:
Testingl Now all of this is fancy, but the true powers of CasperJS come from its functional testingl capabilities. For example, testing google search can be done that way :
Running the suite would produce this shiny colored output:
Implementation for digaku2l For all page
Output :
Problem in digaku2 UI testing
InferenceUsing casperjs more easy & powerfull than javascript, because casperjs directly call the API of the library
API docummentation
Installation
Thank you... :D