vamp-mcp 0.1.9 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +142 -107
- package/THIRD_PARTY_NOTICES.md +32 -27
- package/bin/vamp-mcp.mjs +37 -37
- package/notices/mcp-virtualbox-LICENSE +21 -21
- package/notices/mcp-virtualbox-PROVENANCE.json +37 -37
- package/package.json +51 -17
- package/runtime/backends/common/Test-Environment.ps1 +7 -6
- package/runtime/backends/common/guest-install.json +58 -0
- package/runtime/backends/common/guest_install.py +57 -0
- package/runtime/backends/common/host-support.cjs +16 -0
- package/runtime/backends/common/packer.cjs +16 -0
- package/runtime/backends/hyperv/scripts/Manage-Desktop.ps1 +40 -67
- package/runtime/backends/hyperv/scripts/Send-InstallerBoot.ps1 +25 -0
- package/runtime/backends/kvm/debian-preseed.cfg +35 -35
- package/runtime/backends/library/registry.py +77 -77
- package/runtime/backends/library/replay.py +154 -154
- package/runtime/backends/packer/answer_media.py +16 -0
- package/runtime/backends/packer/deploy-hyperv.ps1 +10 -0
- package/runtime/backends/packer/drivers.py +49 -0
- package/runtime/backends/packer/hyperv-network.ps1 +10 -0
- package/runtime/backends/packer/images.py +75 -0
- package/runtime/backends/packer/osinfo.py +113 -0
- package/runtime/backends/packer/policy.json +15 -0
- package/runtime/backends/packer/runner.py +224 -0
- package/runtime/backends/packer/templates.py +118 -0
- package/runtime/backends/packer/toolchain.py +80 -0
- package/runtime/backends/remote_ssh/server.mjs +321 -94
- package/runtime/backends/virtualbox/desktop.cjs +37 -0
- package/runtime/backends/virtualbox/display.py +101 -101
- package/runtime/backends/virtualbox/history.py +139 -139
- package/runtime/backends/virtualbox/mouse_click.py +15 -15
- package/runtime/backends/virtualbox/mouse_move.py +18 -18
- package/runtime/backends/virtualbox/profiles.json +46 -46
- package/runtime/backends/virtualbox/provision.py +238 -184
- package/runtime/backends/virtualbox/recording_listener.py +29 -29
- package/runtime/backends/virtualbox/recordings.py +39 -39
- package/runtime/backends/virtualbox/requirements.txt +7 -7
- package/runtime/backends/virtualbox/rpas/debian_first_boot/manifest.json +1 -1
- package/runtime/backends/virtualbox/rpas/debian_first_boot/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/debian_first_boot/workflow.py +75 -75
- package/runtime/backends/virtualbox/rpas/observe/manifest.json +7 -7
- package/runtime/backends/virtualbox/rpas/observe/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/observe/workflow.py +14 -14
- package/runtime/backends/virtualbox/server.mjs +440 -63
- package/runtime/backends/virtualbox/setup_windows_sdk.py +58 -58
- package/runtime/backends/virtualbox/shares.py +68 -68
- package/runtime/backends/virtualbox/snapshots.py +53 -53
- package/runtime/backends/virtualbox/transfers.py +89 -89
- package/runtime/backends/virtualbox/vnc.py +61 -61
- package/runtime/guest_keys.py +13 -13
- package/runtime/guest_setup/http/debian-preseed.cfg +39 -0
- package/runtime/guest_setup/http/postdeb.sh +94 -0
- package/runtime/guest_setup/http/postwin.ps1 +53 -0
- package/runtime/guest_setup/http/setup-all.ps1 +25 -0
- package/runtime/guest_setup/http/setup-win.cmd +7 -0
- package/runtime/guest_setup/http/setup.ps1 +44 -0
- package/runtime/guest_setup/http/setup.sh +50 -0
- package/runtime/guest_setup/kvm/setup-debian.sh +73 -0
- package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -0
- package/runtime/guest_setup/recorder/README.txt +12 -8
- package/runtime/guest_setup/recorder/RECORDER-LICENSE +674 -674
- package/runtime/guest_setup/recorder/RECORDING-GUIDE.txt +31 -31
- package/runtime/guest_setup/recorder/apply-display.py +41 -41
- package/runtime/guest_setup/recorder/configure-debian-mirrors.py +62 -62
- package/runtime/guest_setup/recorder/configure-gdm.py +23 -0
- package/runtime/guest_setup/recorder/configure-session.ps1 +14 -0
- package/runtime/guest_setup/recorder/gnome-display.py +60 -60
- package/runtime/guest_setup/recorder/install-display-startup.py +66 -39
- package/runtime/guest_setup/recorder/install-hypervisor-drivers.ps1 +34 -0
- package/runtime/guest_setup/recorder/install-resolution-shortcut.ps1 +36 -0
- package/runtime/guest_setup/recorder/postwin.cmd +10 -10
- package/runtime/guest_setup/recorder/prepare-recording.py +30 -30
- package/runtime/guest_setup/recorder/recorder.zip +0 -0
- package/runtime/guest_setup/recorder/requirements-recorder.txt +2 -2
- package/runtime/guest_setup/recorder/session-policy.py +22 -0
- package/runtime/guest_setup/recorder/setup-user.py +53 -35
- package/runtime/guest_setup/recorder/setup-win.cmd +4 -11
- package/runtime/guest_setup/recorder/setup.ps1 +108 -30
- package/runtime/guest_setup/recorder/setup.sh +19 -1
- package/runtime/guest_setup/recorder/vamp-recorder.py +148 -148
- package/runtime/guest_setup/recorder/verify-recorder.py +4 -4
- package/runtime/guest_setup/recorder/windows-display.py +76 -76
- package/runtime/guest_setup/requirements.txt +2 -0
- package/runtime/guest_setup/setup-all.ps1 +35 -0
- package/runtime/guest_setup/setup-all.sh +22 -0
- package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -0
- package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -0
- package/runtime/guest_setup/vault/setup-guest-vault.sh +75 -0
- package/runtime/recording_converter.py +230 -230
- package/runtime/requirements-mcp.txt +11 -11
- package/runtime/rpas/README.md +161 -161
- package/runtime/rpas/captcha_handoff/manifest.json +27 -27
- package/runtime/rpas/captcha_handoff/run.robot +16 -16
- package/runtime/rpas/captcha_handoff/workflow.py +11 -11
- package/runtime/rpas/common.resource +26 -26
- package/runtime/rpas/debian_update/manifest.json +27 -27
- package/runtime/rpas/debian_update/run.robot +17 -17
- package/runtime/rpas/debian_update/workflow.py +13 -13
- package/runtime/rpas/desktop_control/manifest.json +26 -26
- package/runtime/rpas/desktop_control/run.robot +27 -27
- package/runtime/rpas/desktop_control/workflow.py +51 -51
- package/runtime/rpas/firefox_launch/manifest.json +27 -27
- package/runtime/rpas/firefox_launch/run.robot +15 -15
- package/runtime/rpas/firefox_launch/workflow.py +25 -25
- package/runtime/rpas/firefox_naver/manifest.json +27 -27
- package/runtime/rpas/firefox_naver/run.robot +21 -21
- package/runtime/rpas/firefox_naver/workflow.py +28 -28
- package/runtime/rpas/kvm_validation/README.md +11 -11
- package/runtime/rpas/kvm_validation/manifest.json +28 -28
- package/runtime/rpas/kvm_validation/run.robot +30 -30
- package/runtime/rpas/kvm_validation/workflow.py +91 -91
- package/runtime/rpas/manifest.schema.json +105 -105
- package/runtime/rpas/naver_login/login.robot +25 -25
- package/runtime/rpas/naver_login/manifest.json +33 -33
- package/runtime/rpas/naver_login/run.robot +20 -20
- package/runtime/rpas/naver_login/workflow.py +32 -32
- package/runtime/rpas/windows_naver_recorded/README.md +24 -24
- package/runtime/rpas/windows_naver_recorded/conversion.json +25 -25
- package/runtime/rpas/windows_naver_recorded/manifest.json +28 -28
- package/runtime/rpas/windows_naver_recorded/run.robot +37 -37
- package/runtime/rpas/windows_naver_recorded/workflow.py +32 -32
- package/runtime/scripts/build_recorder_media.py +39 -39
- package/runtime/scripts/macos/setup-host.sh +126 -0
- package/runtime/scripts/remote_host_setup.sh +7 -4
- package/runtime/scripts/script_server.py +571 -0
- package/runtime/skills/vamp-rpa-ui-checks/SKILL.md +26 -0
- package/runtime/skills/vamp-rpa-ui-checks/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/display.md +12 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/user-guide.md +49 -0
- package/runtime/skills/vamp-ui-cleanup/SKILL.md +15 -0
- package/runtime/skills/vamp-ui-cleanup/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-ui-validation/SKILL.md +27 -0
- package/runtime/skills/vamp-ui-validation/agents/openai.yaml +4 -0
- package/runtime/third_party/mcp-virtualbox/scripts/mouse_click.py +65 -65
- package/runtime/third_party/pyautogui-recorder/LICENSE +674 -674
- package/runtime/third_party/pyautogui-recorder/PROVENANCE.json +16 -16
- package/runtime/third_party/pyautogui-recorder/PyAutoGuiRecorder.py +169 -169
- package/runtime/third_party/pyautogui-recorder/README.md +53 -53
- package/runtime/scripts/build_debian_installer.py +0 -48
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": 1,
|
|
3
|
-
"id": "desktop_control",
|
|
4
|
-
"name": "게스트 화면과 입력 제어",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"default_entrypoint": "run",
|
|
7
|
-
"entrypoints": [
|
|
8
|
-
{
|
|
9
|
-
"name": "run",
|
|
10
|
-
"file": "run.robot",
|
|
11
|
-
"credentials": "none"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"python_libraries": [
|
|
15
|
-
"workflow.py"
|
|
16
|
-
],
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"spice"
|
|
19
|
-
],
|
|
20
|
-
"skill": "spice-vm-rpa",
|
|
21
|
-
"outputs": {
|
|
22
|
-
"summary": "${OUTPUT DIR}/summary.json",
|
|
23
|
-
"robot_log": "${OUTPUT DIR}/log.html",
|
|
24
|
-
"robot_report": "${OUTPUT DIR}/report.html"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": 1,
|
|
3
|
+
"id": "desktop_control",
|
|
4
|
+
"name": "게스트 화면과 입력 제어",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"default_entrypoint": "run",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "run",
|
|
10
|
+
"file": "run.robot",
|
|
11
|
+
"credentials": "none"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"python_libraries": [
|
|
15
|
+
"workflow.py"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": [
|
|
18
|
+
"spice"
|
|
19
|
+
],
|
|
20
|
+
"skill": "spice-vm-rpa",
|
|
21
|
+
"outputs": {
|
|
22
|
+
"summary": "${OUTPUT DIR}/summary.json",
|
|
23
|
+
"robot_log": "${OUTPUT DIR}/log.html",
|
|
24
|
+
"robot_report": "${OUTPUT DIR}/report.html"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} desktop_control
|
|
10
|
-
${ACTION} capture
|
|
11
|
-
${TEXT} ${EMPTY}
|
|
12
|
-
${X} 0
|
|
13
|
-
${Y} 0
|
|
14
|
-
${DX} 0
|
|
15
|
-
${DY} 0
|
|
16
|
-
${KEYS} ${EMPTY}
|
|
17
|
-
${TEMPLATE} ${EMPTY}
|
|
18
|
-
${LANGUAGES} ko,en,ja,zh
|
|
19
|
-
${DEVICE} auto
|
|
20
|
-
|
|
21
|
-
*** Tasks ***
|
|
22
|
-
Run One Desktop Action
|
|
23
|
-
${result}= Workflow.Perform Desktop Action
|
|
24
|
-
... action=${ACTION} text=${TEXT} x=${X} y=${Y}
|
|
25
|
-
... keys=${KEYS} template=${TEMPLATE}
|
|
26
|
-
... languages=${LANGUAGES} device=${DEVICE} dx=${DX} dy=${DY}
|
|
27
|
-
Contract.Publish Result ${result}
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} desktop_control
|
|
10
|
+
${ACTION} capture
|
|
11
|
+
${TEXT} ${EMPTY}
|
|
12
|
+
${X} 0
|
|
13
|
+
${Y} 0
|
|
14
|
+
${DX} 0
|
|
15
|
+
${DY} 0
|
|
16
|
+
${KEYS} ${EMPTY}
|
|
17
|
+
${TEMPLATE} ${EMPTY}
|
|
18
|
+
${LANGUAGES} ko,en,ja,zh
|
|
19
|
+
${DEVICE} auto
|
|
20
|
+
|
|
21
|
+
*** Tasks ***
|
|
22
|
+
Run One Desktop Action
|
|
23
|
+
${result}= Workflow.Perform Desktop Action
|
|
24
|
+
... action=${ACTION} text=${TEXT} x=${X} y=${Y}
|
|
25
|
+
... keys=${KEYS} template=${TEMPLATE}
|
|
26
|
+
... languages=${LANGUAGES} device=${DEVICE} dx=${DX} dy=${DY}
|
|
27
|
+
Contract.Publish Result ${result}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"""Configurable low-level actions with coordinates and CV handled in Python."""
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from robot.api.deco import keyword,library
|
|
4
|
-
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
-
class Workflow:
|
|
9
|
-
@keyword
|
|
10
|
-
def perform_desktop_action(self,action='capture',text='',x=0,y=0,keys='',template='',
|
|
11
|
-
languages='ko,en,ja,zh',device='auto',dx=0,dy=0):
|
|
12
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
13
|
-
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
14
|
-
if action=='capture':
|
|
15
|
-
return {'status':'captured','screenshot':spice.capture_guest_screen(directory/'guest.png')}
|
|
16
|
-
if action=='screen-info':
|
|
17
|
-
return {'status':'observed',**spice.screen_info()}
|
|
18
|
-
if action=='ocr':
|
|
19
|
-
from vision import run_ocr
|
|
20
|
-
path=spice.capture_guest_screen(directory/'guest.png')
|
|
21
|
-
details=directory/'ocr.json'
|
|
22
|
-
lines=run_ocr(spice,path,languages,details)
|
|
23
|
-
return {'status':'observed','verification':'ocr_only','text_count':len(lines),
|
|
24
|
-
'details_path':str(details.resolve())}
|
|
25
|
-
if action=='analyze':
|
|
26
|
-
result=spice.analyze_guest_ui(str(directory/'ui.json'),languages,device)
|
|
27
|
-
return {'status':'analyzed','element_count':len(result['elements']),
|
|
28
|
-
'details_path':str((directory/'ui.json').resolve()),'annotated':result['annotated']}
|
|
29
|
-
if action=='detect':
|
|
30
|
-
result=spice.detect_guest_targets(device=device,output=str(directory/'detections.json'))
|
|
31
|
-
return {'status':'detected','target_count':len(result),'details_path':str((directory/'detections.json').resolve())}
|
|
32
|
-
if action=='click':
|
|
33
|
-
spice.guest_click(x,y)
|
|
34
|
-
elif action=='move':
|
|
35
|
-
spice.guest_move_to(x,y)
|
|
36
|
-
elif action=='move-relative':
|
|
37
|
-
spice.guest_move_relative(dx,dy)
|
|
38
|
-
elif action=='hotkey':
|
|
39
|
-
spice.guest_hotkey(*keys.split('+'))
|
|
40
|
-
elif action=='write':
|
|
41
|
-
spice.guest_write(text)
|
|
42
|
-
elif action=='click-text':
|
|
43
|
-
spice.click_guest_text(text,languages,device)
|
|
44
|
-
elif action=='click-image':
|
|
45
|
-
spice.click_guest_image(template)
|
|
46
|
-
elif action=='find-image':
|
|
47
|
-
return {'status':'found','box':spice.find_guest_image(template)}
|
|
48
|
-
else:
|
|
49
|
-
raise ValueError(f'Unknown desktop action: {action}')
|
|
50
|
-
# Input dispatch is not proof that the application reached a desired state.
|
|
51
|
-
return {'status':'executed','action':action}
|
|
1
|
+
"""Configurable low-level actions with coordinates and CV handled in Python."""
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from robot.api.deco import keyword,library
|
|
4
|
+
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
+
class Workflow:
|
|
9
|
+
@keyword
|
|
10
|
+
def perform_desktop_action(self,action='capture',text='',x=0,y=0,keys='',template='',
|
|
11
|
+
languages='ko,en,ja,zh',device='auto',dx=0,dy=0):
|
|
12
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
13
|
+
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
14
|
+
if action=='capture':
|
|
15
|
+
return {'status':'captured','screenshot':spice.capture_guest_screen(directory/'guest.png')}
|
|
16
|
+
if action=='screen-info':
|
|
17
|
+
return {'status':'observed',**spice.screen_info()}
|
|
18
|
+
if action=='ocr':
|
|
19
|
+
from vision import run_ocr
|
|
20
|
+
path=spice.capture_guest_screen(directory/'guest.png')
|
|
21
|
+
details=directory/'ocr.json'
|
|
22
|
+
lines=run_ocr(spice,path,languages,details)
|
|
23
|
+
return {'status':'observed','verification':'ocr_only','text_count':len(lines),
|
|
24
|
+
'details_path':str(details.resolve())}
|
|
25
|
+
if action=='analyze':
|
|
26
|
+
result=spice.analyze_guest_ui(str(directory/'ui.json'),languages,device)
|
|
27
|
+
return {'status':'analyzed','element_count':len(result['elements']),
|
|
28
|
+
'details_path':str((directory/'ui.json').resolve()),'annotated':result['annotated']}
|
|
29
|
+
if action=='detect':
|
|
30
|
+
result=spice.detect_guest_targets(device=device,output=str(directory/'detections.json'))
|
|
31
|
+
return {'status':'detected','target_count':len(result),'details_path':str((directory/'detections.json').resolve())}
|
|
32
|
+
if action=='click':
|
|
33
|
+
spice.guest_click(x,y)
|
|
34
|
+
elif action=='move':
|
|
35
|
+
spice.guest_move_to(x,y)
|
|
36
|
+
elif action=='move-relative':
|
|
37
|
+
spice.guest_move_relative(dx,dy)
|
|
38
|
+
elif action=='hotkey':
|
|
39
|
+
spice.guest_hotkey(*keys.split('+'))
|
|
40
|
+
elif action=='write':
|
|
41
|
+
spice.guest_write(text)
|
|
42
|
+
elif action=='click-text':
|
|
43
|
+
spice.click_guest_text(text,languages,device)
|
|
44
|
+
elif action=='click-image':
|
|
45
|
+
spice.click_guest_image(template)
|
|
46
|
+
elif action=='find-image':
|
|
47
|
+
return {'status':'found','box':spice.find_guest_image(template)}
|
|
48
|
+
else:
|
|
49
|
+
raise ValueError(f'Unknown desktop action: {action}')
|
|
50
|
+
# Input dispatch is not proof that the application reached a desired state.
|
|
51
|
+
return {'status':'executed','action':action}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": 1,
|
|
3
|
-
"id": "firefox_launch",
|
|
4
|
-
"name": "Firefox 실행",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"default_entrypoint": "run",
|
|
7
|
-
"entrypoints": [
|
|
8
|
-
{
|
|
9
|
-
"name": "run",
|
|
10
|
-
"file": "run.robot",
|
|
11
|
-
"credentials": "none"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"python_libraries": [
|
|
15
|
-
"workflow.py"
|
|
16
|
-
],
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"spice",
|
|
19
|
-
"paddleocr"
|
|
20
|
-
],
|
|
21
|
-
"skill": "spice-vm-rpa",
|
|
22
|
-
"outputs": {
|
|
23
|
-
"summary": "${OUTPUT DIR}/summary.json",
|
|
24
|
-
"robot_log": "${OUTPUT DIR}/log.html",
|
|
25
|
-
"robot_report": "${OUTPUT DIR}/report.html"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": 1,
|
|
3
|
+
"id": "firefox_launch",
|
|
4
|
+
"name": "Firefox 실행",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"default_entrypoint": "run",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "run",
|
|
10
|
+
"file": "run.robot",
|
|
11
|
+
"credentials": "none"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"python_libraries": [
|
|
15
|
+
"workflow.py"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": [
|
|
18
|
+
"spice",
|
|
19
|
+
"paddleocr"
|
|
20
|
+
],
|
|
21
|
+
"skill": "spice-vm-rpa",
|
|
22
|
+
"outputs": {
|
|
23
|
+
"summary": "${OUTPUT DIR}/summary.json",
|
|
24
|
+
"robot_log": "${OUTPUT DIR}/log.html",
|
|
25
|
+
"robot_report": "${OUTPUT DIR}/report.html"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} firefox_launch
|
|
10
|
-
|
|
11
|
-
*** Tasks ***
|
|
12
|
-
Launch Firefox
|
|
13
|
-
Workflow.Open Firefox
|
|
14
|
-
${result}= Workflow.Verify Firefox
|
|
15
|
-
Contract.Publish Result ${result}
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} firefox_launch
|
|
10
|
+
|
|
11
|
+
*** Tasks ***
|
|
12
|
+
Launch Firefox
|
|
13
|
+
Workflow.Open Firefox
|
|
14
|
+
${result}= Workflow.Verify Firefox
|
|
15
|
+
Contract.Publish Result ${result}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"""Firefox-specific actions; the .robot entrypoint owns execution order."""
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from robot.api.deco import keyword,library
|
|
4
|
-
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
-
class Workflow:
|
|
9
|
-
@keyword
|
|
10
|
-
def open_firefox(self):
|
|
11
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
12
|
-
spice.guest_hotkey('alt','f2'); spice._pump(1)
|
|
13
|
-
spice.guest_write('firefox'); spice.guest_hotkey('enter'); spice._pump(5)
|
|
14
|
-
|
|
15
|
-
@keyword
|
|
16
|
-
def verify_firefox(self):
|
|
17
|
-
from vision import run_ocr
|
|
18
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
19
|
-
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
20
|
-
screen=spice.capture_guest_screen(directory/'firefox.png')
|
|
21
|
-
lines=run_ocr(spice,screen,'en',directory/'firefox.ocr.json')
|
|
22
|
-
if not any('firefox' in line['text'].casefold() and line['confidence']>=.7 for line in lines):
|
|
23
|
-
raise AssertionError('Firefox text not verified; inspect firefox.ocr.json')
|
|
24
|
-
return {'status':'succeeded','verification':'ocr_only','screenshot':screen,
|
|
25
|
-
'details_path':str((directory/'firefox.ocr.json').resolve())}
|
|
1
|
+
"""Firefox-specific actions; the .robot entrypoint owns execution order."""
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from robot.api.deco import keyword,library
|
|
4
|
+
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
+
class Workflow:
|
|
9
|
+
@keyword
|
|
10
|
+
def open_firefox(self):
|
|
11
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
12
|
+
spice.guest_hotkey('alt','f2'); spice._pump(1)
|
|
13
|
+
spice.guest_write('firefox'); spice.guest_hotkey('enter'); spice._pump(5)
|
|
14
|
+
|
|
15
|
+
@keyword
|
|
16
|
+
def verify_firefox(self):
|
|
17
|
+
from vision import run_ocr
|
|
18
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
19
|
+
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
20
|
+
screen=spice.capture_guest_screen(directory/'firefox.png')
|
|
21
|
+
lines=run_ocr(spice,screen,'en',directory/'firefox.ocr.json')
|
|
22
|
+
if not any('firefox' in line['text'].casefold() and line['confidence']>=.7 for line in lines):
|
|
23
|
+
raise AssertionError('Firefox text not verified; inspect firefox.ocr.json')
|
|
24
|
+
return {'status':'succeeded','verification':'ocr_only','screenshot':screen,
|
|
25
|
+
'details_path':str((directory/'firefox.ocr.json').resolve())}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": 1,
|
|
3
|
-
"id": "firefox_naver",
|
|
4
|
-
"name": "Firefox에서 네이버 접속",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"default_entrypoint": "run",
|
|
7
|
-
"entrypoints": [
|
|
8
|
-
{
|
|
9
|
-
"name": "run",
|
|
10
|
-
"file": "run.robot",
|
|
11
|
-
"credentials": "none"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"python_libraries": [
|
|
15
|
-
"workflow.py"
|
|
16
|
-
],
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"spice",
|
|
19
|
-
"paddleocr"
|
|
20
|
-
],
|
|
21
|
-
"skill": "spice-vm-rpa",
|
|
22
|
-
"outputs": {
|
|
23
|
-
"summary": "${OUTPUT DIR}/summary.json",
|
|
24
|
-
"robot_log": "${OUTPUT DIR}/log.html",
|
|
25
|
-
"robot_report": "${OUTPUT DIR}/report.html"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": 1,
|
|
3
|
+
"id": "firefox_naver",
|
|
4
|
+
"name": "Firefox에서 네이버 접속",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"default_entrypoint": "run",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "run",
|
|
10
|
+
"file": "run.robot",
|
|
11
|
+
"credentials": "none"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"python_libraries": [
|
|
15
|
+
"workflow.py"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": [
|
|
18
|
+
"spice",
|
|
19
|
+
"paddleocr"
|
|
20
|
+
],
|
|
21
|
+
"skill": "spice-vm-rpa",
|
|
22
|
+
"outputs": {
|
|
23
|
+
"summary": "${OUTPUT DIR}/summary.json",
|
|
24
|
+
"robot_log": "${OUTPUT DIR}/log.html",
|
|
25
|
+
"robot_report": "${OUTPUT DIR}/report.html"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} firefox_naver
|
|
10
|
-
${NAVER_URL} https://www.naver.com
|
|
11
|
-
|
|
12
|
-
*** Tasks ***
|
|
13
|
-
Open Firefox And Visit Naver
|
|
14
|
-
Spice.Guest Hotkey alt f2
|
|
15
|
-
Sleep 1s
|
|
16
|
-
Spice.Guest Write firefox
|
|
17
|
-
Spice.Guest Hotkey enter
|
|
18
|
-
Sleep 5s
|
|
19
|
-
Workflow.Navigate To Naver ${NAVER_URL}
|
|
20
|
-
${result}= Workflow.Verify Naver
|
|
21
|
-
Contract.Publish Result ${result}
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} firefox_naver
|
|
10
|
+
${NAVER_URL} https://www.naver.com
|
|
11
|
+
|
|
12
|
+
*** Tasks ***
|
|
13
|
+
Open Firefox And Visit Naver
|
|
14
|
+
Spice.Guest Hotkey alt f2
|
|
15
|
+
Sleep 1s
|
|
16
|
+
Spice.Guest Write firefox
|
|
17
|
+
Spice.Guest Hotkey enter
|
|
18
|
+
Sleep 5s
|
|
19
|
+
Workflow.Navigate To Naver ${NAVER_URL}
|
|
20
|
+
${result}= Workflow.Verify Naver
|
|
21
|
+
Contract.Publish Result ${result}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"""Naver navigation and OCR verification, using only SPICE guest input."""
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from robot.api.deco import keyword,library
|
|
4
|
-
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
-
class Workflow:
|
|
9
|
-
@keyword
|
|
10
|
-
def navigate_to_naver(self,url='https://www.naver.com'):
|
|
11
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
12
|
-
spice.guest_hotkey('ctrl','l'); spice.guest_write(url)
|
|
13
|
-
spice.guest_hotkey('enter'); spice._pump(10); spice.guest_hotkey('esc')
|
|
14
|
-
|
|
15
|
-
@keyword
|
|
16
|
-
def verify_naver(self):
|
|
17
|
-
from vision import run_ocr
|
|
18
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
19
|
-
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
20
|
-
screen=spice.capture_guest_screen(directory/'naver.png')
|
|
21
|
-
lines=run_ocr(spice,screen,'en',directory/'naver.ocr.json')
|
|
22
|
-
visible=[line['text'].casefold() for line in lines if line['confidence']>=.7]
|
|
23
|
-
address_ok=any('www.naver.com' in text for text in visible)
|
|
24
|
-
page_ok=any('naver' in text and 'naver.com' not in text for text in visible)
|
|
25
|
-
if not (address_ok and page_ok):
|
|
26
|
-
raise AssertionError('Naver address and page/title text not verified; inspect naver.ocr.json')
|
|
27
|
-
return {'status':'succeeded','verification':'ocr_only','screenshot':screen,
|
|
28
|
-
'details_path':str((directory/'naver.ocr.json').resolve())}
|
|
1
|
+
"""Naver navigation and OCR verification, using only SPICE guest input."""
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from robot.api.deco import keyword,library
|
|
4
|
+
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
+
class Workflow:
|
|
9
|
+
@keyword
|
|
10
|
+
def navigate_to_naver(self,url='https://www.naver.com'):
|
|
11
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
12
|
+
spice.guest_hotkey('ctrl','l'); spice.guest_write(url)
|
|
13
|
+
spice.guest_hotkey('enter'); spice._pump(10); spice.guest_hotkey('esc')
|
|
14
|
+
|
|
15
|
+
@keyword
|
|
16
|
+
def verify_naver(self):
|
|
17
|
+
from vision import run_ocr
|
|
18
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
19
|
+
directory=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
20
|
+
screen=spice.capture_guest_screen(directory/'naver.png')
|
|
21
|
+
lines=run_ocr(spice,screen,'en',directory/'naver.ocr.json')
|
|
22
|
+
visible=[line['text'].casefold() for line in lines if line['confidence']>=.7]
|
|
23
|
+
address_ok=any('www.naver.com' in text for text in visible)
|
|
24
|
+
page_ok=any('naver' in text and 'naver.com' not in text for text in visible)
|
|
25
|
+
if not (address_ok and page_ok):
|
|
26
|
+
raise AssertionError('Naver address and page/title text not verified; inspect naver.ocr.json')
|
|
27
|
+
return {'status':'succeeded','verification':'ocr_only','screenshot':screen,
|
|
28
|
+
'details_path':str((directory/'naver.ocr.json').resolve())}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# kvm_validation
|
|
2
|
-
|
|
3
|
-
Manual RPA template for `debian`.
|
|
4
|
-
|
|
5
|
-
- `run.robot`: sequence, branching and assertions.
|
|
6
|
-
- `workflow.py`: Python SPICE/coordinate/vision behavior.
|
|
7
|
-
- `manifest.json`: package metadata.
|
|
8
|
-
- The default task returns `not_configured` and SKIPs without a VM connection.
|
|
9
|
-
- Launch programs through Alt+F2, not user-specific desktop icons.
|
|
10
|
-
- Implement positive verification before reporting `succeeded`.
|
|
11
|
-
- See [manual/conversion guide](../../docs/RECORDING_CONVERSION.md).
|
|
1
|
+
# kvm_validation
|
|
2
|
+
|
|
3
|
+
Manual RPA template for `debian`.
|
|
4
|
+
|
|
5
|
+
- `run.robot`: sequence, branching and assertions.
|
|
6
|
+
- `workflow.py`: Python SPICE/coordinate/vision behavior.
|
|
7
|
+
- `manifest.json`: package metadata.
|
|
8
|
+
- The default task returns `not_configured` and SKIPs without a VM connection.
|
|
9
|
+
- Launch programs through Alt+F2, not user-specific desktop icons.
|
|
10
|
+
- Implement positive verification before reporting `succeeded`.
|
|
11
|
+
- See [manual/conversion guide](../../docs/RECORDING_CONVERSION.md).
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": 1,
|
|
3
|
-
"id": "kvm_validation",
|
|
4
|
-
"name": "KVM VNC desktop validation",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"default_entrypoint": "run",
|
|
7
|
-
"entrypoints": [
|
|
8
|
-
{
|
|
9
|
-
"name": "run",
|
|
10
|
-
"file": "run.robot",
|
|
11
|
-
"credentials": "none"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"python_libraries": [
|
|
15
|
-
"workflow.py"
|
|
16
|
-
],
|
|
17
|
-
"dependencies": [
|
|
18
|
-
"vnc",
|
|
19
|
-
"ocr",
|
|
20
|
-
"yolo"
|
|
21
|
-
],
|
|
22
|
-
"skill": "spice-vm-rpa",
|
|
23
|
-
"outputs": {
|
|
24
|
-
"summary": "${OUTPUT DIR}/summary.json",
|
|
25
|
-
"robot_log": "${OUTPUT DIR}/log.html",
|
|
26
|
-
"robot_report": "${OUTPUT DIR}/report.html"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": 1,
|
|
3
|
+
"id": "kvm_validation",
|
|
4
|
+
"name": "KVM VNC desktop validation",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"default_entrypoint": "run",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "run",
|
|
10
|
+
"file": "run.robot",
|
|
11
|
+
"credentials": "none"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"python_libraries": [
|
|
15
|
+
"workflow.py"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": [
|
|
18
|
+
"vnc",
|
|
19
|
+
"ocr",
|
|
20
|
+
"yolo"
|
|
21
|
+
],
|
|
22
|
+
"skill": "spice-vm-rpa",
|
|
23
|
+
"outputs": {
|
|
24
|
+
"summary": "${OUTPUT DIR}/summary.json",
|
|
25
|
+
"robot_log": "${OUTPUT DIR}/log.html",
|
|
26
|
+
"robot_report": "${OUTPUT DIR}/report.html"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} kvm_validation
|
|
10
|
-
|
|
11
|
-
*** Tasks ***
|
|
12
|
-
01 Terminal Keyboard
|
|
13
|
-
${result}= Workflow.Terminal Keyboard Scenario
|
|
14
|
-
Contract.Publish Result ${result}
|
|
15
|
-
|
|
16
|
-
02 Local Browser Launch
|
|
17
|
-
${result}= Workflow.Launch Local Browser
|
|
18
|
-
Contract.Publish Result ${result}
|
|
19
|
-
|
|
20
|
-
03 Mouse Click With OCR Verification
|
|
21
|
-
${result}= Workflow.Click Local Button
|
|
22
|
-
Contract.Publish Result ${result}
|
|
23
|
-
|
|
24
|
-
04 Browser Keyboard Input
|
|
25
|
-
${result}= Workflow.Type Into Local Page
|
|
26
|
-
Contract.Publish Result ${result}
|
|
27
|
-
|
|
28
|
-
05 YOLO And OCR Analysis
|
|
29
|
-
${result}= Workflow.Analyze Local Page
|
|
30
|
-
Contract.Publish Result ${result}
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} kvm_validation
|
|
10
|
+
|
|
11
|
+
*** Tasks ***
|
|
12
|
+
01 Terminal Keyboard
|
|
13
|
+
${result}= Workflow.Terminal Keyboard Scenario
|
|
14
|
+
Contract.Publish Result ${result}
|
|
15
|
+
|
|
16
|
+
02 Local Browser Launch
|
|
17
|
+
${result}= Workflow.Launch Local Browser
|
|
18
|
+
Contract.Publish Result ${result}
|
|
19
|
+
|
|
20
|
+
03 Mouse Click With OCR Verification
|
|
21
|
+
${result}= Workflow.Click Local Button
|
|
22
|
+
Contract.Publish Result ${result}
|
|
23
|
+
|
|
24
|
+
04 Browser Keyboard Input
|
|
25
|
+
${result}= Workflow.Type Into Local Page
|
|
26
|
+
Contract.Publish Result ${result}
|
|
27
|
+
|
|
28
|
+
05 YOLO And OCR Analysis
|
|
29
|
+
${result}= Workflow.Analyze Local Page
|
|
30
|
+
Contract.Publish Result ${result}
|