Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
49
frontend/simple-test.js
Normal file
49
frontend/simple-test.js
Normal file
@@ -0,0 +1,49 @@
|
||||
const { chromium } = require('playwright');
|
||||
|
||||
async function simpleTest() {
|
||||
const browser = await chromium.launch({
|
||||
headless: false,
|
||||
slowMo: 1000
|
||||
});
|
||||
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
|
||||
// 监听控制台输出
|
||||
page.on('console', msg => {
|
||||
console.log(`控制台: ${msg.text()}`);
|
||||
});
|
||||
|
||||
try {
|
||||
// 登录
|
||||
await page.goto('http://localhost:8891/login');
|
||||
await page.fill('input[type="text"]', 'admin');
|
||||
await page.fill('input[type="password"]', '111111');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// 访问主页
|
||||
await page.goto('http://localhost:8891/home');
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
console.log('开始点击菜单...');
|
||||
|
||||
// 点击第一个子菜单标题
|
||||
await page.click('.ivu-menu-submenu-title');
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
// 点击第一个菜单项
|
||||
await page.click('.ivu-menu-item');
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
console.log('菜单点击完成');
|
||||
|
||||
} catch (error) {
|
||||
console.error('测试失败:', error);
|
||||
}
|
||||
|
||||
await page.waitForTimeout(5000);
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
simpleTest();
|
||||
Reference in New Issue
Block a user