172 lines
3.4 KiB
JSON
172 lines
3.4 KiB
JSON
{
|
|
"schema": "freecad-web-manual/scenario/v1",
|
|
"chapter": "ch03",
|
|
"workflow": "sketch-rectangle",
|
|
"title": "Sketcher 草图、矩形与约束入口",
|
|
"actions": [
|
|
{
|
|
"type": "goto",
|
|
"url": "/project.html?workbench=Part"
|
|
},
|
|
{
|
|
"type": "waitFor",
|
|
"selector": "select[aria-label=\"Workbench\"]"
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 900
|
|
},
|
|
{
|
|
"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": 2000
|
|
},
|
|
{
|
|
"type": "eval",
|
|
"script": "for (const d of document.querySelectorAll('nav[aria-label=\"Application menus\"] details[open]')) d.open = false"
|
|
},
|
|
{
|
|
"type": "eval",
|
|
"script": "const m=document.querySelector('.part-menu'); if(m) m.open=true; for(const d of document.querySelectorAll('details.part-submenu')) d.open=true"
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 300
|
|
},
|
|
{
|
|
"type": "click",
|
|
"selector": "button[data-command=\"Sketcher_NewSketch\"]"
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 1000
|
|
},
|
|
{
|
|
"type": "fill",
|
|
"selector": "fieldset:has-text(\"New Sketch\") input",
|
|
"value": "ManualSketch"
|
|
},
|
|
{
|
|
"type": "select",
|
|
"selector": "fieldset:has-text(\"New Sketch\") select >> nth=1",
|
|
"label": "XY"
|
|
},
|
|
{
|
|
"type": "shot",
|
|
"name": "01-new-sketch",
|
|
"fullPage": true
|
|
},
|
|
{
|
|
"type": "click",
|
|
"selector": "fieldset:has-text(\"New Sketch\") button:has-text(\"OK\")"
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 2600
|
|
},
|
|
{
|
|
"type": "shot",
|
|
"name": "02-sketch-editor",
|
|
"fullPage": true
|
|
},
|
|
{
|
|
"type": "click",
|
|
"role": "button",
|
|
"name": "Rectangle",
|
|
"exact": true
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 400
|
|
},
|
|
{
|
|
"type": "fill",
|
|
"selector": "input[aria-label=\"Point 1 X\"]",
|
|
"value": 0
|
|
},
|
|
{
|
|
"type": "fill",
|
|
"selector": "input[aria-label=\"Point 1 Y\"]",
|
|
"value": 0
|
|
},
|
|
{
|
|
"type": "fill",
|
|
"selector": "input[aria-label=\"Point 2 X\"]",
|
|
"value": 60
|
|
},
|
|
{
|
|
"type": "fill",
|
|
"selector": "input[aria-label=\"Point 2 Y\"]",
|
|
"value": 40
|
|
},
|
|
{
|
|
"type": "click",
|
|
"role": "button",
|
|
"name": "Apply sketch tool",
|
|
"exact": true
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 400
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 1200
|
|
},
|
|
{
|
|
"type": "assertAnyText",
|
|
"selector": "p[role=\"status\"]",
|
|
"contains": "4 geometries"
|
|
},
|
|
{
|
|
"type": "shot",
|
|
"name": "03-rectangle",
|
|
"selector": "fieldset:has-text(\"ManualSketch drawing\")"
|
|
},
|
|
{
|
|
"type": "click",
|
|
"role": "button",
|
|
"name": "Constraint virtual spaces",
|
|
"exact": true
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 900
|
|
},
|
|
{
|
|
"type": "shot",
|
|
"name": "05-constraint-space",
|
|
"selector": "fieldset:has-text(\"ManualSketch drawing\")"
|
|
},
|
|
{
|
|
"type": "click",
|
|
"role": "button",
|
|
"name": "Close sketch",
|
|
"exact": true
|
|
},
|
|
{
|
|
"type": "wait",
|
|
"ms": 900
|
|
},
|
|
{
|
|
"type": "shot",
|
|
"name": "06-closed",
|
|
"fullPage": true
|
|
},
|
|
{
|
|
"type": "save"
|
|
}
|
|
]
|
|
}
|