Skip to main content

WVD/Citrix Remote Desktop Automation using Computer Vision

Project description

Visual Sonar 🔊

Python 3.8+ License: MIT Version OCR Tests

Automate WVD/Citrix remote desktop sessions using Computer Vision — no DOM access, no server agents, no licensing fees.

Visual Sonar "echolocates" form fields by pressing TAB and detecting visual focus changes. Works where Selenium and traditional RPA tools can't.


✨ Features

Feature Description
🎯 Visual Field Detection Detects fields by screen diff when focus changes
📊 Data-Driven Testing Run same test with multiple data sets (CSV/JSON)
🔍 OCR Text Extraction Extract text from screen (pytesseract/easyocr)
🖥️ WVD Simulator Test safely without real remote desktop
🔒 Secrets Scrubbing Passwords never appear in logs
📸 Step Screenshots Every action captured for debugging
DPI Aware Per-monitor scaling support

🚀 Quick Start

Option A: Install from PyPI (Recommended)

pip install visual-sonar

Then use:

visual-sonar map
visual-sonar run
visual-sonar --help

Option B: Install from Source

git clone https://github.com/godhiraj-code/wvdautomation.git
cd wvdautomation
pip install -e .

2. Map Your Form

python visual_sonar.py map

Name fields as name:type (types: text, click, toggle, dropdown, double_click)

3. Create Input

{
    "username": "jdoe@company.com",
    "password": "SecretPass123",
    "signin": true
}

4. Run

python visual_sonar.py run

📋 Commands

Command Description
map Interactive field mapping
run [file.json] Execute automation
list Show available test cases
batch <data.csv> Data-driven batch testing
extract screen OCR extract from full screen
extract region x y w h OCR extract from region
help Show full help

🧪 Testing Without Remote Desktop

Use the built-in simulator:

# Terminal 1 - Start simulator
python wvd_simulator.py

# Terminal 2 - Map and run
python visual_sonar.py map
python visual_sonar.py run

📊 Data-Driven Testing

Run same test with multiple credentials:

Create test_cases/users.csv:

username,password,signin
user1@co.com,pass1,true
user2@co.com,pass2,true

Run batch:

python visual_sonar.py batch test_cases/users.csv

🔍 OCR Text Extraction

# Full screen
python visual_sonar.py extract screen

# Specific region
python visual_sonar.py extract region 100 200 300 50

# Verify text exists (for assertions)
python visual_sonar.py extract verify 100 200 300 50 "Success"

Note: Requires pip install pytesseract + Tesseract-OCR


🛡️ Safety

  • Emergency Stop: Move mouse to TOP-LEFT corner
  • FailSafe: Always enabled by default
  • Secrets: Never logged, always scrubbed
  • Screenshots: Captured on every step

📁 Files

File Purpose Git
wvd_map.json Field coordinates
input.json Your secrets
test_cases/ Test data files
*.png Debug screenshots

🔧 Troubleshooting

Issue Solution
"No map file" Run python visual_sonar.py map first
"Screen Unstable" WVD connection laggy, wait and retry
Wrong coordinates Remap (resolution/DPI may have changed)
OCR not working Install Tesseract-OCR software

📖 Documentation


📜 License

MIT © Visual Sonar Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visual_sonar-1.0.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

visual_sonar-1.0.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file visual_sonar-1.0.0.tar.gz.

File metadata

  • Download URL: visual_sonar-1.0.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for visual_sonar-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1407389c360e6bb0072542829e42e351c098bd6db5165393e6be7becd6777482
MD5 b77f1d14ddd04945773639d55e351d6d
BLAKE2b-256 b4669a38efdc5e0c3759f1e3d1aab83375d69e78bb7aeff429a7797663adc62c

See more details on using hashes here.

Provenance

The following attestation bundles were made for visual_sonar-1.0.0.tar.gz:

Publisher: publish.yml on godhiraj-code/wvdautomation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file visual_sonar-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: visual_sonar-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for visual_sonar-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47f1e259dc0ca3e3c8ab43a346de1be5ce23b31dd8ca57b505bbe9dcbbf21daa
MD5 bae4a21ab0fea0aa89bf1d0bb4ce51bb
BLAKE2b-256 1445bd6c81cfd4215b7a4262aa62470ccc0ac876272db00a2ece28078fec58a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for visual_sonar-1.0.0-py3-none-any.whl:

Publisher: publish.yml on godhiraj-code/wvdautomation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page