Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pablocattaneo/97771cadaa63333325e090a396469184 to your computer and use it in GitHub Desktop.

Select an option

Save pablocattaneo/97771cadaa63333325e090a396469184 to your computer and use it in GitHub Desktop.
// you can do that using the locator method of the page object that is set as argument of the test function argument
import { test, expect } from '@playwright/test';
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
const inputName = page.locator("#name") // Select element by id
await expect(inputName).toBeVisible()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment