test automation for java UI applications from python
Project description
pyjt - test java UI applications from python
pyjt supports you testing java UI applications from python.
Features:
- Thread safe call of java ui components
- Advanced locators to find ui compoments within the component tree
- Simulate real user interactions by mouse and keyboard
This library makes use of jpype as the interface to the java virtual machine. It basicaly consists of helper functions to control the application from a test automation perspective.
Quickstart
-
Install pyjt
pip3 install pyjt
-
Start testing your app
import pyjt pyjt.start() from javax.swing import JButton # start your java application here, in this case, we start # a hello world application located in HelloWorld.java pyjt.start(classpath="myapp/") pyjt.run("HelloWorld") # find the frame window titled "Hello World" frame = pyjt.FrameFinder.find(title="Hello World") # Locate and click a button on the frame frame.locate(JButton, text="Ok").click() # Locate and fill text to an text field frame.find_by_xpath('//JTextField[@name="textfield1"]').fill("John Smith") # Close the frame (application) frame.close()
Further documentation
Check the documentation on rtfd.io
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
pyjt-0.6.0.tar.gz
(12.0 kB
view details)
Built Distribution
pyjt-0.6.0-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file pyjt-0.6.0.tar.gz
.
File metadata
- Download URL: pyjt-0.6.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 988d6b173a843702281e4988f6e2cb3ee96a8a05ebfa9e557c64fabbf78a5aa2 |
|
MD5 | 21ffb3244c968396077f1b4ed09b1384 |
|
BLAKE2b-256 | b8effe177db65e3242e95d5d6fb3f6914cb14eb2cdce3b97a13bada6786af508 |
File details
Details for the file pyjt-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: pyjt-0.6.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e775a6ae509df649a16e753bd045350541cb41c97fa970ca39c3747d98209f79 |
|
MD5 | f757274b881751c2bc1551bd94385337 |
|
BLAKE2b-256 | e02f132ed5ef8913fc02817422dbc03693f1b3122caa1a4269c024707c382489 |