Playwright Text input

Profile picture for user arilio666

The playwright has 'fill,' which will quickly fill out form fields. It focuses primarily on the element and triggers input events with the provided text.




const {test, expect} = require('@playwright/test');
test('ElementHandle', async ({page})=> 
await page.goto("");
const framePage = await page.frameLocator('iframe[title="Iframe Example"]');
await framePage.locator('.form-control').nth(0).fill('ash');
await framePage.locator('.form-control').nth(1).fill('');
await framePage.locator('.form-control').nth(2).fill('password!@#$');
await framePage.locator('.form-control').nth(3).fill('assword!@#$');

Fill Report
  • So as witnessed using fill, the form has been filled successfully.