From 607bb07520271ea30f739b8ec1a0c57fb24a7ac6 Mon Sep 17 00:00:00 2001 From: Ken Yasue Date: Mon, 24 Mar 2025 15:47:10 +0100 Subject: [PATCH] not finished --- src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/index.ts b/src/index.ts index 0edb967..9751a0a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -58,6 +58,17 @@ async function visitCityPages(): Promise { if (seeAllUrl.length == 0) throw `${city} failed`; await WebDriverUtils.wait(); + + // open new incognito window + const driver2 = await useChrome(); + if (!driver2) throw `${city} failed`; + + await WebDriverUtils.wait(); + await driver2.get(seeAllUrl); + await WebDriverUtils.wait(); + + + console.log("Switch tab") let windows = await driver.getAllWindowHandles(); // Switch to the newly opened window/tab