Skip to main content

wgc-client

WGC Client package for the QA framework. Provides WGCClient — the main class for interacting with Wargaming Game Center through WebSocket, JavaScript injection, and Win32 API.

Architecture

WGCClient
├── Process Management (Win32 API)
│   ├── start_wgc() / stop_wgc()
│   ├── Process monitoring (crash detection)
│   └── Window handle management
│
├── WebSocket Communication
│   ├── /websocket/wgc          — main UI channel
│   ├── /websocket/overlay      — overlay channel
│   ├── /websocket/game-overlay — in-game overlay
│   └── /websocket/news         — news feed
│
├── UI Elements
│   ├── WebElement  — CSS selectors via JS injection
│   └── NativeElement — Win32 Accessibility API
│
└── UI Maps (34 .ini files)
    ├── common.ini, arsenalcommon.ini
    ├── arsenallogin.ini, arsenalshop.ini
    └── ... (page-specific element maps)

Usage

from wgc_client import WGCClient

# Initialize and start WGC
client = WGCClient()
client.run_game_center()

# Get UI elements
login_btn = client.get_wgc_element('button_login')
login_btn.click()

# Web elements (CSS selectors via WebSocket)
email_field = client.get_wgc_element('input_email')
email_field.set_text('user@test.com')
email_field.react_set_text('user@test.com')  # React-specific

# Native elements (Win32 API)
dialog = client.get_native_element('install_dialog')
dialog.click()

# Element properties
text = login_btn.get_text()
visible = login_btn.is_element_displayed
attrs = login_btn.get_attribute('class')

UI Element Types

WebElement

Interacts with Chromium UI via JavaScript injection over WebSocket:

  • click(), react_click() — click via JS dispatchEvent
  • set_text(), react_set_text() — input via nativeInputValueSetter
  • get_text() — read innerText
  • get_attribute() — read DOM attributes
  • is_element_displayed — visibility check via offsetParent

NativeElement

Interacts with native Windows UI via Win32 Accessibility API:

  • click() — mouse_event at element coordinates
  • get_text() — read acc_value via UISoup
  • set_text() — set_value via UISoup
  • For native dialogs, file pickers, OS-level windows

UI Maps

Element selectors are defined in .ini files:

[common]
button_login = .login-button
input_email = input[name="email"]
game_list = .game-list-container

Parsed by UIMapParser and accessed via client.get_wgc_element('button_login').

Install

pip install wgc-client

Dependencies

  • wgc-core, wgc-helpers, wgc-mocks, wgc-clippy
  • websocket-client — WebSocket communication
  • pywin32 — Win32 API
  • uisoup, uiautomation — Windows UI automation
  • ui-map-parser — INI-based UI map parsing

Metadata

Release files for wgc-client 4.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wgc-client 4.0.1
File Size Uploaded
wgc_client-4.0.1.tar.gz 65.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wgc-client 4.0.1
File Interpreter ABI Platform
wgc_client-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 142.5 kB

Release files / wgc_client-4.0.1.tar.gz

Download URL wgc_client-4.0.1.tar.gz
Size 65.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c3437e2a2768baee358fdacafb2e43112060a63aa69ce7fe7c277f6ee19b3029
BLAKE2b-256 checksum
How to use checksums
189655b069337c8b2026653fefdfefc9c1c5dd978629eb10e7be0484212205e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / wgc_client-4.0.1-py3-none-any.whl

Download URL wgc_client-4.0.1-py3-none-any.whl
Size 77.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
882569d8bab52123427bdca5e5fbdd2da1399593a9bad64ea01090331b26a63b
BLAKE2b-256 checksum
How to use checksums
0816a740f9170b9d2d615b3bf9bd7d815472b9433b5bc8ec734232f4a00ac10d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

4.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page