Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

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

Select an option

Save pablocattaneo/1efef5538581c2d414100b38ab40daf1 to your computer and use it in GitHub Desktop.
// https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-checked
// expect(radioButton).toBeChecked();
test("Radio button actions", async ({ page }) => {
await page.goto("https://testautomationpractice.blogspot.com/");
const radioButton = page.getByRole("radio").and(page.locator("#male"));
await radioButton.check();
await expect(radioButton).toBeChecked();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment