Index
A
- addCookie(cookieObject) method / How it works…
- Ajax requests
- submitting, from PhantomJS / Submitting Ajax requests from PhantomJS, Getting ready, How it works…, There's more…
- appcache manifest
- generating / Generating an appcache manifest, How to do it…, How it works…
- working / How it works…
- about / There's more…
- configuration options / Configuration options
- arguments
- PhantomJS script, running with / Running a PhantomJS script with arguments, How it works…
- arguments, open method
- atEnd method / atEnd
B
- Base64
- images, saving as / Getting ready, How it works…
- behavior-driven development (BDD)
- about / Getting ready
C
- --cdns flag
- about / CDNs
- cache locations
- for data inspection / Cache locations
- Capybara
- URL / Getting ready
- about / Getting ready
- Capybara suite
- Poltergeist, adding to / Adding Poltergeist to a Capybara suite, Getting ready, How it works…
- casper.capture(filename[, clipRect, imgOptions]) method / CasperJS
- casper.captureBase64(format[, area]) method / CasperJS
- casper.captureSelector(filename, selector[, imgOptions]) method / CasperJS
- CasperJS
- about / Installing CasperJS
- installing / Getting ready, How it works…
- used, for interacting with web pages / Interacting with web pages using CasperJS, Getting ready, How it works…, There's more…
- end-to-end testing / End-to-end testing with CasperJS, How to do it…, How it works…, There's more…
- tests results, exporting from / Exporting test results from CasperJS in the XUnit format, How it works…
- methods / CasperJS
- URL, for image-capturing methods / CasperJS
- CasperJS API
- URL, for online documentation / There's more…
- Chai
- about / Getting ready
- URL / Getting ready
- changeWorkingDirectory method / changeWorkingDirectory
- CI
- about / Introduction
- fully covered project, setting up in / Getting ready, How to do it…, How it works…
- CI environment
- PhantomJS, setting up in / Getting ready, How to do it…, How it works…
- clearCookies() method / How it works…
- clipped screenshots
- generating, from PhantomJS / Generating clipped screenshots from PhantomJS, How to do it…, How it works…, There's more…
- close method / close
- code coverage reports
- generating, with Karma test runner / Getting ready, How to do it…, How it works…
- generating, with Istanbul / Getting ready, How to do it…, How it works…
- about / There's more…
- command-line arguments
- inspecting / Inspecting command-line arguments, How it works…
- command-line convention
- establishing / Establishing a command-line convention
- command-line options, YSlow
- --info flag / Information
- --format flag / Format
- --ruleset flag / Ruleset
- --ua flag / User agent
- --viewport flag / Viewport
- --headers flag / Headers
- --cdns flag / CDNs
- CommonJS Filesystem proposal
- URL / How it works…
- CommonJS IO/A proposal
- CommonJS module proposal
- about / How it works…
- URL / How it works…
- confess.js library / Getting ready
- configuration options, appcache manifest
- appcache.urlsFromDocument / Configuration options
- appcache.urlsFromRequests / Configuration options
- appcache.cacheFilter / Configuration options
- appcache.networkFilter / Configuration options
- console.log statement / How to do it…
- ConsoleReporter / There's more…
- cookie-jar.txt file / How to do it…
- cookies
- PhantomJS, running with / Running PhantomJS with cookies, How to do it…, How it works…
- managing, with phantom object / Managing cookies with the phantom object, How to do it…, How it works…
- cookies-file argument / How it works…, Getting ready
- cookies-file command / Running PhantomJS with cookies
- cookies array / How it works…
- cookiesEnabled property / How it works…
- create method, webpage module
- opts argument / There's more…
- CSS
- blocking, from downloading / Blocking CSS from downloading, How to do it…, How it works…
- CSS properties
- listing / Listing CSS properties, How it works…, There's more…
- custom footers
- applying, to PDFs generated from PhantomJS / Getting ready, How to do it…, How it works…
- custom headers
- applying, to PDFs generated from PhantomJS / Getting ready, How to do it…, How it works…
- custom module
- creating, for PhantomJS / Creating a custom module for PhantomJS, How to do it…, How it works…
- custom modules
- loading, in PhantomJS / Loading custom modules in PhantomJS, How it works…
- Cygwin
- URL / How it works…
D
- debugger messages
- recording / Recording debugger messages, How it works…
- deleteCookie(cookieName) method / How it works…
- detailed performance analysis
- disk-cache command-line argument / Running PhantomJS with a disk cache, disk-cache
- disk cache
- PhantomJS, running with / Running PhantomJS with a disk cache, Getting ready, How it works…, There's more…
- domain-specific language (DSL) / How it works…, Installing CasperJS
E
- end-to-end testing, CasperJS / End-to-end testing with CasperJS, How to do it…, How it works…, There's more…
- env property
- about / How it works…
- event-handler callbacks, webpage objects
- onAlert / There's more…
- onCallback / There's more…
- onClosing / There's more…
- onConfirm / There's more…
- onConsoleMessage / There's more…
- onError / There's more…
- onFilePicker / There's more…
- onInitialized / There's more…
- onLoadFinished / There's more…
- onLoadStarted / There's more…
- onNavigationRequested / There's more…
- onPageCreated / There's more…
- onPrompt / There's more…
- onResourceError / There's more…
- onResourceReceived / There's more…
- onResourceRequested / There's more…
- onUrlChanged / There's more…
- exists method / exists
- exit status
- controlling, of PhantomJS script / Controlling the exit status of a PhantomJS script, How to do it…
- expectations / How it works…
- external JavaScript
- including, on page / Getting ready, How it works…
- external scripts
- path, specifying for / Specifying a path for external scripts, How it works…
F
- --format flag
- file
- saving, from PhantomJS script / Getting ready, How it works…
- reading, from PhantomJS / Getting ready, How to do it…, How it works…
- file property / onError parameters
- flush method / Other stream methods
- footer object
- fs module
- about / How it works…
- fully covered project
- setting up, in CI / Getting ready, How to do it…, How it works…
- function property / onError parameters
- functions, Jasmine
- describe / How it works…
- it / How it works…
- expect / How it works…
G
- GhostDriver
- about / Running Selenium tests with PhantomJS and GhostDriver, Getting ready
- Selenium tests, running with / Getting ready, How to do it…, How it works…
- URL / Getting ready
- Git plugin
- URL / Getting ready
- global PhantomJS error handler
- Grunt
- Jasmine unit tests, running with / Getting ready, How to do it…, How it works…
- about / Getting ready
- URL / Getting ready
- tests, watching during development / Watching your tests during development with Grunt, How to do it…, How it works…
- grunt-contrib-jasmine module
- about / Getting ready, How it works…, There's more…, How it works…, There's more…
- actions, performed / There's more…
- grunt-contrib-watch module
- about / Getting ready, How it works…, There's more…
- URL / Getting ready
- grunt-karma module
- about / There's more…
- grunt-mocha-phantomjs module
- URL / There's more…
- grunt-notify module
- about / There's more…
H
- --headers flag
- about / Headers
- header object
- Homebrew
- about / There's more…
- URL / There's more…
- HTTP Archive (HAR) file
- generating, from PhantomJS / Generating HAR files from PhantomJS, How to do it…, How it works…
- about / There's more…
I
- --info flag
- about / Information
- basic level / Information
- stats level / Information
- grade level / Information
- comps level / Information
- all level / Information
- images
- causing, to fail / Causing images to fail randomly, How to do it…
- rendering, from PhantomJS / Getting ready, How it works…
- saving, as Base64 / Getting ready, How it works…
- includeJs method
- injectable scripts / There's more…
- injectJs method / Specifying a path for external scripts, How it works…, phantom.injectJs
- versus require method / phantom.injectJs versus require
- about / injectJs
- installation, CasperJS / Getting ready, How it works…
- installation, PhantomJS / How to do it…, There's more…
- Istanbul
- about / Generating code coverage reports with Istanbul and the Karma test runner
- code coverage reports, generating with / Getting ready, How to do it…, How it works…
- URL / Getting ready
- isWritable method / isWritable
J
- Jasmine
- about / Getting ready
- URL, for documentation / Getting ready
- URL, for downloading version 1.3.1 / Getting ready
- jasmine-reporters library
- Jasmine test runner
- creating, for PhantomJS / Creating a Jasmine test runner for PhantomJS and every other browser, How to do it…, How it works…
- Jasmine unit tests
- running, with PhantomJS / Getting ready, How it works…
- running, with Grunt / Getting ready, How to do it…, How it works…
- running, with Karma test runner / Running Jasmine unit tests with the Karma test runner, Getting ready, How it works…, There's more…
- running, with Karma from WebStorm / Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- running, with PhantomJS from WebStorm / Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- Jenkins CI / Automating performance analysis with YSlow and PhantomJS
- about / Getting ready, There's more…
- URL, for project website / Getting ready
- Jenkins CI project
- URL / How to do it…
- JSON configuration file
- PhantomJS, running with / Running PhantomJS with a JSON configuration file, How it works…
- JUnit reports
- generating / Getting ready, How to do it…, How it works…
- JUnitXmlReporter / There's more…
- JUnitXmlReporter constructor function
- savePath arguments / How it works…
- consolidate / How it works…
- useDotNotation / How it works…
K
- Karma
- about / Getting ready, How it works…
- Jasmine unit tests, running with / Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- karma-coverage plugin
- about / Getting ready, There's more…
- karma-junit-reporter plugin
- about / There's more…
- Karma test runner
- Jasmine unit tests, running with / Running Jasmine unit tests with the Karma test runner, Getting ready, How it works…, There's more…
- code coverage reports, generating with / Getting ready, How to do it…, How it works…
- keyboard input
- simulating, in PhantomJS / Getting ready, How it works…, There's more…
L
- libraryPath property / Specifying a path for external scripts, phantom.libraryPath
- line property / onError parameters
M
- makeDirectory method / makeDirectory
- matcher function / How it works…
- Maven
- about / Getting ready
- URL / Getting ready
- max-disk-cache-size command-line argument / Running PhantomJS with a disk cache, max-disk-cache-size
- message parameter / onError parameters
- methods, networkRequest object
- abort() / onResourceRequested
- changeUrl(url) / onResourceRequested
- mocha-phantomjs
- about / Getting ready
- Mocha unit tests
- running, with PhantomJS / Getting ready, How to do it…, How it works…
- mode argument / open
- mouse clicks
- simulating, in PhantomJS / Getting ready, How to do it…, How it works…
- mouse hovers
- simulating / Simulating mouse hovers in PhantomJS, How to do it…, How it works…, There's more…
N
- networkRequest object
- about / onResourceRequested
- methods / onResourceRequested
- Node.js
- about / There's more…, Getting ready
- and PhantomJS, differences / There's more…
- URL / Getting ready
- npm
- about / Getting ready
O
- onAlert callback / There's more…
- onCallback callback / There's more…
- onClosing callback / There's more…
- onConfirm callback / There's more…
- onConsoleMessage callback / There's more…
- onError callback / Setting up a global PhantomJS error handler, There's more…
- parameters / onError parameters
- onError callback, parameters
- message / onError parameters
- trace / onError parameters
- onFilePicker callback / There's more…
- onInitialized callback / There's more…
- onLoadFinished callback / There's more…
- onLoadStarted callback / There's more…
- onNavigationRequested callback / There's more…
- onPageCreated callback / There's more…
- onPrompt callback / There's more…
- onResourceError callback / There's more…
- onResourceError callback function
- about / onResourceError
- onResourceReceived callback / There's more…
- onResourceReceived callback function
- about / onResourceReceived
- onResourceRequested callback / There's more…
- arguments / onResourceRequested
- onResourceRequested callback function
- about / onResourceRequested
- onUrlChanged callback / There's more…
- open(url) method / There's more…
- open(url, callback) method / There's more…
- open(url, method, callback) method / There's more…
- open(url, method, data, callback) method / There's more…
- open method
- about / open, There's more…
- arguments / open
- overloaded signature / There's more…
- opts argument / There's more…
- os property
- about / There's more…
P
- page
- external JavaScript, including on / Getting ready, How it works…
- page content
- inspecting, from PhantomJS script / Getting ready, How it works…
- path
- specifying, for external scripts / Specifying a path for external scripts, How it works…
- path argument / open
- PATH variable
- about / How to do it…
- URL, for information / How to do it…
- PDFs, generated from PhantomJS
- custom headers, applying to / Getting ready, How to do it…, How it works…
- custom footers, applying to / Getting ready, How to do it…, How it works…
- performance analysis
- automating, with YSlow and PhantomJS / Automating performance analysis with YSlow and PhantomJS, Getting ready, How to do it…, How it works…
- options / There's more…
- TAP format, using / Using TAP format
- permissions-related methods
- exists method / exists
- makeDirectory method / makeDirectory
- isWritable method / isWritable
- write method / write
- phantom.args array / How it works…, There's more…
- phantom.exit() function / How it works…
- phantom.exit method
- about / How it works…
- type coercion / Type coercion with phantom.exit
- phantom.scriptName property / There's more…
- PhantomCSS
- used, for detecting visual regressions / Detecting visual regressions using PhantomCSS, How to do it…, How it works…
- about / There's more…
- PhantomJS
- about / Introduction
- installing / How to do it…, There's more…
- URL, for downloading / How to do it…
- URL, for troubleshooting guide / How to do it…
- installing, from Source / Installing from Source
- URL, for build instructions / Installing from Source
- URL, for API documentation / How it works…, How it works…
- and Node.js, differences / There's more…
- running, with cookies / Running PhantomJS with cookies, Getting ready, How it works…
- running, with disk cache / Running PhantomJS with a disk cache, Getting ready, How it works…, There's more…
- running, with JSON configuration file / Running PhantomJS with a JSON configuration file, How it works…
- file, reading from / How to do it…, How it works…
- custom module, creating for / Creating a custom module for PhantomJS, How to do it…, How it works…
- custom modules, loading in / Loading custom modules in PhantomJS, How it works…
- URL, opening within / Opening a URL within PhantomJS, How it works…
- POST, generating from / Getting ready, How to do it…, How it works…, There's more…
- mouse, simulating in / Getting ready, How to do it…, How it works…
- keyboard input, simulating in / Getting ready, How it works…, There's more…
- Ajax requests, submitting from / Submitting Ajax requests from PhantomJS, Getting ready, How it works…, There's more…
- Jasmine unit tests, running with / Getting ready, How it works…, Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- TerminalReporter, using for unit testing / Getting ready, How it works…
- Jasmine test runner, creating for / Creating a Jasmine test runner for PhantomJS and every other browser, How to do it…, How it works…
- QUnit tests, running with / Running QUnit tests with PhantomJS, How it works…
- Mocha unit tests, running with / Getting ready, How to do it…, How it works…
- Selenium tests, running with / Getting ready, How to do it…, How it works…
- Webdriver, using as Selenium client / Getting ready, How to do it…, How it works…
- HAR files, generating from / Generating HAR files from PhantomJS, How to do it…, How it works…
- images, rendering from / Getting ready, How it works…
- images, saving as Base64 / Getting ready, How it works…
- SVGs, rendering from / Getting ready, How to do it…, How it works…
- SVGs, rasterizing from / Getting ready, How to do it…, How it works…
- clipped screenshots, generating from / Generating clipped screenshots from PhantomJS, How to do it…, How it works…, There's more…
- web page, saving from / Getting ready, How to do it…, How it works…
- responsive designs, testing with / Testing responsive designs with PhantomJS, How to do it…, How it works…, There's more…
- setting up, in CI environment / Getting ready, How to do it…, How it works…
- fully covered project, setting up in CI / Getting ready, How to do it…, How it works…
- phantomjs-runner.js script / How it works…
- phantomjs-sandbox directory / Getting ready
- PhantomJS REPL
- about / Launching the PhantomJS REPL
- launching / How to do it…, How it works…
- PhantomJS script
- running / Running a PhantomJS script, How it works…
- running, with arguments / Running a PhantomJS script with arguments, How it works…
- debugging / Debugging a PhantomJS script, How to do it…, There's more…
- exit status, controlling of / Controlling the exit status of a PhantomJS script, How to do it…
- file, saving from / Getting ready, How it works…
- page content, inspecting from / Getting ready, How it works…
- phantom object
- cookies, managing with / Managing cookies with the phantom object, How to do it…, How it works…
- pid property
- about / There's more…
- platform property
- about / There's more…
- PNG format
- about / How it works…
- Poltergeist
- adding, to Capybara suite / Adding Poltergeist to a Capybara suite, Getting ready, How it works…
- about / Getting ready
- URL / Getting ready
- used, for taking screenshots during tests / Getting ready, How it works…
- precise mouse clicks, simulating with / Simulating precise mouse clicks with Poltergeist, How to do it…, There's more…
- POSIX-compatible systems
- URL, for tutorials / How to do it…
- POST
- generating, from PhantomJS / Getting ready, How to do it…, How it works…, There's more…
- precise mouse clicks
- simulating, with Poltergeist / Simulating precise mouse clicks with Poltergeist, How to do it…, There's more…
- properties, requestData object
- id / onResourceRequested
- method / onResourceRequested
- url / onResourceRequested
- time / onResourceRequested
- headers / onResourceRequested
- properties, resourceError object
- id / onResourceError
- url / onResourceError
- errorCode / onResourceError
- errorString / onResourceError
- properties, response object
- id / onResourceReceived
- url / onResourceReceived
- time / onResourceReceived
- headers / onResourceReceived
- bodySize / onResourceReceived
- contentType / onResourceReceived
- redirectURL / onResourceReceived
- stage / onResourceReceived
- status / onResourceReceived
- statusText / onResourceReceived
- properties, system module
- os / There's more…
- platform / There's more…
- pid / There's more…
- properties, trace parameter
- file / onError parameters
- sourceURL / onError parameters
- line / onError parameters
- function / onError parameters
Q
- QImage class
- about / There's more…
- Qt / How it works…
- QUnit
- about / Getting ready
- QUnit tests
- running, with PhantomJS / Running QUnit tests with PhantomJS, How it works…
R
- --ruleset flag
- Read-Evaluate-Print Loop (REPL)
- about / Introduction, How it works…
- readLine method / readLine
- read method / Other stream methods
- remote-debugger-autorun argument / Debugging a PhantomJS script, remote-debugger-autorun
- remote-debugger-port argument / Debugging a PhantomJS script, remote-debugger-port
- renderBase64 method / There's more…
- render method / Rendering images from PhantomJS
- about / There's more…
- output formats / There's more…
- reporters
- about / How it works…
- reporters, Jasmine
- ConsoleReporter / There's more…
- JUnitXmlReporter / There's more…
- TapReporter / There's more…
- TeamcityReporter / There's more…
- requestData object
- properties / onResourceRequested
- require function
- require method
- versus injectJs method / phantom.injectJs versus require
- resourceError object
- properties / onResourceError
- responsive designs
- testing, with PhantomJS / Testing responsive designs with PhantomJS, How to do it…, How it works…, There's more…
- Ruby
- about / Getting ready
- RubyGems
- URL, for downloading / Getting ready
- run-jasmine.js script
- about / There's more…
- runtime
- version, inspecting at / Inspecting the version at runtime
S
- scrolling
- simulating / Simulating scrolling in PhantomJS, How it works…, There's more…
- seek method / Other stream methods
- Selenium
- about / Getting ready
- Selenium client
- Webdriver, using as / Getting ready, How to do it…, How it works…
- Selenium Standalone Server JAR
- URL, for downloading / Getting ready
- Selenium tests
- running, with PhantomJS / Getting ready, How to do it…, How it works…
- running, with GhostDriver / Getting ready, How to do it…, How it works…
- sendEvent method
- about / There's more…
- mouse events / There's more…
- button argument / There's more…
- simple performance analysis
- executing / Executing a simple performance analysis, How to do it…, How it works…
- configuration options / Configuration options
- Source
- PhantomJS, installing from / Installing from Source
- sourceURL property / onError parameters
- specifications / How it works…
- stream methods
- read / Other stream methods
- write / Other stream methods
- writeLine / Other stream methods
- seek / Other stream methods
- flush / Other stream methods
- stream object / stream objects
- suites / How it works…
- SVGs
- rendering, from PhantomJS / Getting ready, How to do it…, How it works…
- rasterizing, from PhantomJS / Getting ready, How to do it…, How it works…
- system environment variables
- inspecting / Inspecting system environment variables, How it works…, There's more…
- system module
- about / There's more…
T
- TAP format
- using / Using TAP format
- TapReporter / There's more…
- TAP reports
- generating / Generating TAP reports, Getting ready, How to do it…, How it works…
- TeamcityReporter / There's more…
- TerminalReporter
- using, for unit testing / Getting ready, How it works…
- TerminalReporter constructor
- about / There's more…
- test results
- exporting, from CasperJS / Exporting test results from CasperJS in the XUnit format, How it works…
- trace parameter
- about / onError parameters
- properties / onError parameters
- type coercion, with phantom.exit method / Type coercion with phantom.exit
U
- --ua flag
- about / User agent
- unit testing
- TerminalReporter, using for / Getting ready, How it works…
- URL
- opening, within PhantomJS / Opening a URL within PhantomJS, How it works…
V
- --viewport flag
- about / Viewport
- version
- inspecting, at runtime / Inspecting the version at runtime
- version property / Inspecting the version at runtime
- visual regressions
- detecting, PhantomCSS used / Detecting visual regressions using PhantomCSS, How to do it…, How it works…
W
- WebDriver
- webdriver command-line argument / How it works…
- WebdriverJS
- using, as Selenium client / Getting ready, How to do it…, How it works…
- WebKit / How it works…
- web page
- saving, from PhantomJS as PDF / Getting ready, How to do it…, How it works…
- webpage.evaluate callback function / How it works…
- webpage.onLoadFinished handler / See also
- webpage.paperSize property
- about / webpage.paperSize
- width / width and height
- height / width and height
- format / format
- orientation / orientation
- border / border
- webpage.scrollPosition object
- updating / There's more…
- webpage API
- about / There's more…
- WebPage constructor
- about / The WebPage constructor
- web page content rendering
- questions, for troubleshooting / There's more…
- web page instance
- creating, with webpage module / Creating a web page instance in PhantomJS with the webpage module, How it works…
- webpage module
- about / Introduction, Rendering images from PhantomJS
- web page instance, creating with / Creating a web page instance in PhantomJS with the webpage module, How it works…
- create method / There's more…
- webpage objects
- about / How it works…
- web pages
- interacting, CasperJS used / Interacting with web pages using CasperJS, Getting ready, How it works…, There's more…
- WebSocket
- URL / Getting ready
- WebSockets
- working with / Working with WebSockets in PhantomJS, How to do it…, How it works…, There's more…
- WebStorm
- Jasmine unit tests, running with Karma / Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- Jasmine unit tests, running with PhantomJS / Running Jasmine unit tests with Karma and PhantomJS from WebStorm, Getting ready, How to do it…, How it works…
- about / Getting ready
- Windows PATH
- URL, for documentation / How to do it…
- writeLine method / Other stream methods
- write method
- about / write
X
- XUnit format
- test results, exporting from CasperJS / Exporting test results from CasperJS in the XUnit format, How it works…
- X virtual framebuffer (Xvfb) / Introduction
Y
- YSlow
- about / Executing a detailed performance analysis, How it works…
- working / How it works…
- command-line options / There's more…
- YSLOW.registerRule
- about / How it works…
- YSlow and PhantomJS
- used, for automating performance analysis / Automating performance analysis with YSlow and PhantomJS, Getting ready, How to do it…, How it works…
- YSlow performance analysis
- executing, with custom ruleset / Executing a YSlow performance analysis with a custom ruleset, Getting ready, How to do it…, How it works…