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: expect verbatim datetime-local value on WebKit Windows (#43410)
Yury Semikhatsky41fad5e21069
diff --git a/tests/page/page-fill.spec.ts b/tests/page/page-fill.spec.tsindex ed604420e2..ff33d10107 100644--- a/tests/page/page-fill.spec.ts+++ b/tests/page/page-fill.spec.ts@@ -150,13 +150,16 @@ it('should fill week input', async ({ page }) => {it('should fill datetime-local input', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/43370' },-}, async ({ page, server }) => {+}, async ({ page, server, browserName, isWindows, channel }) => {await page.setContent('<input type=datetime-local>');await page.fill('input', '2020-03-02T05:15');expect(await page.$eval('input', input => input.value)).toBe('2020-03-02T05:15');- // The browser omits zero seconds.+ // The browser omits zero seconds. WebKit on Windows does not implement datetime-local inputs and keeps the value as is.await page.fill('input', '2020-03-02T06:20:00');- expect(await page.$eval('input', input => input.value)).toBe('2020-03-02T06:20');+ if (browserName === 'webkit' && isWindows && channel !== 'webkit-wsl')+ expect(await page.$eval('input', input => input.value)).toBe('2020-03-02T06:20:00');+ else+ expect(await page.$eval('input', input => input.value)).toBe('2020-03-02T06:20');});it('should fill contenteditable', async ({ page, server }) => {