| 1234567891011121314151617181920212223242526272829303132333435363738 |
- import { test, expect } from '@playwright/test';
- test('调试银行名称管理页面', async ({ page }) => {
- console.log('导航到银行名称管理页面...');
- await page.goto('http://localhost:8080/admin/bank-names');
-
- // 等待页面加载
- await page.waitForTimeout(3000);
-
- // 截图查看页面
- await page.screenshot({ path: '/mnt/code/188-179-template-6/test-results/bank-page-debug.png', fullPage: true });
- console.log('已保存截图: test-results/bank-page-debug.png');
-
- // 获取页面HTML
- const bodyText = await page.locator('body').textContent();
- console.log('页面内容预览:', bodyText?.substring(0, 500));
-
- // 查找所有select元素
- const selects = page.locator('select');
- const selectCount = await selects.count();
- console.log('找到的select元素数量:', selectCount);
-
- for (let i = 0; i < selectCount; i++) {
- const select = selects.nth(i);
- const options = await select.locator('option').allTextContents();
- console.log(`Select ${i} 选项:`, options);
- }
-
- // 查找表格
- const tables = page.locator('table');
- const tableCount = await tables.count();
- console.log('找到的table元素数量:', tableCount);
-
- if (tableCount > 0) {
- const rows = await tables.first().locator('tr').count();
- console.log('第一个表格的行数:', rows);
- }
- });
|