Last active
February 17, 2026 02:33
-
-
Save pablocattaneo/f5dae32c3ff9f6c766238241f545bc51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // It is possible using .and locator https://playwright.dev/docs/api/class-locator#locator-and | |
| import { test, expect } from "@playwright/test"; | |
| test(" Text input actions", async ({ page }) => { | |
| await page.goto("https://testautomationpractice.blogspot.com/"); | |
| const textBox = page.getByRole('textbox').and(page.locator("#name")); | |
| await textBox.fill("Playwright"); | |
| await expect(textBox).toHaveValue("Playwright"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment