void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Ctrl+A' Press.", new RecordItemIndex(0));
            Keyboard.Press(System.Windows.Forms.Keys.A | System.Windows.Forms.Keys.Control, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$sk' with focus on 'Google.LstIb'.", repo.Google.LstIbInfo, new RecordItemIndex(1));
            repo.Google.LstIb.PressKeys(sk);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Tab}' with focus on 'Google.LstIb'.", repo.Google.LstIbInfo, new RecordItemIndex(2));
            repo.Google.LstIb.PressKeys("{Tab}");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.BtnK' at 93;23.", repo.Google.BtnKInfo, new RecordItemIndex(3));
            repo.Google.BtnK.Click("93;23");
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'InnerText' from item 'Google.ResultStats' and assigning its value to variable 'ResultStats'.", repo.Google.ResultStatsInfo, new RecordItemIndex(4));
            ResultStats = repo.Google.ResultStats.Element.GetAttributeValueText("InnerText");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "User", ResultStats, new RecordItemIndex(5));

            TimeCollection.UpdateInputFile("results", ResultStats);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "User", searchedvalues, new RecordItemIndex(7));
        }
Esempio n. 2
0
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            Report.Log(ReportLevel.Info, "Website", "Opening web site 'http://google.com' with browser 'chrome' in normal mode.", new RecordItemIndex(0));
            Host.Current.OpenBrowser("http://google.com", "chrome", "", false, false, false, false, false);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.SearchField' at Center.", repo.Google.SearchFieldInfo, new RecordItemIndex(1));
            repo.Google.SearchField.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "User", searchResultsAsKeyword, new RecordItemIndex(2));

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$searchResultsAsKeyword' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(3));
            repo.Google.SearchField.PressKeys(searchResultsAsKeyword);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Tab}' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(4));
            repo.Google.SearchField.PressKeys("{Tab}");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.SearchButton' at Center.", repo.Google.SearchButtonInfo, new RecordItemIndex(5));
            repo.Google.SearchButton.Click();
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'InnerText' from item 'Google.ResultStats' and assigning its value to variable 'searchResultsAsKeywordResults'.", repo.Google.ResultStatsInfo, new RecordItemIndex(6));
            searchResultsAsKeywordResults = repo.Google.ResultStats.Element.GetAttributeValueText("InnerText");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "User", searchResultsAsKeywordResults, new RecordItemIndex(7));

            TimeCollection.UpdateInputFile("SRK_Results", searchResultsAsKeywordResults);
            Delay.Milliseconds(0);
        }
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.00;

            Init();

            Report.Log(ReportLevel.Info, "Keyboard", "Key 'Ctrl+A' Press.", new RecordItemIndex(0));
            Keyboard.Press(System.Windows.Forms.Keys.A | System.Windows.Forms.Keys.Control, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$sk1' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(1));
            repo.Google.SearchField.PressKeys(sk1);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Tab}' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(2));
            repo.Google.SearchField.PressKeys("{Tab}");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.SearchButton' at 93;23.", repo.Google.SearchButtonInfo, new RecordItemIndex(3));
            repo.Google.SearchButton.Click("93;23");
            Delay.Milliseconds(200);

            Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'InnerText' from item 'Google.ResultStats' and assigning its value to variable 'results1'.", repo.Google.ResultStatsInfo, new RecordItemIndex(4));
            results1 = repo.Google.ResultStats.Element.GetAttributeValueText("InnerText");
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "User", results1, new RecordItemIndex(5));

            TimeCollection.UpdateInputFile("Results1", results1);
            Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "Invoke action", "Invoking Close() on item 'CurrentPage'.", repo.CurrentPage.SelfInfo, new RecordItemIndex(7));
            //repo.CurrentPage.Self.Close();
            //Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "Website", "Opening web site 'http://google.com' with browser 'chrome' in normal mode.", new RecordItemIndex(8));
            //Host.Current.OpenBrowser("http://google.com", "chrome", "", false, false, false, false, false);
            //Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.SearchField' at Center.", repo.Google.SearchFieldInfo, new RecordItemIndex(9));
            //repo.Google.SearchField.Click();
            //Delay.Milliseconds(200);

            //Report.Log(ReportLevel.Info, "Keyboard", "Key sequence from variable '$sk2' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(10));
            //repo.Google.SearchField.PressKeys(sk2);
            //Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "Keyboard", "Key sequence '{Tab}' with focus on 'Google.SearchField'.", repo.Google.SearchFieldInfo, new RecordItemIndex(11));
            //repo.Google.SearchField.PressKeys("{Tab}");
            //Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Google.SearchButton' at 93;23.", repo.Google.SearchButtonInfo, new RecordItemIndex(12));
            //repo.Google.SearchButton.Click("93;23");
            //Delay.Milliseconds(200);

            //Report.Log(ReportLevel.Info, "Get Value", "Getting attribute 'InnerText' from item 'Google.ResultStats' and assigning its value to variable 'results2'.", repo.Google.ResultStatsInfo, new RecordItemIndex(13));
            //results2 = repo.Google.ResultStats.Element.GetAttributeValueText("InnerText");
            //Delay.Milliseconds(0);

            //Report.Log(ReportLevel.Info, "User", results2, new RecordItemIndex(14));

            //TimeCollection.UpdateInputFile("Results2", results2);
            //Delay.Milliseconds(0);

            searchResultAsKeyword = AssignNewkeywordToSearch();
            Delay.Milliseconds(0);

            TimeCollection.UpdateInputFile("SRK", searchResultAsKeyword);
            Delay.Milliseconds(0);

            Report.Log(ReportLevel.Info, "User", searchResultAsKeyword, new RecordItemIndex(18));

            Report.Log(ReportLevel.Info, "Invoke action", "Invoking Close() on item 'CurrentPage'.", repo.CurrentPage.SelfInfo, new RecordItemIndex(19));
            repo.CurrentPage.Self.Close();
            Delay.Milliseconds(0);
        }