pyuiauto


Namepyuiauto JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/harveyf2801/pyUIauto
SummaryPython UI Automation library, for cross-platform applications, interfacing through the accessibility API
upload_time2023-05-31 12:15:03
maintainerHarvey Fretwell
docs_urlNone
authorHarvey Fretwell
requires_python>=3.9,<4.0
licenseGPL-3.0-only
keywords automation accessibility cross-platform ui desktop pywinauto atomac
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyUIauto

[![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg)
[![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg)
[![PyPi version](https://badgen.net/pypi/v/pyuiauto/)](https://pypi.org/project/pyuiauto/)
[![PyPi license](https://badgen.net/pypi/license/pyuiauto/)](https://pypi.org/project/pyuiauto/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pyuiauto.svg)](https://pypi.python.org/pypi/pyuiauto/)


| Tests       | Status                                                                                                                  |
| :---------- | :---------------------------------------------------------------------------------------------------------------------: |
| Development | ![Development Tests](https://github.com/harveyf2801/pyUIauto/actions/workflows/run_dev_tests.yml/badge.svg?branch=main)       |
| Build       | ![Build Tests](https://github.com/harveyf2801/pyUIauto/actions/workflows/build_wheel.yml/badge.svg?branch=main) |

Python UI Automation library, for cross-platform applications, interfacing through the accessibility API.

## Description

This library / framework takes two popular UI automation libraries and combines their functionality by wrapping them into custom components and creating methods that function in similar ways for both OS. This project was originally designed as part of a QA automation project to perform end-to-end testing on desktop applications.

## Getting Started

### Dependencies

Python Packages:

- pywinauto (Windows / Linux)
- atomacos (MacOS)
- pyautogui

OS Compatibility:

- Windows
- MacOS

( Currently untested on Linux )

## Example

```python
# Import the tools needed
from platform import system
import os
from pyuiauto.application import UIApplication
from pyuiauto.components import UIButton

# Finding the path location of the application
app_paths = {
  "Darwin": "/Applications/Visual Studio Code.app",
  "Windows": os.path.expanduser('~') + "\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
}

if system() in app_paths:
  appPath = app_paths[system()]
else:
  raise NotImplementedError("The current OS is not currently supported: " + system())

# Setting up an application template, launching the app, and connecting to it
app = UIApplication(appName = "Visual Studio Code", appPath = appPath)
app.launchApp()
app.connectApp()

# Finding the window component and searching for elements within this window component
main_window = app.window(title = "Visual Studio Code", timeout = 2)
main_window.findR(title = "Toggle Primary Side Bar (Ctrl+B)", control_type = UIButton).press() '''  press will invoke a button without manually moving the mouse and clicking it 
                                                                                          (a button could be invoked even if it isn't currently visible)  '''
main_window.findR(title = "Open Folder", control_type = UIButton).click() ''' however, click will move the mouse to the button location and click it
                                                                    (sometimes this can be more reliable) '''

# Closing the window and terminating the application
main_window.close()
app.terminateApp()
```

## Authors

ex. Harvey Fretwell

ex. [pyWinAuto](https://github.com/pywinauto/pywinauto/tree/master)

ex. [atomacos](https://github.com/daveenguyen/atomacos)

ex. [pyAutoGUI](https://github.com/asweigart/pyautogui)

## Version History

- 0.1
  - Initial Release
  - 0.1.1
    - Added UISystemTrayIcon and UIPopupMenu manager
  - 0.1.4
    - Fixed some issues with setValue() method on buttons and menus
  - 0.1.5
    - Added context managers for better popup menu handling
  - 0.1.6
    - Added isOnTop method for components
    - Fixed isVisible method for components
    - Added checks for components existing in helper methods
  - 0.1.7
    - Added MacOS compatibility
    - Fixed getValue method for mac on menu items (with a bit of a work around ... hoping to find a better solution soon)
    - Fixed menu path select and system tray popup select methods on mac
  - 0.1.8
    - Fixed progress bar get value method
    - Added better python intellisense for pylance
    - Added further checks for system tray icon
    - Updated application.py
    - Upgraded package versions

## Acknowledgments

- [pyWinAuto](https://github.com/pywinauto/pywinauto/tree/master)
- [atomacos](https://github.com/daveenguyen/atomacos)
- [pyAutoGUI](https://github.com/asweigart/pyautogui)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/harveyf2801/pyUIauto",
    "name": "pyuiauto",
    "maintainer": "Harvey Fretwell",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "hgfretwell@gmail.com",
    "keywords": "automation,accessibility,cross-platform,ui,desktop,pywinauto,atomac",
    "author": "Harvey Fretwell",
    "author_email": "hgfretwell@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1d/ff/65955fcc303213151801a4c0f40571e0e761f422436827ab54886e19e2c9/pyuiauto-0.1.8.tar.gz",
    "platform": null,
    "description": "# pyUIauto\n\n[![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg)\n[![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg)\n[![PyPi version](https://badgen.net/pypi/v/pyuiauto/)](https://pypi.org/project/pyuiauto/)\n[![PyPi license](https://badgen.net/pypi/license/pyuiauto/)](https://pypi.org/project/pyuiauto/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pyuiauto.svg)](https://pypi.python.org/pypi/pyuiauto/)\n\n\n| Tests       | Status                                                                                                                  |\n| :---------- | :---------------------------------------------------------------------------------------------------------------------: |\n| Development | ![Development Tests](https://github.com/harveyf2801/pyUIauto/actions/workflows/run_dev_tests.yml/badge.svg?branch=main)       |\n| Build       | ![Build Tests](https://github.com/harveyf2801/pyUIauto/actions/workflows/build_wheel.yml/badge.svg?branch=main) |\n\nPython UI Automation library, for cross-platform applications, interfacing through the accessibility API.\n\n## Description\n\nThis library / framework takes two popular UI automation libraries and combines their functionality by wrapping them into custom components and creating methods that function in similar ways for both OS. This project was originally designed as part of a QA automation project to perform end-to-end testing on desktop applications.\n\n## Getting Started\n\n### Dependencies\n\nPython Packages:\n\n- pywinauto (Windows / Linux)\n- atomacos (MacOS)\n- pyautogui\n\nOS Compatibility:\n\n- Windows\n- MacOS\n\n( Currently untested on Linux )\n\n## Example\n\n```python\n# Import the tools needed\nfrom platform import system\nimport os\nfrom pyuiauto.application import UIApplication\nfrom pyuiauto.components import UIButton\n\n# Finding the path location of the application\napp_paths = {\n  \"Darwin\": \"/Applications/Visual Studio Code.app\",\n  \"Windows\": os.path.expanduser('~') + \"\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\Code.exe\"\n}\n\nif system() in app_paths:\n  appPath = app_paths[system()]\nelse:\n  raise NotImplementedError(\"The current OS is not currently supported: \" + system())\n\n# Setting up an application template, launching the app, and connecting to it\napp = UIApplication(appName = \"Visual Studio Code\", appPath = appPath)\napp.launchApp()\napp.connectApp()\n\n# Finding the window component and searching for elements within this window component\nmain_window = app.window(title = \"Visual Studio Code\", timeout = 2)\nmain_window.findR(title = \"Toggle Primary Side Bar (Ctrl+B)\", control_type = UIButton).press() '''  press will invoke a button without manually moving the mouse and clicking it \n                                                                                          (a button could be invoked even if it isn't currently visible)  '''\nmain_window.findR(title = \"Open Folder\", control_type = UIButton).click() ''' however, click will move the mouse to the button location and click it\n                                                                    (sometimes this can be more reliable) '''\n\n# Closing the window and terminating the application\nmain_window.close()\napp.terminateApp()\n```\n\n## Authors\n\nex. Harvey Fretwell\n\nex. [pyWinAuto](https://github.com/pywinauto/pywinauto/tree/master)\n\nex. [atomacos](https://github.com/daveenguyen/atomacos)\n\nex. [pyAutoGUI](https://github.com/asweigart/pyautogui)\n\n## Version History\n\n- 0.1\n  - Initial Release\n  - 0.1.1\n    - Added UISystemTrayIcon and UIPopupMenu manager\n  - 0.1.4\n    - Fixed some issues with setValue() method on buttons and menus\n  - 0.1.5\n    - Added context managers for better popup menu handling\n  - 0.1.6\n    - Added isOnTop method for components\n    - Fixed isVisible method for components\n    - Added checks for components existing in helper methods\n  - 0.1.7\n    - Added MacOS compatibility\n    - Fixed getValue method for mac on menu items (with a bit of a work around ... hoping to find a better solution soon)\n    - Fixed menu path select and system tray popup select methods on mac\n  - 0.1.8\n    - Fixed progress bar get value method\n    - Added better python intellisense for pylance\n    - Added further checks for system tray icon\n    - Updated application.py\n    - Upgraded package versions\n\n## Acknowledgments\n\n- [pyWinAuto](https://github.com/pywinauto/pywinauto/tree/master)\n- [atomacos](https://github.com/daveenguyen/atomacos)\n- [pyAutoGUI](https://github.com/asweigart/pyautogui)\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Python UI Automation library, for cross-platform applications, interfacing through the accessibility API",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/harveyf2801/pyUIauto",
        "Repository": "https://github.com/harveyf2801/pyUIauto"
    },
    "split_keywords": [
        "automation",
        "accessibility",
        "cross-platform",
        "ui",
        "desktop",
        "pywinauto",
        "atomac"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2102bcfa23eb272a0123acf6f936369f0d6d8722fd1cf0825ed6072cdc608de8",
                "md5": "ddc8c680e5a79f26192b528b0b113c76",
                "sha256": "0e5f3e6ca0b9db4c4473ae7cfec0778a1bf1f8f8634a38bb4753d09b79209f81"
            },
            "downloads": -1,
            "filename": "pyuiauto-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ddc8c680e5a79f26192b528b0b113c76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 44571,
            "upload_time": "2023-05-31T12:15:00",
            "upload_time_iso_8601": "2023-05-31T12:15:00.863780Z",
            "url": "https://files.pythonhosted.org/packages/21/02/bcfa23eb272a0123acf6f936369f0d6d8722fd1cf0825ed6072cdc608de8/pyuiauto-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dff65955fcc303213151801a4c0f40571e0e761f422436827ab54886e19e2c9",
                "md5": "1c8bbd74e3bc6365986a73c6dce8a92b",
                "sha256": "41c53b85f7955485f7052536cbafbf707af4352fe6f0e5396e84f9295ac0c91a"
            },
            "downloads": -1,
            "filename": "pyuiauto-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "1c8bbd74e3bc6365986a73c6dce8a92b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 42765,
            "upload_time": "2023-05-31T12:15:03",
            "upload_time_iso_8601": "2023-05-31T12:15:03.642815Z",
            "url": "https://files.pythonhosted.org/packages/1d/ff/65955fcc303213151801a4c0f40571e0e761f422436827ab54886e19e2c9/pyuiauto-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-31 12:15:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "harveyf2801",
    "github_project": "pyUIauto",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyuiauto"
}
        
Elapsed time: 0.08238s