Legerity
/ləˈdʒɛr ɪ ti/ (luh-jer-i-tee)
-
physical or mental quickness; nimbleness;
agility.

Legerity is an automated UI testing framework for building maintainable tests quickly for Windows, Android, iOS, and Web applications with C#/.NET.
It simplifies the development by providing easy-to-use element wrappers for native app controls that allow developers to quickly get up and running with UI tests in no time.
Legerity also provides a best practice page object pattern for building UI tests with a maintainable structure. Together with native app control wrappers, Legerity provides the best experience for building maintainable UI automation with speed.
Discover what’s new in Legerity
Features ⭐
- Legerity Windows Driver - Launch Windows desktop apps or attach to existing windows and automate native controls through Windows UI Automation. The self-contained x64 and ARM64 executable runs without the Legerity framework or an Appium server.
- AppManager - A wrapper around the Selenium WebDriver and Appium WebDrivers to simplify starting your UI tests. Supports running a single set of UI tests across multiple platforms or browsers.
- Page Object Pattern - Provides a
BasePage that can be used to create page objects associated with pages in your application that are easy to implement and maintain.
- Page Object Generator - A dotnet CLI tool that automatically generates page objects from your application’s XAML, AXML, HTML, and Storyboard/XIB layout files.
- Element Wrappers - Contains a collection of out-of-the-box wrappers for native UI elements that are easy to use with interactions.
- Project Templates -
dotnet new templates to scaffold test projects for each platform.
- Testing Frameworks - Legerity is agnostic of .NET testing frameworks (e.g. NUnit, xUnit, MSTest, etc.) so you can work with what you know.
- CI - Legerity is also agnostic of host CI runner platforms (e.g. GitHub Actions, Azure Pipelines, etc.) and can be run anywhere.
- Extendable - Platform-specific packages (Legerity.Windows, Legerity.Android, Legerity.IOS, Legerity.Web, Legerity.WinUI) include out-of-the-box element wrappers. Use Legerity.Core to build wrappers for your own custom UI components.
Documentation 📃
If you want to deep dive into the Legerity framework with details on how to use the features, you can browse the documentation for help getting up and running!
Our documentation includes usages examples, as well as API documentation for your technical reference.
Installation 💾
Legerity is publicly available via NuGet. Each available package is detailed below.
| Tool |
Install |
| Page Object Generator |
dotnet tool install -g Legerity.PageObjectGenerator |
| Project Templates |
dotnet new install Legerity.Templates |
| Windows Driver |
Windows x64 and ARM64 downloads |
Support Legerity 💗
As many developers know, projects like Legerity are built and maintained in spare time. If you find this project useful, please Star the repo and if possible, sponsor the project development on GitHub.
Contributing 🚀
Looking to help build Legerity? Take a look through our contribution guidelines. We actively encourage you to jump in and help with any issues!
Building Legerity 🛠
Legerity is built using .NET 10 with SDK-style projects.
You can build the solution using Visual Studio or the .NET CLI:
dotnet build src/Legerity.sln
Got components? 💭
Do you have a collection of custom components that you’d like to see added to the Legerity framework? Feel free to drop a feature request into our work tracker!
Even better, why not help build out your custom control wrapper elements within the framework and help out the community!
When contributing to new element wrappers, we recommended using the Accessibility Insights tool. The tool is capable of inspecting and providing property values for Android, Web, and Windows applications.
Alternatively, you can use the Inspect.exe tool for Windows applications installed with the Windows SDKs. This is not recommended as the tool is considered legacy and can often cause oddities in UI when using.
License
Legerity is made available under the terms and conditions of the MIT license.
评论