Coder Social home page Coder Social logo

jasonshrepo / phantomjs-cookbook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from founddrama/phantomjs-cookbook

0.0 1.0 0.0 7.07 MB

The code for the recipes in the PhantomJS Cookbook.

JavaScript 96.67% HTML 1.68% Java 0.17% Ruby 0.23% Shell 0.12% CSS 1.14%

phantomjs-cookbook's Introduction

The PhantomJS Cookbook

This repository is the sample code that goes along with the book The PhantomJS Cookbook. The book is a deep-dive into PhantomJS, its core APIs, and the eco-system of testing tools that have sprung up around it.

PhantomJS Cookbook cover

What's here?

The chapters break down as follows:

  1. Getting Started with PhantomJS
  2. The PhantomJS Core Modules
  3. Working with webpage Objects
  4. Unit Testing with PhantomJS
  5. Functional and End-to-End Testing with PhantomJS
  6. Network Monitoring and Performance Analysis
  7. Generating Images and Documents with PhantomJS
  8. Continuous Integration with PhantomJS

What do you need?

Here is what you'll need to run the recipes:

  • PhantomJS - (version 1.9 or greater) "the headless WebKit"; you will need this for every recipe.
  • Node.js - (version 0.10.2 or greater) to run the phantomjs-sandbox demo app that most of the recipes reference.
  • Java - (Java SE Runtime Environment 1.7.0_45 or greater) for a couple of the recipes (especially those involving Selenium); and on that note:
    • Selenium version 2.39.0 or greater; and
    • Maven version 3.0.9 or greater.
  • Ruby - (version 1.9.3 or greater) for the recipes that involve Capybara and Poltergeist.
  • Python - (version 2.6 or greater) for the recipes that involve CasperJS.

And what else?

If you are following along from the book, then you may also want to pick up and install the following as well:

How do I get started?

Once you have cloned this repository and installed the above software, the only other things you might need to do:

  1. Expose PHANTOMJS_SOURCE as a variable in your shell. Remember the path where you cloned the PhantomJS source code? Export that to your shell as PHANTOMJS_SOURCE.
  2. Install the Node.js modules for the demo app. cd into this repo's phantomjs-sandbox directory and install the Node.js dependencies with npm install
  3. Get YSlow as a submodule. If you're unfamiliar with this process, cd into the project's directory and enter: git submodule init && git submodule update
  4. ...and you're done.

Licenses

Let's do this informally, so it's easier for everyone:

  1. Everything in here that I wrote (short version: the recipes) is under the MIT license.
  2. I tapped into the wonderful open source community and used a bunch of awesome tools for a bunch of these recipes; in those cases (short version: most of the stuff in the lib directory) I tried to include their existing licenses because I recognize those items as their intellectual property and want to respect that and properly credit them.
  3. If you believe that I'm including something here in violation of its license agreement, please contact me and give me the chance to make it right.

phantomjs-cookbook's People

Contributors

founddrama avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.