0

A fellow developer told me that PhantomJS uses an old version of Webkit, and that this prevents him from always trusting the results he gets from running Capybara specs using PhantomJS.

To my knowledge, PhantomJS is the best headless browser available for running Capybara specs. The only alternatives I've found to this setup is:

Given this information, my question is:

  • Is there a way to update the version of Webkit in PhantomJS to the latest version?

  • If the answer is no to the previous question, is there an alternative to PhantomJS that uses the latest version of Webkit?

voltair
  • 615
  • 2
  • 7
  • 21

2 Answers2

1

Phantom 1.9 (and earlier) uses a version of webkit that is a few years old (roughly equivalent to Chrome 13), whereas the just-released Phantom 2.0 uses a webkit that was released in mid 2014 IIRC.

There is quite a large difference between the amount of supported HTML5 features in them, so almost certainly your friend is referring to Phantom 1.9. Switching to Phantom 2.0 should be all you need to do. Or, rephrasing, if your site requires some API not supported by Phantom 2.0, you are living on the edge, and should consider offering a polyfill.

Darren Cook
  • 27,837
  • 13
  • 117
  • 217
0

The answer is maybe if you want to update the version yourself. Keep in mind that it took the PhantomJS team more than a year until PhantomJS 2 was released with the newer WebKit version.

You can use any browser headlessly with xvfb.

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
  • Would I have to write my own Capybara driver if I wanted to use any browser headlessly with xvfb? If so, wouldn't I likely be better off just using Selenium in that case? – voltair Feb 24 '15 at 17:38
  • I haven't used either capybara or selenium with xvfb. I really don't know how this can be done, but I'm sure it *can* be. – Artjom B. Feb 24 '15 at 17:42