/// <summary>
        /// This function is for entering password and clicking next button for signing in.
        /// </summary>
        /// <param name="password">User Password.</param>
        /// <param name="requiredProcessName">Required process name.</param>
        public void ProvidePassword(string password, string requiredProcessName)
        {
            try
            {
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);

                //// Password textbox.
                this.mauiWindow             = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "4019");
                this.myMauiCoreTextBox      = this.myControls.Get_MauiTextBox(this.mauiWindow);
                this.myMauiCoreTextBox.Text = password;

                //// Signin button.
                this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "4020");
                this.myMauiCoreControl = this.myControls.Get_MauiControl(this.mauiWindow);
                this.myMauiCoreControl.Click();
            }
            catch (MitabaseException me)
            {
#if debug
                throw new BuildSanityBusinessLogicException(me.Message + Environment.NewLine + "ExistingUserSignIn." + Environment.NewLine + "MitabaseException");
#endif
                throw new BuildSanityBusinessLogicException(me.Message);
            }
            catch (Exception e)
            {
#if debug
                throw new BuildSanityBusinessLogicException(e.Message + Environment.NewLine + e.Message + Environment.NewLine + "ExistingUserSignIn.");
#endif
                throw new BuildSanityBusinessLogicException(e.Message);
            }
        }
コード例 #2
0
        public void click()
        {
            IntPtr hid = handleid("msn");

            //System.Threading.Thread.Sleep(2000);
            this.myHtmlDoc = this.cls.Get_HtmlDocumentToWindow(hid, "Name", "mstest_eses_1009");
            Maui.Core.WinControls.Button objExactControl = this.c2.Get_MauiButton(this.myHtmlDoc);
            if (objExactControl.IsEnabled)
            {
                objExactControl.Click();
                Thread.Sleep(2000);
            }

            try
            {
                this.myHtmlDoc = this.cls.Get_HtmlDocumentToWindow(hid, "AutomationId", "4019");
                Maui.Core.WinControls.TextBox objExactControl4 = this.c2.Get_text(this.myHtmlDoc);
            }
            catch (Exception ex)
            {
                this.myHtmlDoc = this.cls.Get_HtmlDocumentToWindow(hid, "AutomationId", "5001");
                Maui.Core.WinControls.Control objExactControl2 = this.c2.Get_MauiControl(this.myHtmlDoc);
                objExactControl2.Click();
                this.click();
            }
        }
コード例 #3
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.mauiControl = null;
 }
コード例 #4
0
        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();
        }
 /// <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.mauiTextBox = null;
     this.mauiControl = null;
     this.messageIcon = null;
 }
コード例 #6
0
 /// <summary>
 /// This function explecitely close the model dialogue.
 /// </summary>
 /// <param name="windowHandle">Window handle.</param>
 public void CloseModeldialogue(object windowHandle)
 {
     try
     {
         Thread.Sleep(4000);
         this.mauiWindow = this.myWindow.Get_WindowToSpecificControl((IntPtr)windowHandle, "AutomationId", "2355");
         Maui.Core.WinControls.Control objExactControl = this.myControls.Get_MauiControl(this.mauiWindow);
         objExactControl.Click();
     }
     catch (Exception)
     {
         return;
     }
 }
 /// <summary>
 /// Implements Dispose methode of IDisposable interface.
 /// </summary>
 public void Dispose()
 {
     this.myWindow.Dispose();
     this.myWindow = null;
     this.objQuickBrowserSignin.Dispose();
     this.objQuickBrowserSignin = null;
     this.myControls            = null;
     this.objExecuteMSI         = null;
     this.mauiWindow            = null;
     this.myMauiCoreControl     = null;
     this.myMauiCoreTextBox     = null;
     this.myMauiCoreButton      = null;
     this.mauiControl           = null;
 }
コード例 #8
0
 /// <summary>
 /// Implements Dispose methode of IDisposable interface.
 /// </summary>
 public void Dispose()
 {
     this.myControls = null;
     this.myWindow.Dispose();
     this.myWindow          = null;
     this.mauiWindow        = null;
     this.myHtmlDoc         = null;
     this.mauiControl       = null;
     this.myHtmlButton      = null;
     this.myHtmlRadioButton = null;
     this.myHtmlTextBox     = null;
     this.myHtmlControl     = null;
     this.myHtmlSelectBox   = null;
 }
