Giter Site home page Giter Site logo

gaybro8777 / winium.cruciatus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2gis/winium.cruciatus

0.0 1.0 0.0 1.13 MB

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

License: Mozilla Public License 2.0

PowerShell 1.68% Batchfile 0.08% C# 98.24%

winium.cruciatus's Introduction

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 [email protected]

License

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

winium.cruciatus's People

Watchers

 avatar

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.