/// <summary>
        /// Changes the solution.
        /// WARNING: This function is language dependent
        /// </summary>
        public void ChangeSolution()
        {
            // Skip 1st bend
            IProcess flux = Driver.Find <IProcess>(new ProcessPattern()
            {
                ProcessName = mFluxProcessName
            });
            var firstBend = flux.Find <IControl>(new WPFPattern()
            {
                ClrFullClassName = "Flux.BendNavigator"
            }, 2).Find <IControl>(new WPFPattern()
            {
                ClrFullClassName = "System.Windows.Controls.TextBlock",
                WPFControlText   = "1"
            }, 7);

            firstBend.Click();

            var skipBendButton = flux.Find <IControl>(new WPFPattern()
            {
                ClrFullClassName = "Flux.GlobHost"
            }, 2).Find <IControl>(new WPFPattern()
            {
                ClrFullClassName = "System.Windows.Controls.TextBlock",
                WPFControlText   = "Biegung überspringen" // This is not language independent
            }, 4);

            skipBendButton.Click();

            // close part
            var close = mMainWindow.Find <IControl>(new WPFPattern()
            {
                ClrFullClassName    = "System.Windows.Controls.Image",
                WPFControlOrdinalNo = 3
            }, 5);

            close.Click();

            // check for message box
            var noButton = flux.Find <IControl>(new WPFPattern()
            {
                ClrFullClassName = "Flux.MsgBox"
            }, 2).Find <IButton>(new WPFPattern()
            {
                ClrFullClassName = "System.Windows.Controls.Button",
                WPFControlText   = "Nein" // This is not language independent
            }, 3);

            noButton.Click();
        }
Beispiel #2
0
        public void HelloWorldTest()
        {
            IProcess process = Driver.Applications.Run("notepad.exe");

            // Get the top-level window of Notepad.
            // You can get object identification code from the TestLeft UI Spy panel:
            // From the main menu, select View -> TestLeft UI Spy.
            ITopLevelWindow window = process.Find <ITopLevelWindow>(new WindowPattern()
            {
                WndClass = "Notepad"
            });

            window.Keys("Hello world!!"); // Simulate text input
        }