English description | Описание на русском
Winium for Desktop
Winium.Cruciatus is an open source C# Framework for automated testing of Windows application based on WinFroms and WPF platforms.
Winium.Cruciatus is a wrapper over Microsoft UI Automation library in the System.Windows.Automation namespace.
Why Winium.Cruciatus?
- Enough Visual Studio Professional offering
- You can use any testing framework to write tests (example NUnit)
Quick Start
-
Add reference to
Winium.Cruciatus
in UI test project (install NuGet package) -
Create a map application
-
Use created map in tests
-
Run your tests and watch the magic happening
Example
Very Quick Start
-
Add reference to
Winium.Cruciatus
in UI test project (install NuGet package) -
Create C# Console Application project and use this code:
namespace ConsoleApplication { using System.Windows.Automation; using Winium.Cruciatus.Core; using Winium.Cruciatus.Extensions; public class Program { private static void Main(string[] args) { var calc = new Winium.Cruciatus.Application("C:/windows/system32/calc.exe"); calc.Start(); var winFinder = By.Name("Calculator").AndType(ControlType.Window); var win = Winium.Cruciatus.CruciatusFactory.Root.FindElement(winFinder); var menu = win.FindElementByUid("MenuBar").ToMenu(); menu.SelectItem("View$Scientific"); menu.SelectItem("View$History"); win.FindElementByUid("132").Click(); // 2 win.FindElementByUid("93").Click(); // + win.FindElementByUid("134").Click(); // 4 win.FindElementByUid("97").Click(); // ^ win.FindElementByUid("138").Click(); // 8 win.FindElementByUid("121").Click(); // = calc.Close(); } } }
-
Run ConsoleApplication and watch the magic happening
Contributing
Contributions are welcome!
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the repository to start making your changes to the master branch (or branch off of it).
- We recommend to write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request and bug the maintainer until it gets merged and published. 😃
Contact
Have some questions? Found a bug? Create new issue or contact us at [email protected]
License
Winium is released under the MPL 2.0 license. See LICENSE for details.