From b3e2a4480d2a65f253014ad8172da793681b76f8 Mon Sep 17 00:00:00 2001 From: alicechai Date: Tue, 6 Feb 2024 19:43:23 +0700 Subject: [PATCH] fix: add line to open new tab --- .../typhon/typhon-wallet-registration-debug.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/wallet-automation/typhon/typhon-wallet-registration-debug.spec.ts b/tests/wallet-automation/typhon/typhon-wallet-registration-debug.spec.ts index bd38d51e1e..66cadcc3cc 100644 --- a/tests/wallet-automation/typhon/typhon-wallet-registration-debug.spec.ts +++ b/tests/wallet-automation/typhon/typhon-wallet-registration-debug.spec.ts @@ -18,10 +18,13 @@ test('import wallet', async ({ }) => { ], }); + const page = await browser.newPage(); + await page.waitForTimeout(1000); // Adjust the timeout as needed + // Get all pages (tabs) in the context const pages = browser.pages(); - // The new tab is typically the last one in the list + // // The new tab is typically the last one in the list const newTab = pages[pages.length - 1]; await newTab.bringToFront(); // Brings the new tab to the foreground