How to install and configure PHANTOMJS working environment in Linux/centos environment

Source: Internet
Author: User
Tags bz2

PHANTOMJS is a WebKit-based server-side JavaScript API. It fully supports the web without the need for browser support, its fast, native support for various web standards: DOM processing, CSS selectors, JSON, Canvas, and SVG. PHANTOMJS can be used for page automation, network monitoring, web screen screenshots, and no interface testing.


#下载PhantomJS安装包wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86 _64.tar.bz2-xjvf phantomjs-2.1. 1-linux-x86_64.tar.bz2# The executable file into the system path will be PHANTOMJS-2.1. 1-linux-x86_64/bin/phantomjs file is placed under/usr/bin/and change file permissions

#安装依赖
Yum Install Fontconfig
Yum Install FreeType

(1) Hello, world!.

(2) Script parameters –script Arguments

(3) Page load –page Loading

Load a special URL (don't forget the HTTP protocol) and measure the time it takes to load the page

(4) Code operation

(5) DOM Operations

Read the attributes of an element with ID myagent textContent

Using jquery and other class libraries

(6) Network request and response

Reference blog:

How to install and configure PHANTOMJS working environment in Linux/centos EnvironmentPHANTOMJS Installation and Quick Start Tutorials

How to install and configure PHANTOMJS working environment in Linux/centos environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.