May 2017
Beginner to intermediate
220 pages
5h 2m
English
Although it's convenient and fairly easy to install and use Selenium with common browsers; this can present problems when running these scripts on servers. For servers, it's more common to use headless browsers. They also tend to be faster and more configurable than fully-functional web browsers.
The most popular headless browser at the time of this publication is PhantomJS. It runs via its own JavaScript-based webkit engine. PhantomJS can be installed easily on most servers, and can be installed locally by following the latest download instructions (http://phantomjs.org/download.html).
Using PhantomJS with Selenium merely requires a different initialization:
>>> from selenium import webdriver>>> driver = ...
Read now
Unlock full access