From 9a263baf74e6069b04bc9c4b49817bfebda0b304 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 15 Aug 2023 19:19:19 +0800 Subject: [PATCH] hero test script update --- test/cloud_test.mjs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/cloud_test.mjs b/test/cloud_test.mjs index fdc1648..bdddf90 100644 --- a/test/cloud_test.mjs +++ b/test/cloud_test.mjs @@ -2,8 +2,19 @@ import Hero from '@ulixee/hero'; (async () => { const hero = new Hero({ connectionToCore: 'ws://192.168.3.13:1818' }); - await hero.goto('https://filesite.io'); + + const url = 'https://filesite.io'; + //const url = 'https://www.google.com'; + await hero.goto(url, { + timeoutMs: 120000, + referrer: '-' + }); + const title = await hero.document.title; console.log('Page title', title); + await hero.close(); -})(); +})().catch(error => { + console.log('ERROR when request url via hero', error); + process.exit(1); +});