register.spec.ts 623 B

123456789101112131415161718192021222324
  1. import { test } from '@playwright/test';
  2. import { expect } from '@playwright/test';
  3. test('移动端注册测试', async ({ page, context }) => {
  4. // Navigate to URL
  5. await page.goto('https://pre-117-77-template.r.d8d.fun/mobile/register');
  6. // Fill input field
  7. await page.fill('#username', 'testuser');
  8. // Fill input field
  9. await page.fill('#email', 'testuser@example.com');
  10. // Fill input field
  11. await page.fill('#password', 'Test1234!');
  12. // Fill input field
  13. await page.fill('#confirmPassword', 'Test1234!');
  14. // Click element
  15. await page.click('button[type='submit']');
  16. });