Skip to content

C# Framework for automated testing of Windows application based on WinFroms and WPF platforms.

License

Notifications You must be signed in to change notification settings

vinuthamikkilineni/Winium.Cruciatus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English description | Описание на русском

Winium for Desktop

Build Status Inner Server NuGet downloads Inner Server NuGet version

Winium.Cruciatus is C# Framework for automated testing of Windows application based on WinFroms and WPF platforms

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

  1. Add reference to Winium.Cruciatus in UI test project (install NuGet package)

  2. Create a map application

  3. Use created map in tests

  4. Run your tests and watch the magic happening

Example

Very Quick Start

  1. Add reference to Winium.Cruciatus in UI test project (install NuGet package)

  2. 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();
            }
        }
    }
  3. Run ConsoleApplication and watch the magic happening

Contributing

Contributions are welcome!

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository to start making your changes to the master branch (or branch off of it).
  3. We recommend to write a test which shows that the bug was fixed or that the feature works as expected.
  4. 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 g.golovin@2gis.ru

License

Winium is released under the MPL 2.0 license. See LICENSE for details.

About

C# Framework for automated testing of Windows application based on WinFroms and WPF platforms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 98.2%
  • PowerShell 1.7%
  • Batchfile 0.1%