Giter Site home page Giter Site logo

amruthvvkp / flaui-uiautomation-wrapper Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 3.0 1.86 MB

Tool to perform UI Automation on Windows desktop applications using an underlying Fla-UI wrapper.

License: GNU General Public License v3.0

Python 100.00%
flaui flaui-wrapper pythonnet uiautomation

flaui-uiautomation-wrapper's Introduction

flaui-uiautomation-wrapper

PyPI - Python Version GitHub release (with filter) PyPI - Version PyPI - Downloads

GitHub Release Date - Published_At GitHub (Pre-)Release Date

GitHub milestones GitHub issues GitHub pull requests GitHub milestone details

Ruff Interrogate Build status GitHub branch checks state

GitHub contributors GitHub commits since latest release (by SemVer including pre-releases) GitHub last commit GitHub PyPI - Format

FlaUI is a .NET library that can be used to perform UI automated testing of Windows desktop applications like Win32, WinForms, WPF, etc.. It is a wrapper that works alongside Windows inbuilt UI Automation technology to perform UI automation as required.

FlaUI has interesting approaches on multiple non-python projects. On python there is an integration with RobotFramework which allows tests to be written on RobotFramework and the keywords from it's plugin are utilized to identify elements by XPATH and perform UI actions.

Other than RobotFramework-FLAUI, there are no Python libraries that help us leverage this useful C# library. The intend of this project is to make sure that a versatile and useful plug-and-play python wrapper is built which works well with IDE's intellisense, integrating with any Python frameworks like PyTest, Behave, TestPlan, etc. or any other tooling where UI automation is a necessary feature.

This project is in active development over the latest version of FlaUI (3.2.0) available on GitHub. New releases are expected to come by in the next few weeks and certainly the documentation would improve alongside the planned releases.

If you would like to contribute or request a feature, feel free to join the discussions on the project's GitHub page.

Release Notes

Check out the release notes on GitHub releases.

Project Roadmap

Check out the project roadmap on GitHub milestones

Active development is targetted towards the first major release of the project. The first major release is expected to be released by the end of 2023. The project roadmap is subject to change based on the project's progress.

You can track the project's progress on this v1.0.0 roadmap page.

flaui-uiautomation-wrapper's People

Contributors

amruthvvkp avatar tejaswanisathish avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flaui-uiautomation-wrapper's Issues

Release support for Python 3.8 and above versions

Earlier versions of PythonNet did not allow us to put in support for Python 3.8 and above versions of Python. PythonNet 3 allowed us to support the needed Python versions. Although we have plans to support Python 3.8 as a part of our first major release v1.0 goals, we are at a stage where we can afford a minor release that supports Python 3.7 to Python 3.11.

