From 209afc9b124b3c42579bc6e580093512f0f93fcb 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:21:13 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20wait=5Ffor=5Felement=20target=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=88=98=EC=A0=95=20+=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EA=B0=90=EC=A7=80=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow-inventory-cycle.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow-inventory-cycle.json b/workflow-inventory-cycle.json index 32c6efe..27095c7 100644 --- a/workflow-inventory-cycle.json +++ b/workflow-inventory-cycle.json @@ -25,14 +25,14 @@ "id": 2, "name": "[생산 > 품목관리] 페이지 로드 확인", "action": "wait_for_element", - "selector": "text=품목기준관리", + "target": "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 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);})()", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CAPTURE_ITEM'};await w(1500);const pageText=document.body.innerText||'';const hasTitle=pageText.includes('품목기준관리');R.pageLoaded=hasTitle;const categories=['소모품','원자재','부자재','부품','제품'];const found=categories.filter(c=>pageText.includes(c+' 등록'));R.foundCategories=found;if(found.length===0){R.warn='품목 카테고리 없음';R.ok=true;return JSON.stringify(R);}const name=found[0]+' 등록';R.itemName=name;if(!window.__WORKFLOW_CTX__)window.__WORKFLOW_CTX__={};window.__WORKFLOW_CTX__.itemName=found[0];R.ok=true;R.info='캡처: '+name+' ('+found.length+'개 카테고리)';return JSON.stringify(R);})()", "phase": "CAPTURE_ITEM" }, {