You can use XPath expressions to locate elements based on their structure within the DOM.
const element = await page.locator('//input[@name="email"]'); // Locate input element by name attribute
You can use XPath expressions to locate elements based on their structure within the DOM.
const element = await page.locator('//input[@name="email"]'); // Locate input element by name attribute