WGC Client for QA framework: WGCClient, WebSocket, UI elements, UI maps
Project description
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 dispatchEventset_text(),react_set_text()— input via nativeInputValueSetterget_text()— read innerTextget_attribute()— read DOM attributesis_element_displayed— visibility check via offsetParent
NativeElement
Interacts with native Windows UI via Win32 Accessibility API:
click()— mouse_event at element coordinatesget_text()— read acc_value via UISoupset_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-clippywebsocket-client— WebSocket communicationpywin32— Win32 APIuisoup,uiautomation— Windows UI automationui-map-parser— INI-based UI map parsing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wgc_client-4.0.1.tar.gz.
File metadata
- Download URL: wgc_client-4.0.1.tar.gz
- Upload date:
- Size: 65.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3437e2a2768baee358fdacafb2e43112060a63aa69ce7fe7c277f6ee19b3029
|
|
| MD5 |
56f9edc4f18a7cf1d2b5e2c5420f5aec
|
|
| BLAKE2b-256 |
189655b069337c8b2026653fefdfefc9c1c5dd978629eb10e7be0484212205e8
|
File details
Details for the file wgc_client-4.0.1-py3-none-any.whl.
File metadata
- Download URL: wgc_client-4.0.1-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882569d8bab52123427bdca5e5fbdd2da1399593a9bad64ea01090331b26a63b
|
|
| MD5 |
a1ea467dcb11051cc2c1085ed791eb0b
|
|
| BLAKE2b-256 |
0816a740f9170b9d2d615b3bf9bd7d815472b9433b5bc8ec734232f4a00ac10d
|