- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 雜項
- 命令列介面
- PhantomJS - 螢幕截圖
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 範例
- PhantomJS 有用資源
- PhantomJS - 快速指南
- PhantomJS - 有用資源
- PhantomJS - 討論
PhantomJS - offlineStoragePath 屬性
此屬性返回在 < b >window.localStorage 中儲存資料時使用的路徑。此路徑可以使用 < b >--local-storage-path 從命令列更改。
語法
其語法如下 -
var wpage = require('webpage').create();
wpage.offlineStoragePath
範例
讓我們看一個範例來了解 < b >offlineStoragePath 屬性的用法。
var wpage = require('webpage').create();
wpage.open('https:///tasks/page1.html', function (status) {
console.log(wpage.offlineStoragePath );
phantom.exit();
});
上述程式生成以下 < b >輸出。
C:/Users/Username/AppData/Local/Ofi Labs/PhantomJS
phantomjs_webpage_module_properties.htm
廣告