From 1ecbf88aa853b87970702f5fd1758d9e876c3b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 14 Feb 2026 11:11:23 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=92=88=EB=AA=A9=EA=B4=80=EB=A6=AC=20w?= =?UTF-8?q?ait=5Ffor=5Ftable=20=E2=86=92=20wait=5Ffor=5Felement=20(?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=EC=97=86=EB=8A=94=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20UI=20=ED=8E=98=EC=9D=B4=EC=A7=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow-inventory-cycle.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/workflow-inventory-cycle.json b/workflow-inventory-cycle.json index 54b5118..32c6efe 100644 --- a/workflow-inventory-cycle.json +++ b/workflow-inventory-cycle.json @@ -1,7 +1,7 @@ { "id": "workflow-inventory-cycle", "name": "비즈니스 워크플로우: 품목→입고→재고→출고 흐름", - "version": "1.0.0", + "version": "1.1.0", "category": "workflow", "auth": { "role": "admin" @@ -23,15 +23,16 @@ }, { "id": 2, - "name": "[생산 > 품목관리] wait_for_table", - "action": "wait_for_table", - "timeout": 20000 + "name": "[생산 > 품목관리] 페이지 로드 확인", + "action": "wait_for_element", + "selector": "text=품목기준관리", + "timeout": 10000 }, { "id": 3, "name": "[생산 > 품목관리] CAPTURE_ITEM", "action": "evaluate", - "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CAPTURE_ITEM'};await w(1500);const rows=Array.from(document.querySelectorAll('table tbody tr')).filter(r=>r.offsetParent!==null);R.rowCount=rows.length;if(rows.length===0){R.warn='테이블에 데이터 없음';R.ok=true;return JSON.stringify(R);}const cells=rows[0].querySelectorAll('td');let val='';const indices=[1,2,3];for(const i of indices){ const t=cells[i]?.innerText?.trim(); if(t&&t.length>=2&&t.length<=40&&!/^[\\d,.]+$/.test(t)&&!/^\\d{4}[-/]/.test(t)){val=t;break;}}R.itemName=val;if(!val){R.warn='itemName 추출 실패';R.ok=true;return JSON.stringify(R);}if(!window.__WORKFLOW_CTX__)window.__WORKFLOW_CTX__={};window.__WORKFLOW_CTX__.itemName=val;R.ok=true;R.info='캐처: '+val;return JSON.stringify(R);})()", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CAPTURE_ITEM'};await w(1500);const cards=Array.from(document.querySelectorAll('div')).filter(d=>{const t=d.innerText||'';return t.includes('등록')&&(t.includes('CS')||t.includes('RM')||t.includes('SM')||t.includes('PT')||t.includes('FG'))&&t.length<100;});R.cardCount=cards.length;if(cards.length===0){R.warn='페이지 카드 없음';R.ok=true;return JSON.stringify(R);}const first=cards[0];const lines=first.innerText.trim().split('\\n');const name=lines[0]?.trim()||'';R.itemName=name;if(!window.__WORKFLOW_CTX__)window.__WORKFLOW_CTX__={};window.__WORKFLOW_CTX__.itemName=name;R.ok=true;R.info='캡처: '+name+' (카드 '+cards.length+'개)';return JSON.stringify(R);})()", "phase": "CAPTURE_ITEM" }, {