Skip to main content

Python implementation for Java application UI automation with Java Access Bridge

Project description

Python implementation for Java application UI automation with Java Access Bridge.

The pyjab package enables run UI automation(selenium like) through with Java UI application. Package will invoke Java Access Bridge API to get information form Java application. And this package is only support for Windows(current for x86 version). Sources code referenced from NVDA.

Installation

The pyjab package is available on PyPI which means installation should be as simple as:

$ pip install pyjab

There’s actually a multitude of ways to install Python packages (e.g. the per user site-packages directory, virtual environments or just installing system wide) and I have no intention of getting into that discussion here, so if this intimidates you then read up on your options before returning to these instructions.

Optional dependencies

Access Bridge Explorer is a Windows application that allows exploring, as well as interacting with, the Accessibility tree of any Java applications that uses the Java Access Bridge to expose their accessibility features, for example Android Studio and IntelliJ.

Usage

JRE, JDK or JAB standalone package is required. Need setup environment variable JAVA_HOME or JAB_HOME before usage.

Here’s an example of how easy it is to get started:

import pyjab

# Create a JABDriver object.
jabdriver = JABDriver("java app window title")

# Find a JABElement by element name
login_btn = jabdriver.find_element_by_name("Login")

# Click a JABElement
login_btn.click()

# Some other examples.
jabdriver.find_element_by_xpath("//push button[@name=contains('OK')]")
jabdriver.wait_until_element_exist(by=By.NAME, value="Dashboard")
login_btn.get_screenshot_as_file("./screenshot.png")

Contact

The latest version of pyjab is available on PyPI and GitHub. For bug reports please create an issue on GitHub. If you have questions, suggestions, etc. feel free to send me an e-mail at gaozhao89@qq.com.

License

This software is licensed under the GPLv2 license.

© 2021 Gary Gao.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjab-1.0.3.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyjab-1.0.3-py2.py3-none-any.whl (33.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyjab-1.0.3.tar.gz.

File metadata

  • Download URL: pyjab-1.0.3.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for pyjab-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0e3786cbe67ccd9c53564969f2914950abb79d0e8d75060fc0d2015eabf3f5b6
MD5 5b2449bfee9c23e6c71db995fa3ab5fe
BLAKE2b-256 e425ab57d416c0f9b8db684981e2d8c0d7b44cb2e0713b8927682a10a32107dc

See more details on using hashes here.

File details

Details for the file pyjab-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: pyjab-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for pyjab-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 337814674b49b0e7ef53261055dee9e6f718364a719c4f2811c95a636c58166b
MD5 0da10288ff79686299da8abb0afb7fe8
BLAKE2b-256 d96a1c5987469fdfa2b2d2ca31a399806c81987e7326ec7f218c17b12f7980ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page