完善软著说明书核心功能截图
- 重新截取更大范围的AI自动推理传播范围图,并补充传播结果帧查看截图。 - 补充AI智能分割正向点、反向点及正负点共同生成结果截图。 - 在分割工作区说明中补充时间轴切换当前帧截图。 - 删除说明书正文中的所有分段演示视频链接文本。 - 更换退出系统小节截图为鼠标悬停退出按钮的界面图。 - 更新素材录制脚本与功能验证素材清单。
This commit is contained in:
@@ -10,6 +10,7 @@ const IMAGE_DIR = path.join(OUT_ROOT, 'images');
|
||||
const VIDEO_DIR = path.join(OUT_ROOT, '系统使用视频');
|
||||
const viewport = { width: 1920, height: 1080 };
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
const shouldSkipVideos = process.env.SEG_SKIP_VIDEO === '1';
|
||||
|
||||
async function ensureDirs() {
|
||||
await fs.mkdir(IMAGE_DIR, { recursive: true });
|
||||
@@ -82,9 +83,22 @@ async function captureCoreScreenshots() {
|
||||
const page = await context.newPage();
|
||||
|
||||
await login(page);
|
||||
await page.getByTitle(/当前用户.*点击退出/).first().hover().catch(async () => {
|
||||
await page.mouse.move(32, 1020);
|
||||
});
|
||||
await sleep(800);
|
||||
await shot(page, '38-logout-button-hover.png');
|
||||
|
||||
await openWorkspace(page);
|
||||
await shot(page, '24-workspace-current-frame-timeline.png');
|
||||
|
||||
await page.getByText('0003').first().click().catch(async () => {
|
||||
const box = await page.locator('body').boundingBox();
|
||||
if (box) await page.mouse.click(box.x + box.width * 0.55, box.y + box.height * 0.95);
|
||||
});
|
||||
await sleep(1200);
|
||||
await shot(page, '32-workspace-current-frame-switched.png');
|
||||
|
||||
await drawPolygonDraft(page);
|
||||
await shot(page, '25-create-polygon-vertices.png');
|
||||
await completePolygon(page);
|
||||
@@ -93,14 +107,21 @@ async function captureCoreScreenshots() {
|
||||
await page.getByTitle('AI自动推理').click();
|
||||
await sleep(800);
|
||||
await page.getByLabel('传播起始帧').fill('1').catch(() => {});
|
||||
await page.getByLabel('传播结束帧').fill('3').catch(() => {});
|
||||
await page.getByLabel('传播结束帧').fill('12').catch(() => {});
|
||||
await shot(page, '27-ai-auto-inference-range.png');
|
||||
await shot(page, '33-ai-auto-inference-wide-range.png');
|
||||
await page.getByRole('button', { name: '开始传播' }).click();
|
||||
await sleep(1800);
|
||||
await shot(page, '28-ai-auto-inference-running.png');
|
||||
await page.waitForFunction(() => document.body.innerText.includes('已自动传播') || document.body.innerText.includes('没有生成新'), null, { timeout: 90000 }).catch(() => {});
|
||||
await sleep(1000);
|
||||
await shot(page, '29-ai-auto-inference-completed.png');
|
||||
await page.getByText('0008').first().click().catch(() => {});
|
||||
await sleep(1300);
|
||||
const propagatedBox = await canvasBox(page);
|
||||
await page.mouse.click(propagatedBox.x + propagatedBox.width * 0.46, propagatedBox.y + propagatedBox.height * 0.50);
|
||||
await sleep(800);
|
||||
await shot(page, '34-ai-auto-inference-result-selected.png');
|
||||
|
||||
await clickTitle(page, 'AI智能分割', 1800);
|
||||
await page.getByRole('button', { name: '正向选点' }).click();
|
||||
@@ -108,6 +129,10 @@ async function captureCoreScreenshots() {
|
||||
await page.mouse.click(box.x + box.width * 0.48, box.y + box.height * 0.48);
|
||||
await sleep(700);
|
||||
await shot(page, '30-ai-segmentation-positive-point.png');
|
||||
await page.getByRole('button', { name: '反向选点' }).click();
|
||||
await page.mouse.click(box.x + box.width * 0.34, box.y + box.height * 0.40);
|
||||
await sleep(700);
|
||||
await shot(page, '35-ai-segmentation-negative-point.png');
|
||||
await page.getByRole('button', { name: '执行高精度语义分割' }).click();
|
||||
await page.waitForFunction(() => {
|
||||
const text = document.body.innerText;
|
||||
@@ -115,6 +140,13 @@ async function captureCoreScreenshots() {
|
||||
}, null, { timeout: 90000 }).catch(() => {});
|
||||
await sleep(1200);
|
||||
await shot(page, '31-ai-segmentation-result.png');
|
||||
await shot(page, '36-ai-segmentation-positive-negative-result.png');
|
||||
|
||||
await page.getByTitle(/当前用户.*点击退出/).first().hover().catch(async () => {
|
||||
await page.mouse.move(32, 1020);
|
||||
});
|
||||
await sleep(800);
|
||||
await shot(page, '37-logout-hover.png');
|
||||
|
||||
await browser.close();
|
||||
}
|
||||
@@ -155,10 +187,10 @@ async function captureVideos() {
|
||||
await openWorkspace(page);
|
||||
await drawPolygonDraft(page);
|
||||
await completePolygon(page);
|
||||
await page.getByTitle('AI自动推理').click();
|
||||
await page.getByTitle('AI自动推理').click();
|
||||
await sleep(900);
|
||||
await page.getByLabel('传播起始帧').fill('1').catch(() => {});
|
||||
await page.getByLabel('传播结束帧').fill('3').catch(() => {});
|
||||
await page.getByLabel('传播结束帧').fill('12').catch(() => {});
|
||||
await sleep(900);
|
||||
await page.getByRole('button', { name: '开始传播' }).click();
|
||||
await sleep(5000);
|
||||
@@ -180,7 +212,9 @@ async function captureVideos() {
|
||||
async function main() {
|
||||
await ensureDirs();
|
||||
await captureCoreScreenshots();
|
||||
await captureVideos();
|
||||
if (!shouldSkipVideos) {
|
||||
await captureVideos();
|
||||
}
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user