59 lines
3.6 KiB
JSON
59 lines
3.6 KiB
JSON
{
|
|
"schema": "freecad-web-manual/scenario/v1",
|
|
"chapter": "ch01",
|
|
"workflow": "ui-and-document",
|
|
"title": "界面、文档、对象树、属性、视图与保存",
|
|
"actions": [
|
|
{ "type": "goto", "url": "/project.html?workbench=Part" },
|
|
{ "type": "waitFor", "selector": "select[aria-label=\"Workbench\"]" },
|
|
{ "type": "wait", "ms": 1200 },
|
|
{ "type": "click", "selector": "nav[aria-label=\"Application menus\"] details", "hasText": "File", "target": ":scope > summary" },
|
|
{ "type": "click", "role": "button", "name": "新建 Document", "exact": true },
|
|
{ "type": "wait", "ms": 2200 },
|
|
{ "type": "eval", "script": "for (const d of document.querySelectorAll('nav[aria-label=\"Application menus\"] details[open]')) d.open = false" },
|
|
{ "type": "shot", "name": "01-interface", "fullPage": true },
|
|
{ "type": "click", "selector": ".part-menu > summary", "timeout": 30000 },
|
|
{ "type": "wait", "ms": 300 },
|
|
{ "type": "click", "selector": "details.part-submenu", "hasText": "Primitives", "target": ":scope > summary" },
|
|
{ "type": "wait", "ms": 300 },
|
|
{ "type": "click", "selector": "button[data-command=\"Part_Box\"]" },
|
|
{ "type": "wait", "ms": 1200 },
|
|
{ "type": "click", "selector": ".fc-tree-text", "hasText": "Cube" },
|
|
{ "type": "wait", "ms": 400 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Length\"]", "value": 60 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Width\"]", "value": 40 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Height\"]", "value": 20 },
|
|
{ "type": "click", "role": "button", "name": "应用尺寸并重算", "exact": true },
|
|
{ "type": "wait", "ms": 1500 },
|
|
{ "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true },
|
|
{ "type": "click", "selector": ".fc-tree-text", "hasText": "Cube" },
|
|
{ "type": "wait", "ms": 300 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Object Label\"]", "value": "ManualCube" },
|
|
{ "type": "press", "key": "Enter" },
|
|
{ "type": "wait", "ms": 800 },
|
|
{ "type": "shot", "name": "02-part-box", "fullPage": true },
|
|
{ "type": "click", "role": "button", "name": "Position", "exact": true },
|
|
{ "type": "wait", "ms": 400 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Position X\"]", "value": 10 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Position Y\"]", "value": 20 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Position Z\"]", "value": 30 },
|
|
{ "type": "click", "role": "button", "name": "应用位置与旋转", "exact": true },
|
|
{ "type": "wait", "ms": 1200 },
|
|
{ "type": "click", "role": "button", "name": "Close task / Cancel", "exact": true },
|
|
{ "type": "shot", "name": "03-placement", "fullPage": true },
|
|
{ "type": "click", "selector": ".fc-tree-text", "hasText": "ManualCube" },
|
|
{ "type": "wait", "ms": 300 },
|
|
{ "type": "fill", "selector": "input[aria-label=\"Object Color\"]", "value": "#4a90d9" },
|
|
{ "type": "eval", "script": "document.querySelector('input[aria-label=\"Object Color\"]')?.dispatchEvent(new Event('change', { bubbles: true }))" },
|
|
{ "type": "wait", "ms": 600 },
|
|
{ "type": "shot", "name": "04-properties", "selector": "aside.properties" },
|
|
{ "type": "drag", "selector": "[aria-label=\"Imported native 3D view\"]", "dx": -120, "dy": -40 },
|
|
{ "type": "shot", "name": "05-viewport", "fullPage": true },
|
|
{ "type": "save" },
|
|
{ "type": "wait", "ms": 800 },
|
|
{ "type": "assertVisible", "selector": ".fc-tree-text:has-text(\"ManualCube\")" },
|
|
{ "type": "shot", "name": "06-saved", "fullPage": true },
|
|
{ "type": "shot", "name": "07-summary", "fullPage": true }
|
|
]
|
|
}
|