Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between PhantomJS 2.0 and PhantomJS 1.9

Can anyone give me the differences between those versions?

What can I do in version 2 that I could not do in earlier versions?

I use PhantomJS to execute code generated by Selenium. Will be there performance improvements?

like image 798
DevOps85 Avatar asked Feb 17 '15 07:02

DevOps85


1 Answers

PhantomJS 2 has a "new" WebKit version underneath. So it changed from 534.34 in PhantomJS 1 to 538.1 in PhantomJS 2. The difference in numbers in this dimension is not big, but there is a more than two year difference between the release of the two WebKit versions. See also: Does PhantomJS use QtWebKit or Blink?

It's not that its performance is better, but rather that it supports more up-to-date web standards and APIs, and has less bugs.

Problems in the past:

  • element.click() was not available on all elements, but only on <input> and <button> elements. (Workaround)
  • PhantomJS has now Function.prototype.bind which doesn't need a shim anymore.
  • PhantomJS <1.9.8 used SSLv3 by default which broke many scripts one day.
  • PhantomJS 1 has a bug with :nth-child() selectors.
like image 85
Artjom B. Avatar answered Sep 21 '22 23:09

Artjom B.