Beispiel #1
0
        public void TestMethod1()
        {
            DesktopSession desktopSession = new DesktopSession();

            TimeSpan.FromSeconds(2);

            bool bSuccess = false;

            try
            {
                // LeftClick on Button "Type here to search" at (95,20)
                Console.WriteLine("LeftClick on Button \"Type here to search\" at (95,20)");
                string xpath_LeftClickButtonTypehereto_95_20   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Pane[@ClassName=\"Shell_TrayWnd\"][@Name=\"Taskbar\"]/Pane[@ClassName=\"TrayDummySearchControl\"]/Button[@ClassName=\"Button\"][@Name=\"Type here to search\"]";
                var    winElem_LeftClickButtonTypehereto_95_20 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonTypehereto_95_20);
                if (winElem_LeftClickButtonTypehereto_95_20 != null)
                {
                    winElem_LeftClickButtonTypehereto_95_20.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonTypehereto_95_20}");
                    return;
                }


                // KeyboardInput VirtualKeys=""calculator"" CapsLock=False NumLock=False ScrollLock=False
                Console.WriteLine("KeyboardInput VirtualKeys=\"\"calculator\"\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(1000);
                winElem_LeftClickButtonTypehereto_95_20.SendKeys("calculator");

                // LeftClick on ListItem "Calculator, Trusted Microsoft Store app, Press right to switch p" at (113,27)
                Console.WriteLine("LeftClick on ListItem \"Calculator, Trusted Microsoft Store app, Press right to switch p\" at (113,27)");
                string xpath_LeftClickListItemCalculator_113_27   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Cortana\"]/Pane[@ClassName=\"WebView\"][@Name=\"Bing\"]/Pane[@Name=\"Bing\"]/List[@Name=\"Results\"][@AutomationId=\"suggestionsList\"]/ListItem[starts-with(@Name,\"Calculator, Trusted Microsoft Store app, Press right to switch p\")][starts-with(@AutomationId,\"id_\")]";
                var    winElem_LeftClickListItemCalculator_113_27 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemCalculator_113_27);
                if (winElem_LeftClickListItemCalculator_113_27 != null)
                {
                    winElem_LeftClickListItemCalculator_113_27.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemCalculator_113_27}");
                    return;
                }


                // LeftClick on Button "One" at (41,16)
                Console.WriteLine("LeftClick on Button \"One\" at (41,16)");
                string xpath_LeftClickButtonOne_41_16   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Calculator\"]/Group[@ClassName=\"LandmarkTarget\"]/Group[@Name=\"Number pad\"][@AutomationId=\"NumberPad\"]/Button[@Name=\"One\"][@AutomationId=\"num1Button\"]";
                var    winElem_LeftClickButtonOne_41_16 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonOne_41_16);
                if (winElem_LeftClickButtonOne_41_16 != null)
                {
                    winElem_LeftClickButtonOne_41_16.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonOne_41_16}");
                    return;
                }


                // LeftClick on Button "Plus" at (52,24)
                Console.WriteLine("LeftClick on Button \"Plus\" at (52,24)");
                string xpath_LeftClickButtonPlus_52_24   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Calculator\"]/Group[@ClassName=\"LandmarkTarget\"]/Group[@ClassName=\"NamedContainerAutomationPeer\"][@Name=\"Standard operators\"]/Button[@Name=\"Plus\"][@AutomationId=\"plusButton\"]";
                var    winElem_LeftClickButtonPlus_52_24 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonPlus_52_24);
                if (winElem_LeftClickButtonPlus_52_24 != null)
                {
                    winElem_LeftClickButtonPlus_52_24.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonPlus_52_24}");
                    return;
                }


                // LeftClick on Button "Two" at (58,28)
                Console.WriteLine("LeftClick on Button \"Two\" at (58,28)");
                string xpath_LeftClickButtonTwo_58_28   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Calculator\"]/Group[@ClassName=\"LandmarkTarget\"]/Group[@Name=\"Number pad\"][@AutomationId=\"NumberPad\"]/Button[@Name=\"Two\"][@AutomationId=\"num2Button\"]";
                var    winElem_LeftClickButtonTwo_58_28 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonTwo_58_28);
                if (winElem_LeftClickButtonTwo_58_28 != null)
                {
                    winElem_LeftClickButtonTwo_58_28.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonTwo_58_28}");
                    return;
                }


                // LeftClick on Button "Equals" at (56,27)
                Console.WriteLine("LeftClick on Button \"Equals\" at (56,27)");
                string xpath_LeftClickButtonEquals_56_27   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Calculator\"]/Group[@ClassName=\"LandmarkTarget\"]/Group[@ClassName=\"NamedContainerAutomationPeer\"][@Name=\"Standard operators\"]/Button[@Name=\"Equals\"][@AutomationId=\"equalButton\"]";
                var    winElem_LeftClickButtonEquals_56_27 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonEquals_56_27);
                if (winElem_LeftClickButtonEquals_56_27 != null)
                {
                    winElem_LeftClickButtonEquals_56_27.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonEquals_56_27}");
                    return;
                }


                // LeftClick on Text "Display is 3" at (472,2)
                Console.WriteLine("LeftClick on Text \"Display is 3\" at (472,2)");
                string xpath_LeftClickTextDisplayis3_472_2   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Calculator\"]/Group[@ClassName=\"LandmarkTarget\"]/Text[@Name=\"Display is 3\"][@AutomationId=\"CalculatorResults\"]";
                var    winElem_LeftClickTextDisplayis3_472_2 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickTextDisplayis3_472_2);
                if (winElem_LeftClickTextDisplayis3_472_2 != null)
                {
                    winElem_LeftClickTextDisplayis3_472_2.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickTextDisplayis3_472_2}");
                    return;
                }


                // LeftClick on Button "Close Calculator" at (24,15)
                Console.WriteLine("LeftClick on Button \"Close Calculator\" at (24,15)");
                string xpath_LeftClickButtonCloseCalcu_24_15   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Calculator\"]/Window[@Name=\"Calculator\"][@AutomationId=\"TitleBar\"]/Button[@Name=\"Close Calculator\"][@AutomationId=\"Close\"]";
                var    winElem_LeftClickButtonCloseCalcu_24_15 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonCloseCalcu_24_15);
                if (winElem_LeftClickButtonCloseCalcu_24_15 != null)
                {
                    winElem_LeftClickButtonCloseCalcu_24_15.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonCloseCalcu_24_15}");
                    return;
                }


                // test complete
                bSuccess = true;
            }
            finally
            {
                Assert.AreEqual(bSuccess, true);
            }
        }
