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: make sure `page.fill` actually clears an input (#851)
Andrey Lushnikova4c40fff8206
diff --git a/test/page.spec.js b/test/page.spec.jsindex 4c712e76e2..e29cd6f44c 100644--- a/test/page.spec.js+++ b/test/page.spec.js@@ -1132,6 +1132,13 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FFawait page.fill('input', '').catch(e => error = e);expect(error.message).toContain('Cannot type text into input[type=number].');});+ it('should be able to clear', async({page, server}) => {+ await page.goto(server.PREFIX + '/input/textarea.html');+ await page.fill('input', 'some value');+ expect(await page.evaluate(() => result)).toBe('some value');+ await page.fill('input', '');+ expect(await page.evaluate(() => result)).toBe('');+ });});describe('Page.Events.Close', function() {