testaro 59.0.0 → 59.0.1
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/package.json +1 -1
- package/run.js +9 -4
package/package.json
CHANGED
package/run.js
CHANGED
|
@@ -214,10 +214,15 @@ const goTo = async (report, page, url, timeout, waitUntil) => {
|
|
|
214
214
|
// Closes the current browser.
|
|
215
215
|
const browserClose = async () => {
|
|
216
216
|
if (browser) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
for (const context of browser.contexts()) {
|
|
218
|
+
try {
|
|
219
|
+
await context.close();
|
|
220
|
+
}
|
|
221
|
+
catch(error) {
|
|
222
|
+
console.log(
|
|
223
|
+
`ERROR trying to close context: ${error.message.slice(0, 200).replace(/\n.+/s, '')}`
|
|
224
|
+
);
|
|
225
|
+
}
|
|
221
226
|
}
|
|
222
227
|
await browser.close();
|
|
223
228
|
browser = null;
|