Skip to main content

PyBEN Utilities repository

Project description

pybenutils

PyBEN Utilities repository, Contains a variety of useful methods and classes designed to allow easy access to high level operations

Installation

python -m pip install pybenutils -U python3 -m pip install pybenutils -U

AutoGUI module

PyBenAutoGui - Class to automate cross platform GUI interactions.

options:
  -h, --help            show this help message and exit
  -t TITLE, --title TITLE
                        Window title
  -a APP_PATH, --app_path APP_PATH
                        Application/Exe path
  -b PYWINAUTO_BACKEND, --pywinauto_backend PYWINAUTO_BACKEND
                        A name of used back-end in Windows OS (values: "win32", "uia")
  -c COMMAND, --command COMMAND
                        Function name to execute in the AutoGui Class

python -m pybenutils.autogui -t "Calculator" -a calc.exe -c get_object_details -b uia

python3 -m pybenutils.autogui -t "Calculator" -a /Application/Calculator.app -c get_object_details

class AutoGui(builtins.object)
 |  AutoGui(title, app_path, pywinauto_backend='uia')
 |  
 |  Methods defined here:
 |  
 |  __init__(self, title, app_path, pywinauto_backend='uia')
 |      Unified interface to interact with Gui Elements
 |      
 |      :param title: Window title
 |      :param app_path: Application/Exe path
 |      :param pywinauto_backend: A name of used back-end in Windows OS (values: "win32", "uia")
 |  
 |  click_on_text(self, text: str)
 |      Clicks on text object location using pyautogui
 |  
 |  find_objects(self, text='', control_type='')
 |      Returns an iterable containing the matching object
 |      
 |      :param text: Text to search, In windows can also be the automation_id
 |      :param control_type: Filter by control type
 |      :return: An iterable containing the matching object
 |  
 |  focus_on_window(self)
 |      Focus on the app window - bring to front
 |  
 |  get_object_details(self, text='', control_type='')
 |      Returns an iterable containing dicts of matching objects properties
 |      
 |      :param text: Text to search, In windows can also be the automation_id
 |      :param control_type: Filter by control type
 |      :return: An iterable containing dicts of matching objects properties
 |  
 |  get_object_position_by_text(self, text)
 |      Return position as tuple (xl, yt, xr, yb) in windows / (x, y) in mac

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

pybenutils-3.1.0.tar.gz (41.6 kB view hashes)

Uploaded Source

Supported by

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