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
Metadata
Release files for pyjt 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyjt-0.6.0.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyjt-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / pyjt-0.6.0.tar.gz
| Download URL | pyjt-0.6.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
988d6b173a843702281e4988f6e2cb3ee96a8a05ebfa9e557c64fabbf78a5aa2
|
|
BLAKE2b-256 checksum How to use checksums |
b8effe177db65e3242e95d5d6fb3f6914cb14eb2cdce3b97a13bada6786af508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pyjt-0.6.0-py3-none-any.whl
| Download URL | pyjt-0.6.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e775a6ae509df649a16e753bd045350541cb41c97fa970ca39c3747d98209f79
|
|
BLAKE2b-256 checksum How to use checksums |
e02f132ed5ef8913fc02817422dbc03693f1b3122caa1a4269c024707c382489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pyjt 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.