wgc-helpers 4.0.2
Helper modules for WGC QA framework: OS, WinAPI, registry, WGC settings, fake games, etc.
Requires Python: >=3.7

# wgc-helpers

Helper modules for the WGC QA framework. Contains all OS-level, WGC-specific, game management, and diagnostic utilities.

## Module Categories

### Base OS Helpers

| Module | Description |
|---|---|
| `os_helper` | File system operations: copy, delete, hash, permissions, process management |
| `winapi_helper` | Win32 API: window management, DPI, monitors, mouse/keyboard |
| `registry` | Windows Registry: read/write keys and values |
| `waiter` | Polling/wait utilities with configurable timeout and interval |
| `requirements_helper` | Version comparison and requirement validation |
| `regex_helper` | Regex matching with assertion support |
| `encrypt_helper` | AES encryption/decryption for tokens |
| `network_helper` | Network operations: ping, port check, download |
| `sevenzip` | 7-Zip wrapper for archive operations |
| `soft_assert` | Soft assertions — collect all failures without stopping |
| `ui_map_parser` | Parse `.ini` UI map files into element selectors |
| `file_owner` | Windows file ownership and ACL management |
| `mutex_killer` | Kill mutexes to allow parallel WGC instances |
| `localization_helper` | WGC localization file parsing |

### WGC-Specific Helpers

| Module | Description |
|---|---|
| `wgc_settings` | Manage WGC XML configs: `preferences.xml`, `game_info.xml`, `wgc_info.xml` |
| `wgc_installer/` | Install WGC from build artifacts |
| `wgc_uninstaller/` | Uninstall WGC cleanly |
| `wgc_plugins` | WGC plugin management |
| `wgc_api/` | WGC API helper (DLL-based) |
| `wgc_api_csharp/` | WGC API helper (C# exe-based) |
| `response_builder` | Generate XML responses for mock Update Service |

### Game Management Helpers

| Module | Description |
|---|---|
| `fake_games` | Create complete fake game installations (WOT, WOWS, WOWP) with registry, torrents, metadata |
| `steam_helper` | Steam client management: launch, login, VDF manipulation |
| `acf_helper` | Steam ACF file parser |
| `vdf_helper` | Valve Data Format (VDF) read/write |
| `torrents_helper` | Generate `.torrent` files for game patches |
| `package_helper` | Game patch packaging with 7z + torrents |
| `metadata_helper` | Game metadata protocol management |
| `testdata_helper` | Download and prepare test data from shared drive |

### Browser & Network Helpers

| Module | Description |
|---|---|
| `browser_helper` | Chrome browser management for OAuth testing |
| `certificate` | SSL certificate installation for mock HTTPS |
| `firewall_helper` | Windows Firewall rule management |

### Diagnostics Helpers

| Module | Description |
|---|---|
| `artifacts_helper` | Collect and upload test artifacts (logs, screenshots, videos) |
| `video_capture` | Screen recording via OpenCV during test execution |
| `screen_helper` | Screenshot capture |
| `dump_helper` | Memory dump creation on crashes |
| `dbgdiag_helper` | Debug diagnostics with cdb/windbg |
| `sys_internals` | Sysinternals tools wrapper (procmon, pslist) |
| `img_to_text` | OCR via Tesseract for reading text from screenshots |
| `black_screen_detector` | Detect black screen during WGC startup |
| `event_helper` | ETW (Event Tracing for Windows) log capture |

## Usage

```python
from wgc_helpers.os_helper import OSHelper
from wgc_helpers.wgc_settings import WGCSettingsHelper
from wgc_helpers.fake_games import FakeGamesHelper

# File operations
OSHelper.create_file('test.txt', 'content')
sha256 = OSHelper.get_file_sha256('file.bin')

# WGC configuration
WGCSettingsHelper.set_preference('language', 'en')
WGCSettingsHelper.create_wgc_info(protocol='1.58')

# Create fake game installation
FakeGamesHelper.install_fake_game('WOT', version='1.0')
```

## Install

```bash
pip install wgc-helpers
```

## Dependencies

- `wgc-core` — config, logger, exceptions
- `wgc-clippy` — low-level utilities
- `wgc-third-party` — binary tools (7z, procdump, etc.)
- `pywin32`, `psutil`, `opencv-python`, `pillow`, `lxml`, `pycryptodome`, `bencodepy`