Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/examples/show-browser.js
1028 views
1
const { Agent } = require('secret-agent');
2
3
process.env.SA_SHOW_BROWSER = 'true';
4
5
(async () => {
6
const url = `https://dataliberationfoundation.org/`;
7
console.log('Opened Browser');
8
const agent = new Agent();
9
10
await agent.goto(url, 5e3);
11
await agent.waitForPaintingStable();
12
13
await agent.waitForMillis(5e3);
14
await agent.close();
15
})();
16
17