コード例 #9
0
 /// <summary>
 /// This function explecitely close the FinishPage model dialogue.
 /// </summary>
 /// <param name="windowHandle">Window handle.</param>
 public void CloseModeldialogue(object windowHandle)
 {
     try
     {
         Thread.Sleep(4000);
         this.mauiWindow = this.myWindow.Get_WindowToSpecificControl((IntPtr)windowHandle, "AutomationId", "2355");
         Maui.Core.WinControls.Control objExactControl = this.myControls.Get_MauiControl(this.mauiWindow);
         Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgRestartOptionModelFound, Logger.CommentType.Message);
         objExactControl.Click();
     }
     catch (Exception)
     {
         return;
     }
 }
コード例 #10
0
        /// <summary>
        /// This function is for signing out a user.
        /// </summary>
        /// <param name="requiredProcessName">the required process name.</param>
        public void Sign_Out(string requiredProcessName)
        {
            try
            {
                Thread.Sleep(8000);
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);

                //// Close(X) button.
                this.mauiWindow  = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "61536");
                this.mauiControl = this.myControls.Get_MauiControl(this.mauiWindow);
                this.mauiControl.Click();
                Thread.Sleep(1000);

                //// Signout ok button.
                this.mauiWindow  = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "1");
                this.mauiControl = this.myControls.Get_MauiControl(this.mauiWindow);
                this.mauiControl.Click();

                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignOutSuccessful, Logger.CommentType.Pass);
            }
            catch (MitabaseException me)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignOutUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignOutFail + Environment.NewLine + me.Message + Environment.NewLine + "SignOut." + Environment.NewLine + "MitabaseException");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignOutFail);
            }
            catch (Exception e)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignOutUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignOutFail + Environment.NewLine + e.Message + Environment.NewLine + "SignOut.");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignOutFail);
            }
        }
        /// <summary>
        /// Function will signing in the MSNPC.
        /// </summary>
        /// <param name="email">User e-mail</param>
        /// <param name="password">User password</param>
        /// <param name="requiredProcessName">Process to find.</param>
        /// <param name="version">Build version</param>
        /// <param name="locale">Susii locale</param>
        public void SignInExistingUser(string email, string password, string requiredProcessName, string version, string locale)
        {
            try
            {
                //// Dialogue Box for making MSN as your default explorer.
                try
                {
                    Thread.Sleep(2000);
                    //// CheckBox(Do not ask again).
                    this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                    this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "1001");
                    this.mauiControl       = this.myControls.Get_MauiControl(this.mauiWindow);
                    this.mauiControl.Click();

                    //// No Button.
                    this.mauiWindow  = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "7");
                    this.mauiControl = this.myControls.Get_MauiControl(this.mauiWindow);
                    this.mauiControl.Click();
                }
                catch (Exception)
                {
                    //// Do Nothing
                }

                int count = 0;
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);

                //// Function to select user.
                this.SearchAndClickUser(this.msnWindowHandleId, "Name", email, requiredProcessName, ref count);

                //// Verify quick web access checkbox is checked or not.
                this.objQuickBrowserSignin.VerifyQuickWebAccess(version, requiredProcessName);

                //// Function to enter password and click on signin button.
                this.ProvidePassword(password, requiredProcessName);
                Thread.Sleep(80000);

                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                try
                {
                    //// Phishing dialogue ok button.
                    this.mauiWindow  = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "2337");
                    this.mauiControl = this.myControls.Get_MauiControl(this.mauiWindow);
                    this.mauiControl.Click();
                    Thread.Sleep(2000);
                }
                catch (Exception)
                {
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgNoPhishingDialogue, Logger.CommentType.Message);
                }

                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignInSuccessful, Logger.CommentType.Pass);

                //// Verify Redirection URL
                this.objQuickBrowserSignin.VerifyRedirectionURL(version, requiredProcessName, locale);
            }
            catch (MitabaseException me)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignInUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignInFail + Environment.NewLine + me.Message + Environment.NewLine + "ExistingUserSignIn." + Environment.NewLine + "MitabaseException");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignInFail);
            }
            catch (Exception e)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignInUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignInFail + Environment.NewLine + e.Message + Environment.NewLine + "ExistingUserSignIn.");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.SignInFail);
            }
        }
        /// <summary>
        /// Function to compose and send mail
        /// Test case for composemail.
        /// </summary>
        /// <param name="requiredProcessName">required process name</param>
        /// <param name="accountEmail">account email</param>
        /// <param name="market">sussi locale</param>
        public void WriteandSendMail(string requiredProcessName, string accountEmail, string market)
        {
            System.Threading.Thread.Sleep(2000);

            try
            {
                //// Function to get Message icon.
                string iconSelected = this.GetClickableIcon(market);

                //// Select message icon from navigation bar
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "Name", "Main Toolbar");
                this.mauiToolbar       = this.myControls.Get_MauiToolBar(this.mauiWindow);

                try
                {
                    for (int i = 0; i < this.mauiToolbar.AccessibleObject.ChildCount; i++)
                    {
                        string searchMailIcon = this.mauiToolbar.AccessibleObject.Children[i].Name;

                        //// Search the message icon
                        if (searchMailIcon.Contains(iconSelected))
                        {
                            //// Click the selected message icon.
                            Maui.Core.ActiveAccessibility mailControl = this.mauiToolbar.AccessibleObject.Children[i];
                            mailControl.Click();
                        }
                    }
                }
                catch (Exception)
                {
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgMailButtonNotPresent, Logger.CommentType.Message);
                }

                Thread.Sleep(5000);
                try
                {
                    //// Check window
                    this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                    this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "7");
                    this.mauiControl       = this.myControls.Get_MauiControl(this.mauiWindow);
                    this.mauiControl.Click();
                }
                catch (Exception)
                {
                    //// Do nothing
                }

                Thread.Sleep(1000);
                try
                {
                    //// Junk email filter
                    this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                    this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "ClassName", "DirectUIHWND");
                    this.mauiWindow.Extended.AccessibleObject.Children[7].Click();
                }
                catch (Exception)
                {
                    //// Do nothing
                }

                Thread.Sleep(1000);
                //// Select and click the create message button.
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "Name", "Main Toolbar");
                this.mauiToolbar       = this.myControls.Get_MauiToolBar(this.mauiWindow);
                Maui.Core.ActiveAccessibility writeMessageControl = this.mauiToolbar.AccessibleObject.Children[0].Children[0];
                writeMessageControl.Click();
                Thread.Sleep(8000);
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSendMailDialogue, Logger.CommentType.Message);

                //// Get handle Id of compose mail dialogue box.
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);

                //// Fill To address
                this.mauiWindow       = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "1001");
                this.mauiTextBox      = this.myControls.Get_MauiTextBox(this.mauiWindow);
                this.mauiTextBox.Text = accountEmail + MessagesBuildSanitySmokeToolBL.msn;
                Thread.Sleep(2000);

                //// Enter Subject Line
                this.mauiWindow       = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "AutomationId", "1004");
                this.mauiTextBox      = this.myControls.Get_MauiTextBox(this.mauiWindow);
                this.mauiTextBox.Text = MessagesBuildSanitySmokeToolBL.MsgSubjectLine;
                Thread.Sleep(5000);

                //// Click on send message button.
                this.msnWindowHandleId = this.objExecuteMSI.Get_WindowHandle(requiredProcessName);
                this.mauiWindow        = this.myWindow.Get_WindowToSpecificControl(this.msnWindowHandleId, "Name", "Main Toolbar");
                this.mauiToolbar       = this.myControls.Get_MauiToolBar(this.mauiWindow);
                Maui.Core.ActiveAccessibility sendMessageControl = this.mauiToolbar.AccessibleObject.Children[0].Children[0];
                sendMessageControl.Click();
                Thread.Sleep(3000);

                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MessageSuccessfullySend, Logger.CommentType.Pass);
            }
            catch (BuildSanityBusinessLogicException bex)
            {
                Logger.AddComment(bex.Message, Logger.CommentType.Message);
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MessageNotSuccessfullySend, Logger.CommentType.Fail);
            }
            catch (Exception ex)
            {
                Logger.AddComment(ex.Message, Logger.CommentType.Message);
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MessageNotSuccessfullySend, Logger.CommentType.Fail);
            }
        }
