| 123456789101112131415161718192021222324252627282930313233343536 |
- import { test, expect } from '@playwright/test';
- test('人才小程序登录页面详细检查', async ({ page }) => {
- await page.goto('http://localhost:10087/pages/login/index.html');
- await page.waitForTimeout(3000);
-
- const pageText = await page.textContent('body');
-
- console.log('=== 登录页面检查 ===');
- console.log('页面标题:', await page.title());
-
- const hasLoginTitle = pageText?.includes('人才登录') || pageText?.includes('人才服务平台');
- console.log('是否有登录标题:', hasLoginTitle ? '是' : '否');
-
- const hasAgreement = pageText?.includes('用户协议') || pageText?.includes('隐私政策');
- console.log('是否包含协议文字:', hasAgreement ? '是 ⚠️' : '否 ✓');
-
- const bottomContent = await page.evaluate(() => {
- const allText = document.body.innerText;
- const lines = allText.split('\n').filter(line => line.trim());
- return {
- lastLines: lines.slice(-5)
- };
- });
-
- console.log('\n页面最后几行内容:');
- bottomContent.lastLines.forEach((line, idx) => {
- console.log(' ' + (idx + 1) + ': ' + line);
- });
-
- if (hasAgreement) {
- console.log('\n⚠️ 页面上发现协议相关文字');
- } else {
- console.log('\n✓ 登录页面没有协议文字');
- }
- });
|