Skip to content

Commit 33054f3

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

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
@@ -10,7 +10,7 @@ If you're running acceptance tests in [Codeception](http://codeception.com/) tha
1010

1111
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

@@ -129,7 +129,7 @@ modules:
129129
webStorageEnabled: true
130130
{% endhighlight %}
131131

132-
I have no idea if capabilities from the larger list of Selenium [DesiredCapabilitie](http://code.google.com/p/selenium/wiki/DesiredCapabilities) that are not on the list you see reported from the driver are enabled for PhantomJS.
132+
I have no idea if capabilities from the larger list of Selenium [DesiredCapabilities](http://code.google.com/p/selenium/wiki/DesiredCapabilities) that are not on the list you see reported from the driver are enabled for PhantomJS.
133133

134134
Headless testing can be a bit of a challenge, since it's impossible to 'see' what failed. But in this case, Codeceptions default logging and screenshot capture on failure can be extremely helpful, since you can then actually see the state of the browser at the point of failure.
135135

0 commit comments

Comments
 (0)