phantomas 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/browser.js
CHANGED
|
@@ -334,11 +334,16 @@ Browser.prototype.close = async () => {
|
|
|
334
334
|
// https://github.com/puppeteer/puppeteer/blob/v1.11.0/docs/api.md#pagecloseoptions
|
|
335
335
|
if (this.page && !this.page.isClosed())
|
|
336
336
|
await this.page.close({ runBeforeUnload: true });
|
|
337
|
+
} catch (ex) /* istanbul ignore next */ {
|
|
338
|
+
debug("An exception was raised while closing the page: " + ex);
|
|
339
|
+
debug(ex);
|
|
340
|
+
}
|
|
337
341
|
|
|
342
|
+
try {
|
|
338
343
|
// The page is closed, let's close the browser
|
|
339
344
|
if (this.browser && this.browser.isConnected()) await this.browser.close();
|
|
340
345
|
} catch (ex) /* istanbul ignore next */ {
|
|
341
|
-
debug("An exception was raised
|
|
346
|
+
debug("An exception was raised while closing the browser: " + ex);
|
|
342
347
|
debug(ex);
|
|
343
348
|
}
|
|
344
349
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
var context = phantomas.getDOMPath(this);
|
|
59
59
|
|
|
60
60
|
// querying by BODY and body is the same (issue #419)
|
|
61
|
-
tagName = tagName.toLowerCase();
|
|
61
|
+
if (tagName) tagName = tagName.toLowerCase();
|
|
62
62
|
|
|
63
63
|
phantomas.incrMetric("DOMqueriesByTagName");
|
|
64
64
|
phantomas.addOffender("DOMqueriesByTagName", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phantomas",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"author": "macbre <maciej.brencz@gmail.com> (http://macbre.net)",
|
|
5
5
|
"description": "Headless Chromium-based web performance metrics collector and monitoring tool",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"decamelize": "^5.0.0",
|
|
34
34
|
"fast-stats": "0.0.6",
|
|
35
35
|
"js-yaml": "^4.0.0",
|
|
36
|
-
"puppeteer": "^20.
|
|
36
|
+
"puppeteer": "^20.9.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@jest/globals": "^28.0.0",
|