Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

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

Select an option

Save pablocattaneo/da36b0ddc86eb352d657e48f4e12e6e2 to your computer and use it in GitHub Desktop.
// you can do that using the toBeEnabled method of the object that returns expect method
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).toBeEnabled()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment