Created
June 29, 2025 07:50
-
-
Save minhphong306/6fdf08545af58a26e31078257dbbfb4d to your computer and use it in GitHub Desktop.
Code need help
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
import { test } from '@playwright/test'; | |
test("Register", async ({ page }) => { | |
await page.goto('https://material.playwrightvn.com/'); | |
await page.click('//a[@href="01-xpath-register-page.html"]'); | |
await page.locator('//input[@id="username"]').fill('Trangdt98'); | |
await page.locator('//input[@id="email"]').fill('[email protected]'); | |
await page.locator('//input[@id="female"]').check(); | |
await page.locator('//input[@id="traveling"]').check(); | |
await page.locator('//select[@id="country"]').selectOption({ value: "usa" }); | |
await page.locator('//input[@id="profile"]').setInputFiles("D:/pw-course (1)/Data/165522424_10225222190398060_7591752606277882188_n.jpg"); | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment