Skip to content

Instantly share code, notes, and snippets.

@katawara
Created May 21, 2024 09:54
Show Gist options
  • Save katawara/50267c41ed249084b3964de80a59fbcc to your computer and use it in GitHub Desktop.
Save katawara/50267c41ed249084b3964de80a59fbcc to your computer and use it in GitHub Desktop.
Gauge and Playwright sample code
export default class Sample {
@Step('ボタン <text> をクリック')
private static async clickButton(text: string) {
const page = Scenario.getPage();
const locator = page.locator(`button:has-text("${text}")`).first();
await locator.click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment