-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Architecture
PhantomJS is a C++ application for x86 operating systems such as Windows, OS X, and Linux.
To construct and work with web pages, it uses WebKit (webkit.org), an open-source web rendering engine from Apple. For executing JavaScript code, WebKit relies on its JavaScript engine called JavaScriptCore.
More specifically, PhantomJS uses a particular variant of WebKit, notionally called QtWebKit, that utilizes Qt (qt.io), an open-source multi-platform C++ framework. Qt normalizes the differences between various operating systems and provides a set of unified API for event loops, threads, network connections using HTTP(s), 2-D graphics, font handling, file system, I/O operations, and many more.
PhantomJS can be used with Selenium because it embeds Ghost Driver (github.com/detro/ghostdriver), a pure JavaScript implementation of WebDriver Wire Protocol that utilizes PhantomJS functionalities.