Testing web app with PhantomJs and CasperJs