PhantomJS介紹

 

http://phantomjs.org/

PhantomJS 是一個基於 WebKit 的服務器端 JavaScript API。它全面支持web而不需瀏覽器支持,其快速,原生支持各種Web標準: DOM 處理, CSS 選擇器, JSON, Canvas, 和 SVG。 PhantomJS 可以用於 頁面自動化 , 網絡監測 , 網頁截屏 ,以及 無界面測試 等。 

 

 

PhantomJS快速入門教程

http://www.tuicool.com/articles/beeMNj/

 

 

casperjs,phantomjs,slimerjs and spooky

1、casperjs http://casperjs.org/

CasperJS is a navigation scripting & testing utility for PhantomJS and SlimerJS written in Javascript

網站截圖小例子:http://type.so/linux/casperjs-capture-nice.html,提到中文顯示問題.

http://fourword.fourkitchens.com/article/series/casperjs  有幾篇關於casperjs使用的文章,不錯的。

 

2、phantomjs http://phantomjs.org/

PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast andnative support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

 

3、slimerjs http://slimerjs.org/

SlimerJS is useful to do functional tests, page automation, network monitoring, screen capture, etc.

SlimerJS is similar to PhantomJs, except that it runs on top of Gecko, the browser engine of Mozilla Firefox(specifically, version 31), instead of Webkit, and is not yet truly headless.

 

4、spookyjs https://github.com/WaterfallEngineering/SpookyJS

Drive CasperJS from Node.js.

Note: If you are simply looking to control Phantom from Node and don't need Casper's API, have a look at PhantomJS 1.8, which has native WebDriver support.

 

以上工具可以完成很多前端自動化的工作,截屏,抓取,測試等,跟selenium (http://docs.seleniumhq.org/download/)配合可以完成自動化測試,暫時沒深入研究過selenium

發佈了347 篇原創文章 · 獲贊 8 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章