Go + PostgreSQL + Valkey backend (cmd/internal/migrations), uni-app mobile frontend, PC web (web/), admin console (admin/), Android WebView container (android_project/). Build artifacts, node_modules, local env and debug screenshots excluded.
20 lines
702 B
JavaScript
20 lines
702 B
JavaScript
import { chromium } from 'playwright'
|
|
const browser = await chromium.launch({
|
|
executablePath: 'C:/Users/12914/AppData/Local/ms-playwright/chromium-1234/chrome-win64/chrome.exe',
|
|
headless: true,
|
|
})
|
|
const page = await browser.newPage({ viewport: { width: 900, height: 1200 } })
|
|
await page.goto('http://127.0.0.1:3100/', { waitUntil: 'networkidle' })
|
|
await page.waitForTimeout(800)
|
|
await page.screenshot({ path: 'scripts/shot-feed.png' })
|
|
|
|
// 进详情页
|
|
const card = page.locator('.article-card').first()
|
|
if (await card.count()) {
|
|
await card.click()
|
|
await page.waitForTimeout(1200)
|
|
await page.screenshot({ path: 'scripts/shot-article.png' })
|
|
}
|
|
await browser.close()
|
|
console.log('shots saved')
|