Desktop resource provides desktop automation capabilities for controlling GUI applications, taking screenshots, and managing windows. Note: Desktop automation requires a template with desktop dependencies installed.
Accessing Desktop Resource
VNC Server
startVnc()
Start VNC server for remote desktop access.
getVncInfo()
Get VNC server information.
Mouse Control
mouseClick()
Click at coordinates.
mouseMove()
Move mouse to coordinates.
mouseDrag()
Drag mouse from one point to another.
mouseScroll()
Scroll at coordinates.
Keyboard Control
keyboardType()
Type text.
keyboardPress()
Press a key.
keyboardCombination()
Press key combination.
Clipboard
getClipboard()
Get clipboard contents.
setClipboard()
Set clipboard contents.
Screenshots
screenshot()
Capture full screen screenshot.
screenshotRegion()
Capture screenshot of specific region.
Screen Recording
startRecording()
Start screen recording.
stopRecording()
Stop screen recording.
Window Management
listWindows()
List all windows.
focusWindow()
Focus a window.
Related
- Sandbox Class - Main sandbox class
- Errors - Error handling

