public void hello()
        {
            IntPtr hid12 = handleid("msn");

            this.myHtmlDoc10 = this.cls.Get_HtmlDocumentToWindow(hid12, "AutomationId", "4026");
            Maui.Core.WinControls.CheckBox objExactControl10 = this.c2.getbox(this.myHtmlDoc10);

            if (objExactControl10.Checked)
            {
                MessageBox.Show("checked");
            }

            else
            {
                MessageBox.Show("unchecked");
            }



            //System.Threading.Thread.Sleep(5000);
            IntPtr hid = handleid("msn");

            this.myHtmlDoc2 = this.cls.Get_HtmlDocumentToWindow(hid, "AutomationId", "4019");
            Maui.Core.WinControls.TextBox objExactControl2 = this.c2.Get_text(this.myHtmlDoc2);
            objExactControl2.Text = "password";

            //System.Threading.Thread.Sleep(5000);

            this.myHtmlDoc3 = this.cls.Get_HtmlDocumentToWindow(hid, "AutomationId", "4020");

            Maui.Core.WinControls.Control objExactControl3 = this.c2.Get_MauiControl(this.myHtmlDoc3);
            objExactControl3.Click();



            Thread.Sleep(1000);

            hell();



            System.Threading.Thread.Sleep(40000);

            IntPtr hid1 = handleid("msn");

            //this.myHtmlDoc4 = this.cls.Get_HtmlDocumentToWindow(hid1, "AutomationId", "2337");
            //Maui.Core.WinControls.Control objExactControl4 = this.c2.Get_MauiControl(this.myHtmlDoc4);
            //objExactControl4.Click();

            this.myHtmlDoc5 = this.cls.Get_HtmlDocumentToWindow(hid1, "AutomationId", "61536");
            Maui.Core.WinControls.Control objExactControl5 = this.c2.Get_MauiControl(this.myHtmlDoc5);
            objExactControl5.Click();

            this.myHtmlDoc5 = this.cls.Get_HtmlDocumentToWindow(hid1, "AutomationId", "1");
            Maui.Core.WinControls.Control objExactControl6 = this.c2.Get_MauiControl(this.myHtmlDoc5);
            objExactControl6.Click();
        }
Beispiel #2
0
 /// <summary>
 /// Implements Dispose methode of IDisposable interface.
 /// </summary>
 public void Dispose()
 {
     this.objExecuteMSI = null;
     this.myWindow.Dispose();
     this.myWindow     = null;
     this.myControls   = null;
     this.mauiWindow   = null;
     this.mauiToolbar  = null;
     this.mauiCheckBox = null;
 }
Beispiel #3
0
        /// <summary>
        /// Function for checking Quick Web Access Check Box.
        /// </summary>
        /// <param name="version">build version</param>
        /// <param name="requiredProcessName">required Process Name</param>
        public void VerifyQuickWebAccess(string version, string requiredProcessName)
        {
            try
            {
                bool executeTest = false;
                try
                {
                    //// Get version name from MessagesBuildSanitySmokeToolBL.resx resource file and split it.
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgInitializeQBATest, Logger.CommentType.Message);
                    string[] versionCollection = MessagesBuildSanitySmokeToolBL.VersionArray.Split(',');
                    string[] searchVersionStr  = Array.FindAll(versionCollection, s => s.Equals(version));
                    if (version.Equals(searchVersionStr[0]))
                    {
                        executeTest = true;
                    }
                }
                catch (Exception)
                {
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.LowerVersion, Logger.CommentType.Message);
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSkipQuickWebAccess, Logger.CommentType.Message);
                }

                if (executeTest)
                {
                    this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                    //// Get ChechBox and check weather it is checked or not
                    this.mauiWindow   = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "4026");
                    this.mauiCheckBox = this.myControls.Get_MauiCheckBox(this.mauiWindow);
                    if (this.mauiCheckBox.Checked)
                    {
                        Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgQWAChecked, Logger.CommentType.Pass);
                    }
                    else
                    {
                        Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgQWAUnchecked, Logger.CommentType.Fail);
                    }
                }
                else
                {
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.LowerVersion, Logger.CommentType.Message);
                }
            }
            catch (Exception)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgQWANotVerified, Logger.CommentType.Fail);
            }
        }