コード例 #13
0
        /// <summary>
        /// This function is for executing test case MsnInstall_NewUser_Medium_dontrestart.
        /// Test case Install Msn With New User taking Medium components and No Restart at the end.
        /// </summary>
        /// <param name="windowHandle">Window Handle.</param>
        /// <param name="connection">Connection string.</param>
        /// <param name="partner">Partner string.</param>
        /// <param name="language">Language string</param>
        /// <param name="accountDetails">List having details of user account</param>
        public void MsnInstallNewUserMediumDoNotRestart(IntPtr windowHandle, string connection, string partner, string language, List <string> accountDetails)
        {
            //// OS Version
            int majorOsVersion = System.Environment.OSVersion.Version.Major;

            try
            {
                ////Run the test for partner screen if the selected susii is of BC01 or Q001.
                if (partner == "BC01" || partner == "Q001")
                {
                    this.myHtmlDoc    = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "idButtonNext");
                    this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                    this.myHtmlButton.Click();
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgPartnerScreenFound, Logger.CommentType.Message);
                }

                ////Select the option that user is connected to internet in case the susii is of ENUS, VZ01, Q001 or DELL.
                if (language == "ENUS" || language == "VZ01" || language == "Q001" || language == "DELL")
                {
                    this.myHtmlDoc = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "optLan", true);
                    if (this.myHtmlDoc.RawHtml.ToString().Contains("id=optLan"))
                    {
                        this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "optLan");
                        this.myHtmlButton.Click();
                        this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                        while (this.myHtmlButton.IsDisabled)
                        {
                            Thread.Sleep(3000);
                        }

                        this.myHtmlButton.Click();
                        while (this.myHtmlButton.IsDisabled)
                        {
                            Thread.Sleep(3000);
                        }
                    }
                }

                ////Select the option for creating a new user in EnterEmailAddressScreen window.
                this.myHtmlDoc = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "idButtonNext");
                if (partner != "Q002" && partner != "VZ02" && partner != "BC01")
                {
                    this.myHtmlRadioButton = this.myControls.Get_HtmlRadioButton(this.myHtmlDoc, "optNew");
                    this.myHtmlRadioButton.Click();
                }

                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                while (this.myHtmlButton.IsDisabled)
                {
                    Thread.Sleep(3000);
                }

                Thread.Sleep(3000);
                Thread emailThread = new Thread(new ParameterizedThreadStart(this.CloseEmailModeldialogue));
                emailThread.Start(windowHandle);
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgEnterEmailScreenFound, Logger.CommentType.Message);

                //// Select Dialup plan and goes through the ConfigureDialupNow window if the selected connection is Dialup.
                Thread.Sleep(20000);
                if (connection.ToLowerInvariant() == MessagesBuildSanitySmokeToolBL.DialUp)
                {
                    this.myHtmlDoc     = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "lbl_37B02038-553E-4691-AC3C-290EFE009E53");
                    this.myHtmlControl = this.myControls.Get_HtmlControl(this.myHtmlDoc, "lbl_37B02038-553E-4691-AC3C-290EFE009E53");
                    this.myHtmlControl.Click();
                    this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                    while (this.myHtmlButton.IsDisabled)
                    {
                        Thread.Sleep(3000);
                    }

                    this.myHtmlButton.Click();
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSelectMsnPlanWindowFound, Logger.CommentType.Message);

                    this.myHtmlDoc         = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "optLan");
                    this.myHtmlRadioButton = this.myControls.Get_HtmlRadioButton(this.myHtmlDoc, "optLan");
                    this.myHtmlRadioButton.Click();
                    this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                    this.myHtmlButton.Click();
                    Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgConfigureDialupScreenFound, Logger.CommentType.Message);
                }
                else
                {
                    //// Select Premium Plan
                    try
                    {
                        this.myHtmlDoc     = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "lbl_DD248418-D8DA-4D11-BD71-0A0ABE8D763C");
                        this.myHtmlControl = this.myControls.Get_HtmlControl(this.myHtmlDoc, "lbl_DD248418-D8DA-4D11-BD71-0A0ABE8D763C");
                        this.myHtmlControl.Click();
                        this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                        while (this.myHtmlButton.IsDisabled)
                        {
                            Thread.Sleep(3000);
                        }

                        this.myHtmlButton.Click();
                        Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSelectMsnPlanWindowFound, Logger.CommentType.Message);
                    }
                    catch (Exception)
                    {
                        ////do nothing
                    }
                }

                ////Enter the user details in Create your e-mail address and password window.
                Thread.Sleep(10000);
                this.myHtmlDoc                     = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "FirstName");
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "FirstName");
                this.myHtmlTextBox.Text            = accountDetails[0];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "LastName");
                this.myHtmlTextBox.Text            = accountDetails[1];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "MemberName");
                this.myHtmlTextBox.Text            = accountDetails[2];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "Password");
                this.myHtmlTextBox.Text            = accountDetails[3];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "ConfirmedPassword");
                this.myHtmlTextBox.Text            = accountDetails[4];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "SecretAnswer");
                this.myHtmlTextBox.Text            = accountDetails[5];
                this.myHtmlSelectBox               = this.myControls.Get_HtmlSelectBox(this.myHtmlDoc, "BirthDateMonth");
                this.myHtmlSelectBox.SelectedIndex = Convert.ToInt32(accountDetails[6]);
                this.myHtmlSelectBox               = this.myControls.Get_HtmlSelectBox(this.myHtmlDoc, "BirthDateDay");
                this.myHtmlSelectBox.SelectedIndex = Convert.ToInt32(accountDetails[7]);
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "BirthDateYear");
                this.myHtmlTextBox.Text            = accountDetails[8];
                this.myHtmlButton                  = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                this.myHtmlButton.Click();

                ////If the new user being created already exists, then take the first user from the choises given.
                while (this.myHtmlButton.IsDisabled)
                {
                    Thread.Sleep(3000);
                }

                this.myHtmlDoc = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "suggestedNamesText", true);
                Thread.Sleep(10000);
                if (this.myHtmlDoc.RawHtml.ToString().Contains("suggestedNamesText"))
                {
                    string strPage    = this.myHtmlDoc.RawHtml.ToString();
                    int    index      = strPage.IndexOf("suggestedNamesText");
                    int    inputIndex = strPage.IndexOf("INPUT", index);
                    int    tabIndex   = strPage.IndexOf("tabIndex", index);
                    string rbname     = strPage.Substring(inputIndex + 9, (tabIndex - (inputIndex + 10)));
                    this.myHtmlRadioButton = this.myControls.Get_HtmlRadioButton(this.myHtmlDoc, rbname);
                    this.myHtmlRadioButton.Click();
                    this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "Password");
                    this.myHtmlTextBox.Text = accountDetails[3];
                    this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "ConfirmedPassword");
                    this.myHtmlTextBox.Text = accountDetails[4];
                    accountDetails[2]       = rbname;
                    this.myHtmlButton.Click();
                    Thread.Sleep(5000);
                }

                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgCreteEmailAddScreenFound, Logger.CommentType.Message);

                ////Goes through Review_SignAgreement Window.
                this.myHtmlDoc          = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "signatureName");
                this.myHtmlControl      = this.myControls.Get_HtmlControl(this.myHtmlDoc, "signatureName");
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "signature");
                this.myHtmlTextBox.Text = this.myHtmlControl.InnerText;
                this.myHtmlButton       = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                while (this.myHtmlButton.IsDisabled)
                {
                    Thread.Sleep(3000);
                }

                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgReviewSignAggScreenFound, Logger.CommentType.Message);

                ////Fills the credit card details in Provide your credit card information window.
                this.myHtmlDoc       = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "CardType");
                this.myHtmlSelectBox = this.myControls.Get_HtmlSelectBox(this.myHtmlDoc, "CardType");
                this.myHtmlSelectBox.SelectedIndex = Convert.ToInt32(accountDetails[9]);
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "AccountNumber");
                this.myHtmlTextBox.Text            = accountDetails[10];
                this.myHtmlTextBox                 = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "CVV");
                this.myHtmlTextBox.Text            = accountDetails[11];
                this.myHtmlSelectBox               = this.myControls.Get_HtmlSelectBox(this.myHtmlDoc, "ExpirationMonth");
                this.myHtmlSelectBox.SelectedIndex = Convert.ToInt32(accountDetails[12]);
                this.myHtmlSelectBox               = this.myControls.Get_HtmlSelectBox(this.myHtmlDoc, "ExpirationYear");
                this.myHtmlSelectBox.SelectedIndex = Convert.ToInt32(accountDetails[13]);
                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgProvideCreditCardInfoWindowFound, Logger.CommentType.Message);

                ////Fills the billing address in Provide your billing address window.
                Thread.Sleep(10000);
                this.myHtmlDoc          = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "Street1");
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "Street1");
                this.myHtmlTextBox.Text = accountDetails[14];
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "City");
                this.myHtmlTextBox.Text = accountDetails[15];
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "State");
                this.myHtmlTextBox.Text = accountDetails[16];
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "PostalCode");
                this.myHtmlTextBox.Text = accountDetails[17];
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "PhonePrefix");
                this.myHtmlTextBox.Text = accountDetails[18];
                this.myHtmlTextBox      = this.myControls.Get_HtmlTextBox(this.myHtmlDoc, "PhoneNumber");
                this.myHtmlTextBox.Text = accountDetails[19];
                this.myHtmlButton       = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgProvideBillAddWindowFound, Logger.CommentType.Message);

                try
                {
                    this.mauiWindow  = this.myWindow.Get_WindowToSpecificControl(windowHandle, "AutomationId", "2354");
                    this.mauiControl = this.myControls.Get_MauiControl(this.mauiWindow);
                    if (this.mauiControl != null)
                    {
                        this.mauiControl.Click();
                        throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.CreditCardNumberNotUnique);
                    }
                }
                catch (BuildSanityBusinessLogicException bx)
                {
                    Logger.AddComment(bx.Message, Logger.CommentType.Message);
                    throw bx;
                }
                catch (Exception e)
                {
                    //// Do Nothing
                }

                Thread.Sleep(10000);
                this.myHtmlDoc    = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "idButtonNext");
                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                while (this.myHtmlButton.IsDisabled)
                {
                    Thread.Sleep(3000);
                }

                ////New user is created.
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgNewUserSignupCompWinFound, Logger.CommentType.Message);

                //// Select the type of Installation
                this.myHtmlDoc         = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "optMinimum");
                this.myHtmlRadioButton = this.myControls.Get_HtmlRadioButton(this.myHtmlDoc, "optMinimum");
                this.myHtmlRadioButton.Click();
                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgCustomizeInstallationScreenFound, Logger.CommentType.Message);

                ////Installs Premium Client
                this.myHtmlDoc    = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", "idButtonNext");
                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgReadyToDownloadScreenFound, Logger.CommentType.Message);

                //// Finish page screen.
                this.myHtmlDoc = this.myWindow.Get_HtmlDocumentToWindow(windowHandle, "ClassName", "Internet Explorer_Server", Localization.Finish[Localization.LocalizationIndex].ToString());
                Thread myThread = new Thread(new ParameterizedThreadStart(this.CloseModeldialogue));
                myThread.Start(windowHandle);

                //// Next Button.
                this.myHtmlButton = this.myControls.Get_HtmlButton(this.myHtmlDoc, "idButtonNext");
                while (this.myHtmlButton.IsDisabled)
                {
                    Thread.Sleep(3000);
                }

                this.myHtmlButton.Click();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgFinishPageScreenFound, Logger.CommentType.Message);

                myThread.Join();
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignUpSuccessful, Logger.CommentType.Pass);
            }
            catch (MitabaseException me)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignUpUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.InstallationFailNewUser + Environment.NewLine + me.Message + Environment.NewLine + "InstallMsnExistingUserMediumDoNotRestart." + Environment.NewLine + "MitabaseException");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.InstallationFailNewUser);
            }
            catch (Exception e)
            {
                Logger.AddComment(MessagesBuildSanitySmokeToolBL.MsgSignUpUnsuccessful, Logger.CommentType.Fail);
#if debug
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.InstallationFailNewUser + Environment.NewLine + e.Message + Environment.NewLine + "InstallMsnExistingUserMediumDoNotRestart.");
#endif
                throw new BuildSanityBusinessLogicException(BuildSanityBLExMessages.InstallationFailNewUser);
            }
        }