Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: page.reload() on a page with a hash (#21152)
Max Schmitt8b8444dacc93
diff --git a/tests/page/page-history.spec.ts b/tests/page/page-history.spec.tsindex 58a8bcb48f..2403b38949 100644--- a/tests/page/page-history.spec.ts+++ b/tests/page/page-history.spec.ts@@ -185,6 +185,14 @@ it('page.reload should work with cross-origin redirect', async ({ page, server,await expect(page).toHaveURL(server.CROSS_PROCESS_PREFIX + '/title.html');});+it('page.reload should work on a page with a hash', async ({ page, server, browserName }) => {+ it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21145' });+ it.fixme(browserName === 'firefox');+ await page.goto(server.EMPTY_PAGE + '#hash');+ await page.reload();+ await expect(page).toHaveURL(server.EMPTY_PAGE + '#hash');+});+it('page.goBack during renderer-initiated navigation', async ({ page, server }) => {await page.goto(server.PREFIX + '/one-style.html');await page.goto(server.EMPTY_PAGE);