WebKit 的服务器端 API PhantomJS

码农软件 · 软件分类 · 服务器端JavaScript · 2019-04-13 19:43:59

软件介绍

Phantom JS是一个服务器端的 JavaScript API 的 WebKit。其支持各种Web标准: DOM 处理, CSS 选择器, JSON, Canvas, 和 SVG

使用场景:

  • 无需浏览器的 Web 测试

  • 页面访问自动化

  • 屏幕捕获


  • 网络监控

屏幕捕获示例代码:

var page = require('webpage').create();
page.open('http://github.com/', function() {
  page.render('github.png');
  phantom.exit();
});

PhantomJS 生态环境:

  • CasperJS enables easy navigation scripting and common high-level testing.

  • Poltergeist allows running Capybara tests headlessly.

  • Guard::Jasmine automatically tests Jasmine specs on Rails when files are modified.

  • GhostDriver complements Selenium tests with a PhantomJS WebDriver implementation.

  • PhantomRobot runs Robot Framework acceptance tests in the background via PhantomJS.

  • Mocha-PhantomJS run Mocha tests using PhantomJS.

其他一些相关项目

本文地址:https://www.codercto.com/soft/d/3515.html

Rust编程之道

Rust编程之道

张汉东 / 电子工业出版社 / 2019-1 / 128

Rust 是一门利用现代化的类型系统,有机地融合了内存管理、所有权语义和混合编程范式的编程语言。它不仅能科学地保证程序的正确性,还能保证内存安全和线程安全。同时,还有能与C/C++语言媲美的性能,以及能和动态语言媲美的开发效率。 《Rust编程之道》并非对语法内容进行简单罗列讲解,而是从四个维度深入全面且通透地介绍了Rust 语言。从设计哲学出发,探索Rust 语言的内在一致性;从源码分析入......一起来看看 《Rust编程之道》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具