Write Test Script
The following elements are required to run the Gamium Client
.
- Game executable with
Gamium Engine SDK
- UI to be operated automatically, Object path of Object
- Object path Document Reference
When the executable is ready, you can connect Gamium Client
to a program that contains Gamium Engine
to manipulate the UI, Object.
Install
- TypeScript
- Python
Requirements
- Node.js 16.0.0 or later
- yarn
- TypeScript 4.7.4
gamium package is available on npm. You can also install it through yarn.
yarn install gamium
Connect with Gamium Engine
- TypeScript
- Python
import { GamiumClient, NodeGamiumService } from 'gamium';
const gamiumService = new NodeGamiumService('127.0.0.1', 50061);
await gamiumService.connect();
const gamium = new GamiumClient(gamiumService);
const ui = gamium.ui();
from gamium import *
service = TcpGamiumService("127.0.0.1", 50061)
gamium = GamiumClient(service)
gamium.connect()
ui = gamium.ui()
Click Buton
Locate the Button Object you want to press, then write a script and click it.
- TypeScript
- Python
await ui.click(By.path('Object path'));
ui.click(By.path('Object path'))