Seleniumwebdriver-获取性能日志-未知日期时间戳(12345.12345)
我最近一直在使用 selenium webdriver 和 chrome 以及日志。但是任何时间戳值都以奇怪的日期时间戳格式返回。我找遍了,我不知道它是什么。此外,时间戳以外的其他值(如 requestId 或 walltime)也采用新的未知格式。这是什么格式,我怎样才能把它变成正常的 (MM DD YYYY HH:MM:SS..) 格式?
2021 年 6 月 23 日左右的时间戳为 2484894.662632,2021 年 6 月 23 日左右的 10:53:23.118 时间戳为 2486019.900761,2021 年 6 月 23 日左右,11:12:01.277 时间戳为 2581859.5 2021 年 6 月 23 日左右的 2581859.59:204:14:25
例子:
"requestId":"30432.634","timestamp":87693.142713,"type":"XHR","wallTime":1624556888.229531}
代码片段:
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.BROWSER, Level.ALL);
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
flavorCapability.setCapability("goog:loggingPrefs", logPrefs);
driver.manage().logs().get(LogType.PERFORMANCE).getAll();
THE END
二维码