PhantomJS應用簡介

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.
#
其他一些相關項目。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章