Skip to content

Commit 70dc7f6

Browse files
Merge pull request #28 from DP6/BrowserAutomaticClose
Browser automatic close
2 parents b12a60f + 3227f98 commit 70dc7f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ const schema = require(`./schema/${config.schema_name}`);
103103
bowser(obj);
104104
};
105105
});
106+
if (config.browserClose) {
107+
config.time ? await page.waitFor(config.time) : await page.waitFor(0);
108+
await browser.close();
109+
}
106110
} else {
107111
let path = `Path : ${page.url()}\n`;
108112
//doc.text(path, 10, 10);

0 commit comments

Comments
 (0)