Demonstrate the task once in the browser. The AI observes, reverse-engineers the portal form, verifies each step live, and generates a script that replays the workflow.
Filing a 직접구매 신청 on the DGIST portal — the same clicks every time, only a few values change.
Three installs: the agent, the browser bridge, and the script runtime.
Claude Code — the AI agent that runs in your terminal.
npm install -g @anthropic-ai/claude-code
claude # 첫 실행 시 Anthropic 계정으로 로그인
Node.js가 없다면 먼저 nodejs.org에서 설치하세요 (macOS: brew install node).
Claude in Chrome extension — lets Claude observe and drive your Chrome.
Chrome Web Store에서 "Claude in Chrome" 설치 → 같은 Anthropic 계정으로 로그인 → 확장 설정에서 portal.dgist.ac.kr, auth.dgist.ac.kr 접근 허용.
Python + Playwright — 생성된 스크립트를 실행할 런타임.
pip install playwright
playwright install chromium
Describing a legacy form precisely is harder than just doing the task once — so demonstrate it instead.
alert() 창이 떠 있으면 자동화가 멈추므로 직접 닫고, 문구를 알려주세요
③ 최종 제출(발주·결재) 버튼 클릭.From demonstration to a runnable script.
Log in, file a test request the usual way — header, popups, one item row, attachments, save — then say "시범 끝".
From the finished draft, the AI identified the target screen and found the form inside an iframe with ~170 fields — a classic legacy jQuery/jqGrid page.
Read-only probes mapped every field the demo touched: header inputs, dropdown codes, the item grid's columns, and the file-upload control.
On a fresh form, the AI replayed each step for real — header, both popups, a grid row — before writing any script code. Nothing was submitted.
Verification surfaced problems no spec would mention: a save button that only exists via the portal menu, a popup with a hidden required order, and alert() dialogs that freeze automation.
A standalone Playwright (Python) script plus a small JSON for the values that change. It stops at save — the order button stays human.
Each of these would have silently broken a script written from the demo alone.
The save button doesn't exist if you open the form by URL. The portal menu opens the same URL as a POST with menu-authorization parameters; the script replays that POST.
Popups have a hidden required order. The budget popup's dropdowns must be chosen in sequence (예산과목 → 지출계획 → 계정과목) — each choice populates the next via AJAX.
The item grid is an inline-edit jqGrid.
New rows are live inputs ({rowId}_GD_NM, …), and the total only computes if you fire the same change/blur events a keystroke would.
Native dialogs freeze everything.
While an alert()/confirm() is open, the page is unreachable. The script auto-accepts and logs every dialog.
Detail rows only unlock after the first save. The real order: save the header → add items → attach files → save again.
A script anyone can run — no AI needed at execution time.
pip install playwright && playwright install chromium # once
python dgist_direct_purchase.py request.json
{
"구매명": "연구용 소모품 구매",
"거래처": "쿠팡",
"비고": "연구 수행에 필요한 소모품 구매",
"품목": [
{ "품명": "USB 허브", "모델": "ABC-1234", "단위": "EA", "단가": 35000, "수량": 2 }
],
"첨부파일": ["~/Downloads/명세서.pdf", "~/Downloads/영수증.pdf"]
}
The same recipe applies to any repetitive portal task.
One real demo carries more truth than a page of requirements.
Replay every step in the real browser first — the surprises above were found before the script existed.
Passwords and the final submission stay human. Automation owns everything in between.
Fixed values go in the script; each run needs just a small JSON — what you bought, from whom, and the receipts.