This helps in with a request (#52 ) I've received of late, considering it might take a few more weeks for v1.0 to release - we should put in a minor release at this point.

Add documentation based on MkDocs

MkDocs is our choice to build adequate documentation before we approach v1.0.0 release. We would like to ensure that our documentation is built and deployed as a static webpage to GitHub pages/elsewhere. It should point to a static URL which should be accessible from the public internet.

Add sample tests based on PyTest

PyTest is a widely used tool for automated testing in the Python community. We need to create a set of sample tests that act as references for users who are looking to adapt this wrapper.

Add Poetry for dependency management and PyPI publishing

We currently use setup.py and setup.cfg to list down all dependencies and publish the binaries/wheel to PyPI through a native GitHub action. Poetry is a fantastic dependency management tool that is simple and minimalistic in usage. It also has an integrated feature to publish packages to PyPI which should ease the effort.

Add dynamic Poetry version resolver

Poetry resolves versions from the version parameter of tool.poetry section of pyproject.toml. We would like Poetry to -

  1. Fetch version from Git release tag if it is available on the HEAD - This helps us to simplify PyPI releases through GitHub Actions.
  2. Fetch alpha version from the last Git release tag - This helps us to deploy versioned test package to Test PyPI.

Fix "ModuleNotFoundError: No module named 'config'" error.

Recent release v1.0.0 introduced a bug that causes the following error when running the script:

from flaui.lib.pythonnet_bridge import setup_pythonnet_bridge

setup_pythonnet_bridge()

It throws the following error:

(flaui-wrapper-test-py3.10) PS C:\Users\***> & C:/Users/***/AppData/Local/pypoetry/Cache/virtualenvs/flaui-wrapper-test-AYogNOoy-py3.10/Scripts/python.exe c:/Users/***/AppData/Local/Temp/Tempb0079d5c-8d15-4879-9f8d-0439c63bb7ea_tests_wrapper_main-20231010T093921Z-001.zip/tests_wrapper_main/test.py
Traceback (most recent call last):
  File "c:\Users\***\AppData\Local\Temp\Tempb0079d5c-8d15-4879-9f8d-0439c63bb7ea_tests_wrapper_main-20231010T093921Z-001.zip\tests_wrapper_main\test.py", line 1, in <module>
    from flaui.lib.pythonnet_bridge import  test_setup_pythonnet_bridge
  File "C:\Users\***\AppData\Local\pypoetry\Cache\virtualenvs\flaui-wrapper-test-AYogNOoy-py3.10\lib\site-packages\flaui\lib\pythonnet_bridge.py", line 4, in <module>
    import config
ModuleNotFoundError: No module named 'config'

This is caused by the Poetry configuration lsited in pyproject.toml. It needs to include the config.py file in the flaui package.

Example

Do you have any example of Flaui being used in Python for eventual testing?
Or any documentation on how to use it?

Fix setup.py to allow successful wheel builds for PyPI releases

Attempting to release v0.0.1 to PyPI made me realize that wheel builds fail due to the dependenceies from setup.py, specifically from the parsing of requirements. This patch is to address those build issues which should allow us to have a successfuly publishing channel to PyPI.

Update AutomationElements to Pydantic

We have some draft of AutomationElements wich can utilize Pydantic as a data model instead of generic Python classes. This upgrade will ease a lot of data validations across usages.

Add basic GitHub actions

Basic GitHub actions should cover -

  1. On a pull request:
  • Automated unit test execution
  • Automated linting and formatting checks
  • Automated sample test suite execution
  • Automated release to test.pypi where the commit ID is the release version
  1. On a release:
  • Automated documentation build and deployment to GitHub pages
  • Automated release notes generation
  • Automated release to
  1. In general:
  • Automated security vulnerability scans for dependencies
  • Automated code quality checks

Add VS Code task to publish releases

Somehow GitHub's actions upon a release are generating dist files with lunix_86_x_64 tagged on the name which is rejected by PyPI. As a quick fix, we can build the wheel on our windows development environment and publish it right from the IDE.

Add pull request template

We need to add a pull request template so that all our PR's are much more uniformed. This would go a long way in establishing a cleaner defined review practices.

Add test applications to repo

We need some executables to build, test and run the code base. There are some pre-built wpf applications that work just as we need them to.

Create initial pythonnet bridge

We need to have initial base connectivity to the FlaUI DLL's using PythonNet and establish a way to hook to any PID's. This would prove a way to establish a connection that makes it work with the next set of features that would come in.

Create release templates

We need to create a release draft on PR merge and automated release notes on creation of GitHub releases so that it becomes easier for us to work this through.

Ideally we want the auto-generation of draft/final releases from the PR and issue labels. These labels need to be automatically attached to the PR on creation/update.

How to handle mouse busy spinner in desktop Application(Code should wait until mouse completes its loading state)

Describe the feature
Is there any direct method that is available to handle mouse busy state. We are actually looking for solution to avoid sync issues in our code. Our's is very big application contains lot of data. Navigating B/W windows is taking some time to load all elements in upcoming window. We tried Wait While busy and Wait Until responsive and others as well but still we are getting sync issues.

Workarounds
Any workaround to wait until mouse completes its loading state.

image

Add initial unit tests

With PR #45 we get to the point of having FlaUI.Core namespace attached to our codebase. This calls for an urgent need to build sufficient unit tests that ensure our scalability isn't impacted by unknown defects.

Add sample test suites based on Behave

Behave is a widely used tool for automated testing in the Python community. We need to create a set of sample tests that act as references for users who are looking to adapt this wrapper.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.