diff --git a/packages/happy-dom/README.md b/packages/happy-dom/README.md index c0aef71ca..741ed234b 100644 --- a/packages/happy-dom/README.md +++ b/packages/happy-dom/README.md @@ -81,9 +81,6 @@ const page = browser.newPage(); // Navigates page await page.goto('https://github.com/capricorn86'); -// Waits for all operations on the page to complete (fetch, timers etc.) -await page.waitUntilComplete(); - // Clicks on link page.mainFrame.document.querySelector('a[href*="capricorn86/happy-dom"]').click(); diff --git a/packages/integration-test/test/tests/Browser.test.js b/packages/integration-test/test/tests/Browser.test.js index ba6aae4e7..2539c57bb 100644 --- a/packages/integration-test/test/tests/Browser.test.js +++ b/packages/integration-test/test/tests/Browser.test.js @@ -11,7 +11,7 @@ describe('Browser', () => { await page.goto('https://github.com/capricorn86'); page.mainFrame.document.querySelector('a[href="/capricorn86/happy-dom"]').click(); - await page.waitForNavigation(); + await page.waitUntilComplete(); expect(page.mainFrame.url).toBe('https://github.com/capricorn86/happy-dom'); expect(