Beispiel #2
0
        public void TestMethod1()
        {
            DesktopSession desktopSession = new DesktopSession();

            TimeSpan.FromSeconds(2);

            bool bTestSuccess = false;

            try
            {
                // LeftClick on Button "Type here to search" at (85,17)
                Console.WriteLine("LeftClick on Button \"Type here to search\" at (85,17)");
                string xpath_LeftClickButtonTypehereto_85_17   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Pane[@ClassName=\"Shell_TrayWnd\"][@Name=\"Taskbar\"]/Pane[@ClassName=\"TrayDummySearchControl\"]/Button[@ClassName=\"Button\"][@Name=\"Type here to search\"]";
                var    winElem_LeftClickButtonTypehereto_85_17 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonTypehereto_85_17);
                if (winElem_LeftClickButtonTypehereto_85_17 != null)
                {
                    winElem_LeftClickButtonTypehereto_85_17.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonTypehereto_85_17}");
                    return;
                }


                // KeyboardInput VirtualKeys=""notepad"" CapsLock=False NumLock=False ScrollLock=False
                Console.WriteLine("KeyboardInput VirtualKeys=\"\"notepad\"\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(1000);
                winElem_LeftClickButtonTypehereto_85_17.SendKeys("notepad");


                // LeftClick on ListItem "Notepad, Desktop app, Press right to switch preview" at (46,32)
                Console.WriteLine("LeftClick on ListItem \"Notepad, Desktop app, Press right to switch preview\" at (46,32)");
                string xpath_LeftClickListItemNotepadDes_46_32   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Cortana\"]/Pane[@ClassName=\"WebView\"][@Name=\"Bing\"]/Pane[@Name=\"Bing\"]/List[@Name=\"Results\"][@AutomationId=\"suggestionsList\"]/ListItem[@Name=\"Notepad, Desktop app, Press right to switch preview\"][starts-with(@AutomationId,\"id_\")]";
                var    winElem_LeftClickListItemNotepadDes_46_32 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemNotepadDes_46_32);
                if (winElem_LeftClickListItemNotepadDes_46_32 != null)
                {
                    winElem_LeftClickListItemNotepadDes_46_32.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemNotepadDes_46_32}");
                    return;
                }


                // LeftClick on Document "Text Editor" at (143,95)
                Console.WriteLine("LeftClick on Document \"Text Editor\" at (143,95)");
                string xpath_LeftClickDocumentTextEditor_143_95   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"Untitled\")]/Document[@ClassName=\"Edit\"][@Name=\"Text Editor\"]";
                var    winElem_LeftClickDocumentTextEditor_143_95 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickDocumentTextEditor_143_95);
                if (winElem_LeftClickDocumentTextEditor_143_95 != null)
                {
                    winElem_LeftClickDocumentTextEditor_143_95.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickDocumentTextEditor_143_95}");
                    return;
                }


                // KeyboardInput VirtualKeys=""test"" CapsLock=False NumLock=False ScrollLock=False
                Console.WriteLine("KeyboardInput VirtualKeys=\"\"test\"\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(100);
                winElem_LeftClickDocumentTextEditor_143_95.SendKeys("test");

                Console.WriteLine("KeyboardInput VirtualKeys=\"Alt + F\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(1000);
                winElem_LeftClickDocumentTextEditor_143_95.SendKeys(Keys.Alt + "F" + Keys.Alt);

                // LeftClick on MenuItem "Save As..." at (62,17)
                Console.WriteLine("LeftClick on MenuItem \"Save As...\" at (62,17)");
                string xpath_LeftClickMenuItemSaveAs_62_17   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"Untitled\")]/Menu[@ClassName=\"#32768\"][@Name=\"File\"]/MenuItem[@Name=\"Save As...\"]";
                var    winElem_LeftClickMenuItemSaveAs_62_17 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickMenuItemSaveAs_62_17);
                if (winElem_LeftClickMenuItemSaveAs_62_17 != null)
                {
                    winElem_LeftClickMenuItemSaveAs_62_17.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickMenuItemSaveAs_62_17}");
                    return;
                }


                // LeftClick on Edit "File name:" at (147,11)
                Console.WriteLine("LeftClick on Edit \"File name:\" at (147,11)");
                string xpath_LeftClickEditFilename_147_11   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"Untitled\")]/Window[@ClassName=\"#32770\"][@Name=\"Save As\"]/Pane[@ClassName=\"DUIViewWndClassName\"]/ComboBox[@Name=\"File name:\"][@AutomationId=\"FileNameControlHost\"]/Edit[@ClassName=\"Edit\"][@Name=\"File name:\"]";
                var    winElem_LeftClickEditFilename_147_11 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickEditFilename_147_11);
                if (winElem_LeftClickEditFilename_147_11 != null)
                {
                    winElem_LeftClickEditFilename_147_11.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickEditFilename_147_11}");
                    return;
                }


                // KeyboardInput VirtualKeys="Keys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.Backspace"winappdrivertest.txt"" CapsLock=False NumLock=False ScrollLock=False
                Console.WriteLine("KeyboardInput VirtualKeys=\"Keys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.BackspaceKeys.Backspace + Keys.Backspace\"winappdrivertest.txt\"\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(100);
                winElem_LeftClickEditFilename_147_11.SendKeys(Keys.Backspace + Keys.Backspace);
                winElem_LeftClickEditFilename_147_11.SendKeys(Keys.Backspace + Keys.Backspace);
                winElem_LeftClickEditFilename_147_11.SendKeys(Keys.Backspace + Keys.Backspace);
                winElem_LeftClickEditFilename_147_11.SendKeys(Keys.Backspace + Keys.Backspace);
                winElem_LeftClickEditFilename_147_11.SendKeys(Keys.Backspace + Keys.Backspace);
                winElem_LeftClickEditFilename_147_11.SendKeys("1winappdrivertest.txt");


                // LeftClick on Button "Save" at (22,14)
                Console.WriteLine("LeftClick on Button \"Save\" at (22,14)");
                string xpath_LeftClickButtonSave_22_14   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"Untitled\")]/Window[@ClassName=\"#32770\"][@Name=\"Save As\"]/Button[@ClassName=\"Button\"][@Name=\"Save\"]";
                var    winElem_LeftClickButtonSave_22_14 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonSave_22_14);
                if (winElem_LeftClickButtonSave_22_14 != null)
                {
                    winElem_LeftClickButtonSave_22_14.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonSave_22_14}");
                    return;
                }

                Console.WriteLine("KeyboardInput VirtualKeys=\"Alt + F\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(1000);
                winElem_LeftClickDocumentTextEditor_143_95.SendKeys(Keys.Alt + "F" + Keys.Alt);

                // LeftClick on MenuItem "Open..." at (44,11)
                Console.WriteLine("LeftClick on MenuItem \"Open...\" at (44,11)");
                string xpath_LeftClickMenuItemOpen_44_11   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"1winappdrivertest\")]/Menu[@ClassName=\"#32768\"][@Name=\"File\"]/MenuItem[@Name=\"Open...\"]";
                var    winElem_LeftClickMenuItemOpen_44_11 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickMenuItemOpen_44_11);
                if (winElem_LeftClickMenuItemOpen_44_11 != null)
                {
                    winElem_LeftClickMenuItemOpen_44_11.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickMenuItemOpen_44_11}");
                    return;
                }


                // RightClick on Edit "Name" at (9,8)
                Console.WriteLine("RightClick on Edit \"Name\" at (9,8)");
                string xpath_RightClickEditName_9_8   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"1winappdrivertest\")]/Window[@ClassName=\"#32770\"][@Name=\"Open\"]/Pane[@ClassName=\"DUIViewWndClassName\"]/Pane[@Name=\"Shell Folder View\"][@AutomationId=\"listview\"]/List[@ClassName=\"UIItemsView\"][@Name=\"Items View\"]/ListItem[@ClassName=\"UIItem\"][@Name=\"1winappdrivertest.txt\"]/Edit[@Name=\"Name\"][@AutomationId=\"System.ItemNameDisplay\"]";
                var    winElem_RightClickEditName_9_8 = desktopSession.FindElementByAbsoluteXPath(xpath_RightClickEditName_9_8);
                if (winElem_RightClickEditName_9_8 != null)
                {
                    winElem_RightClickEditName_9_8.Click();
                    desktopSession.DesktopSessionElement.Mouse.MouseMove(winElem_RightClickEditName_9_8.Coordinates);
                    desktopSession.DesktopSessionElement.Mouse.ContextClick(null);
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_RightClickEditName_9_8}");
                    return;
                }


                // LeftClick on MenuItem "Delete" at (71,5)
                Console.WriteLine("LeftClick on MenuItem \"Delete\" at (71,5)");
                string xpath_LeftClickMenuItemDelete_71_5   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Menu[@ClassName=\"#32768\"][@Name=\"Context\"]/MenuItem[@Name=\"Delete\"]";
                var    winElem_LeftClickMenuItemDelete_71_5 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickMenuItemDelete_71_5);
                if (winElem_LeftClickMenuItemDelete_71_5 != null)
                {
                    winElem_LeftClickMenuItemDelete_71_5.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickMenuItemDelete_71_5}");
                    return;
                }


                // LeftClick on Button "Cancel" at (24,13)
                Console.WriteLine("LeftClick on Button \"Cancel\" at (24,13)");
                string xpath_LeftClickButtonCancel_24_13   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"1winappdrivertest\")]/Window[@ClassName=\"#32770\"][@Name=\"Open\"]/Button[@ClassName=\"Button\"][@Name=\"Cancel\"]";
                var    winElem_LeftClickButtonCancel_24_13 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonCancel_24_13);
                if (winElem_LeftClickButtonCancel_24_13 != null)
                {
                    winElem_LeftClickButtonCancel_24_13.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonCancel_24_13}");
                    return;
                }


                // LeftClick on Button "Close" at (28,15)
                Console.WriteLine("LeftClick on Button \"Close\" at (28,15)");
                string xpath_LeftClickButtonClose_28_15   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Notepad\"][contains(@Name,\"1winappdrivertest\")]/TitleBar[@AutomationId=\"TitleBar\"]/Button[@Name=\"Close\"]";
                var    winElem_LeftClickButtonClose_28_15 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonClose_28_15);
                if (winElem_LeftClickButtonClose_28_15 != null)
                {
                    winElem_LeftClickButtonClose_28_15.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonClose_28_15}");
                    return;
                }

                bTestSuccess = true;
            }
            finally
            {
                Assert.AreEqual(bTestSuccess, true);
            }
        }
