const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  const page = await browser.newPage();
  
  await page.goto('http://localhost:5173/#/pages/video-generator/create', {
    waitUntil: 'networkidle',
    timeout: 30000
  });
  
  await page.waitForTimeout(5000);
  
  // 检查第一个 step-panel 的内容
  const panelHTML = await page.evaluate(() => {
    const panel = document.querySelector('.step-panel');
    return panel ? panel.innerHTML : '未找到 step-panel';
  });
  
  console.log('第一个 step-panel 的内容:');
  console.log(panelHTML.substring(0, 1000));
  
  // 查找所有 input
  const allInputs = await page.evaluate(() => {
    const inputs = document.querySelectorAll('input');
    return Array.from(inputs).map(inp => ({
      tagName: inp.tagName,
      className: inp.className,
      placeholder: inp.placeholder,
      type: inp.type
    }));
  });
  
  console.log('\n\n页面中的所有 input 元素:');
  console.log(JSON.stringify(allInputs, null, 2));
  
  await browser.close();
})();
