Playwright Text input

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.
Thu, 11/24/2022 - 13:31
Ashwin possesses over five years of experience in the Quality Assurance industry and is currently serving as a Technical Lead at iVagus. His expertise encompasses a broad range of technologies, including Cypress, Rest Assured, Selenium, Cucumber, JavaScript and TypeScript.