diff --git a/packages/obsidian-testing-framework/src/index.ts b/packages/obsidian-testing-framework/src/index.ts index 3058cd8..d3752c7 100644 --- a/packages/obsidian-testing-framework/src/index.ts +++ b/packages/obsidian-testing-framework/src/index.ts @@ -79,11 +79,11 @@ const obsidianTestFixtures: Fixtures = { async ({ electronApp, obsidian: { vault } }, run) => { const windows = electronApp.windows(); console.log("windows", windows); - let page = windows.last()!; + let page = windows[windows.length - 1]!; await page.waitForEvent("load"); await page.waitForLoadState("domcontentloaded"); await selectNewVault(page, vault!); - page = electronApp.windows().last()!; + page = electronApp.windows()[electronApp.windows().length - 1]!; await page.waitForEvent("load"); await page.waitForLoadState("domcontentloaded"); await waitForIndexingComplete(await getApp(page));