Skip to content

Commit 6672324

Browse files
author
Davert
committed
phantomjs post
1 parent 33054f3 commit 6672324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2013-05-13-phantom-js-headless-testing.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ date: 2013-05-13 01:03:50
88

99
If you're running acceptance tests in [Codeception](http://codeception.com/) that require interaction with JavaScript, or have scripts that manipulate the DOM, the speedy [Php Browser](http://codeception.com/docs/modules/PhpBrowser) driver won't help you since it doesn't support JavaScript. The best options for running tests using JavaScript are the [Selenium2](http://codeception.com/docs/modules/Selenium2) and [ZombieJS](http://codeception.com/docs/modules/ZombieJS) drivers.
1010

11-
The **Selenium2** driver actually loads and runs an active browser session, manipulating the browser just as a human would. **ZombieJS** is a 'headless' browser that provides all of the features of a regular browser, but without a display interface. Without the extra time spent waiting for the display to actually render, a headless browser like ZombieJS can run far faster than a normal browser, so you're tests will execute in as little as half the time. But ZombieJS requires installing Node.js and can be a little buggy, plus it has its own API (which has both pros and cons). The Selenium2 driver is well tested and implements a standard API -- the WebDriver Wire Protocol -- across all of the browsers it has drivers for.
11+
The **Selenium2** driver actually loads and runs an active browser session, manipulating the browser just as a human would. **ZombieJS** is a 'headless' browser that provides all of the features of a regular browser, but without a display interface. Without the extra time spent waiting for the display to actually render, a headless browser like ZombieJS can run far faster than a normal browser, so you're tests will execute in as little as half the time. But ZombieJS requires installing Node.js and can be a little buggy, plus it has its own API (which has both pros and cons). The Selenium2 driver is well tested and implements a standard API -- the **WebDriver Wire Protocol** -- across all of the browsers it has drivers for.
1212

13-
Now there's a headless browser that includes a **WebDriver Wire Protocol** implementation -- [PhantomJS](http://phantomjs.org/index.html). The latest version of PhantomJS is an easy to install, stand-alone binary that doesn't require installing Node.js or any other dependencies, and ships with its own **'Ghost Driver'** for implementing the WebDriver Wire Protocol. Which means you can drive it using the Selenium2 driver in Codeception, and anything that you can test in Chrome, Firefox, Safari, or IE using Selenium2, you can now test in half the time using PhantomJS
13+
Now there's a headless browser that includes a WebDriver Wire Protocol implementation -- **[PhantomJS](http://phantomjs.org/index.html)**. The latest version of PhantomJS is an easy to install, stand-alone binary that doesn't require installing Node.js or any other dependencies, and ships with its own **'Ghost Driver'** for implementing the WebDriver Wire Protocol. Which means you can drive it using the Selenium2 driver in Codeception, and anything that you can test in Chrome, Firefox, Safari, or IE using Selenium2, you can now test in half the time using PhantomJS
1414

1515
To get started, if you haven't installed Selenium2, you just need to follow the [instructions](http://codeception.com/docs/modules/Selenium2) on the Codeception web site for installing and running the Selenium2 driver.
1616

0 commit comments

Comments
 (0)