Beispiel #3
0
        public void TestMethod1()
        {
            DesktopSession desktopSession = new DesktopSession();

            TimeSpan.FromSeconds(2);

            bool bSuccess = false;

            try
            {
                // LeftClick on Button "Type here to search" at (59,39)
                Console.WriteLine("LeftClick on Button \"Type here to search\" at (59,39)");
                string xpath_LeftClickButtonTypehereto_59_39   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Pane[@ClassName=\"Shell_TrayWnd\"][@Name=\"Taskbar\"]/Pane[@ClassName=\"TrayDummySearchControl\"]/Button[@ClassName=\"Button\"][@Name=\"Type here to search\"]";
                var    winElem_LeftClickButtonTypehereto_59_39 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonTypehereto_59_39);
                if (winElem_LeftClickButtonTypehereto_59_39 != null)
                {
                    winElem_LeftClickButtonTypehereto_59_39.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonTypehereto_59_39}");
                    return;
                }


                // KeyboardInput VirtualKeys=""alarms"Keys.Space + Keys.SpaceKeys.Shift + "7" + Keys.ShiftKeys.Space + Keys.Space"clock"" CapsLock=False NumLock=False ScrollLock=False
                Console.WriteLine("KeyboardInput VirtualKeys=\"\"alarms\"Keys.Space + Keys.SpaceKeys.Shift + \"7\" + Keys.ShiftKeys.Space + Keys.Space\"clock\"\" CapsLock=False NumLock=False ScrollLock=False");
                System.Threading.Thread.Sleep(1000);
                winElem_LeftClickButtonTypehereto_59_39.SendKeys("alarms");
                winElem_LeftClickButtonTypehereto_59_39.SendKeys(Keys.Space + Keys.Space);
                winElem_LeftClickButtonTypehereto_59_39.SendKeys(Keys.Shift + "7" + Keys.Shift);
                winElem_LeftClickButtonTypehereto_59_39.SendKeys(Keys.Space + Keys.Space);
                winElem_LeftClickButtonTypehereto_59_39.SendKeys("clock");


                // LeftClick on ListItem "Alarms & Clock, Trusted Microsoft Store app, Press right to swit" at (126,13)
                Console.WriteLine("LeftClick on ListItem \"Alarms & Clock, Trusted Microsoft Store app, Press right to swit\" at (126,13)");
                string xpath_LeftClickListItemAlarmsCloc_126_13   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Cortana\"]/Pane[@ClassName=\"WebView\"][@Name=\"Bing\"]/Pane[@Name=\"Bing\"]/List[@Name=\"Results\"][@AutomationId=\"suggestionsList\"]/ListItem[starts-with(@Name,\"Alarms & Clock, Trusted Microsoft Store app, Press right to swit\")][starts-with(@AutomationId,\"id_\")]";
                var    winElem_LeftClickListItemAlarmsCloc_126_13 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemAlarmsCloc_126_13);
                if (winElem_LeftClickListItemAlarmsCloc_126_13 != null)
                {
                    winElem_LeftClickListItemAlarmsCloc_126_13.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemAlarmsCloc_126_13}");
                    return;
                }


                // LeftClick on ListItem "Alarm" at (56,17)
                Console.WriteLine("LeftClick on ListItem \"Alarm\" at (56,17)");
                string xpath_LeftClickListItemAlarm_56_17   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/List[@AutomationId=\"TopNavMenuItemsHost\"]/ListItem[@Name=\"Alarm\"][@AutomationId=\"AlarmButton\"]";
                var    winElem_LeftClickListItemAlarm_56_17 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemAlarm_56_17);
                if (winElem_LeftClickListItemAlarm_56_17 != null)
                {
                    winElem_LeftClickListItemAlarm_56_17.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemAlarm_56_17}");
                    return;
                }


                // LeftClick on ListItem "Clock" at (54,10)
                Console.WriteLine("LeftClick on ListItem \"Clock\" at (54,10)");
                string xpath_LeftClickListItemClock_54_10   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/List[@AutomationId=\"TopNavMenuItemsHost\"]/ListItem[@Name=\"Clock\"][@AutomationId=\"ClockButton\"]";
                var    winElem_LeftClickListItemClock_54_10 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemClock_54_10);
                if (winElem_LeftClickListItemClock_54_10 != null)
                {
                    winElem_LeftClickListItemClock_54_10.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemClock_54_10}");
                    return;
                }


                // LeftClick on ListItem "Timer" at (56,21)
                Console.WriteLine("LeftClick on ListItem \"Timer\" at (56,21)");
                string xpath_LeftClickListItemTimer_56_21   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/List[@AutomationId=\"TopNavMenuItemsHost\"]/ListItem[@Name=\"Timer\"][@AutomationId=\"TimerButton\"]";
                var    winElem_LeftClickListItemTimer_56_21 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemTimer_56_21);
                if (winElem_LeftClickListItemTimer_56_21 != null)
                {
                    winElem_LeftClickListItemTimer_56_21.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemTimer_56_21}");
                    return;
                }


                // LeftClick on ListItem "Stopwatch" at (71,24)
                Console.WriteLine("LeftClick on ListItem \"Stopwatch\" at (71,24)");
                string xpath_LeftClickListItemStopwatch_71_24   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/List[@AutomationId=\"TopNavMenuItemsHost\"]/ListItem[@Name=\"Stopwatch\"][@AutomationId=\"StopwatchButton\"]";
                var    winElem_LeftClickListItemStopwatch_71_24 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickListItemStopwatch_71_24);
                if (winElem_LeftClickListItemStopwatch_71_24 != null)
                {
                    winElem_LeftClickListItemStopwatch_71_24.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickListItemStopwatch_71_24}");
                    return;
                }


                // LeftClick on Button "Reset" at (16,23)
                Console.WriteLine("LeftClick on Button \"Reset\" at (16,23)");
                string xpath_LeftClickButtonReset_16_23   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/Button[@Name=\"Reset\"][@AutomationId=\"StopWatchResetButton\"]";
                var    winElem_LeftClickButtonReset_16_23 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonReset_16_23);
                if (winElem_LeftClickButtonReset_16_23 != null)
                {
                    winElem_LeftClickButtonReset_16_23.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonReset_16_23}");
                    return;
                }


                // LeftClick on Button "Start" at (40,25)
                Console.WriteLine("LeftClick on Button \"Start\" at (40,25)");
                string xpath_LeftClickButtonStart_40_25   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/Button[@Name=\"Start\"][@AutomationId=\"StopwatchPlayPauseButton\"]";
                var    winElem_LeftClickButtonStart_40_25 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonStart_40_25);
                if (winElem_LeftClickButtonStart_40_25 != null)
                {
                    winElem_LeftClickButtonStart_40_25.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonStart_40_25}");
                    return;
                }


                // LeftClick on Button "Pause" at (34,28)
                Console.WriteLine("LeftClick on Button \"Pause\" at (34,28)");
                string xpath_LeftClickButtonPause_34_28   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/Button[@Name=\"Pause\"][@AutomationId=\"StopwatchPlayPauseButton\"]";
                var    winElem_LeftClickButtonPause_34_28 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonPause_34_28);
                if (winElem_LeftClickButtonPause_34_28 != null)
                {
                    winElem_LeftClickButtonPause_34_28.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonPause_34_28}");
                    return;
                }


                // LeftClick on Button "Reset" at (25,25)
                Console.WriteLine("LeftClick on Button \"Reset\" at (25,25)");
                string xpath_LeftClickButtonReset_25_25   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@ClassName=\"Windows.UI.Core.CoreWindow\"][@Name=\"Alarms & Clock\"]/Button[@Name=\"Reset\"][@AutomationId=\"StopWatchResetButton\"]";
                var    winElem_LeftClickButtonReset_25_25 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonReset_25_25);
                if (winElem_LeftClickButtonReset_25_25 != null)
                {
                    winElem_LeftClickButtonReset_25_25.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonReset_25_25}");
                    return;
                }


                // LeftClick on Button "Close Alarms & Clock" at (19,22)
                Console.WriteLine("LeftClick on Button \"Close Alarms & Clock\" at (19,22)");
                string xpath_LeftClickButtonCloseAlarm_19_22   = "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]/Window[@ClassName=\"ApplicationFrameWindow\"][@Name=\"Alarms & Clock\"]/Window[@Name=\"Alarms & Clock\"][@AutomationId=\"TitleBar\"]/Button[@Name=\"Close Alarms & Clock\"][@AutomationId=\"Close\"]";
                var    winElem_LeftClickButtonCloseAlarm_19_22 = desktopSession.FindElementByAbsoluteXPath(xpath_LeftClickButtonCloseAlarm_19_22);
                if (winElem_LeftClickButtonCloseAlarm_19_22 != null)
                {
                    winElem_LeftClickButtonCloseAlarm_19_22.Click();
                }
                else
                {
                    Console.WriteLine($"Failed to find element using xpath: {xpath_LeftClickButtonCloseAlarm_19_22}");
                    return;
                }

                bSuccess = true;
            }
            finally
            {
                Assert.AreEqual(bSuccess, true);
            }
        }