页面重定向到错误页面时,har导出触发器无法捕获数据

时间:2019-01-18 08:37:29

标签: rest har

I am using har-export-trigger to capture har files, I have enabled automation by setting `"extensions.netmonitor.har.enableAutomation", true.`

我还在下面设置了偏好

("extensions.netmonitor.har.contentAPIToken", "test")
("devtools.netmonitor.har.includeResponseBodies", true)
("devtools.webconsole.persistlog", true)

使用以下脚本捕获har文件

var options = {
  token: "test",
  getData: true, 
  fileName: "testName_harfile-%y%m%d%H%M%S"  // Name of the file
};

HAR.triggerExport(options).then(result => {
  // The local file is available now, result.data is null since options.getData wasn't set.
});
在大多数情况下,会捕获

har文件,但是当页面重定向到错误页面时,很少有请求丢失。

0 个答案:

没有答案
相关问题