Example #1
0
        public static void welcome_SaveNContinue()
        {
            //Create BrowserWindow
            BrowserWindow Browind = new BrowserWindow();

            //Welcome Pane
            HtmlControl welPane = new HtmlControl(Browind);

            welPane.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "Welcome";

            //check checkbox
            HtmlCheckBox chkBox = new HtmlCheckBox(Browind);

            chkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "privacy_ack";

            //Save And Continue button
            HtmlControl SaveCont = new HtmlControl(Browind);

            SaveCont.SearchProperties[HtmlButton.PropertyNames.Id] = "ForwardButton_button";


            if (chkBox.Checked == false)
            {
                //Verify SaveNContinue button is unable
                Assert.IsFalse(SaveCont.Enabled);
                chkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true);
            }
            else
            {
                Assert.IsTrue(SaveCont.Enabled);
                Mouse.Click(SaveCont);
            }

            Browind.WaitForControlReady(50000);
        }
Example #2
0
        public static void Ereg_Release4Reference()
        {
            //Create BrowserWindow

            BrowserWindow browind = new BrowserWindow();

            //Agreement Pane
            browind.WaitForControlReady(20000);
            browind.SearchProperties[UITestControl.PropertyNames.Name] = "Release for Reference Checks and Verification of Information";

            //check checkbox
            HtmlCheckBox chkBox = new HtmlCheckBox(browind);

            chkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "ack3_agree";
            chkBox.DrawHighlight();


            //Button Save And Continue
            HtmlControl SaveCont = new HtmlControl(browind);

            SaveCont.SearchProperties[HtmlButton.PropertyNames.Id] = "ForwardButton_button";
            SaveCont.DrawHighlight();

            //chkBox.DrawHighlight();
            if (chkBox.Checked == false)
            {
                //Verify SaveNContinue button is unable
                Assert.IsFalse(SaveCont.Enabled);
                chkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true);
            }
            else
            {
                Assert.IsTrue(SaveCont.Enabled);
            }


            // Progress Meter

            HtmlCustom progress = new HtmlCustom(browind);

            progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter";
            bool   availabilty   = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists);
            string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW");

            if (workflowEvent == "S1PROSPECT")
            {
                Assert.IsTrue(availabilty, "Progress Meter is not showing");

                HtmlSpan bar = new HtmlSpan(browind);
                bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterlabel";
                string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText);
                Assert.AreEqual(percentage, "95%");
            }
            else
            {
                Assert.IsFalse(availabilty, "Progress Meter is showing");
            }

            //Click Save And Continue

            Mouse.Click(SaveCont);
            browind.WaitForControlReady(2000);
        }
Example #3
0
        public static void paycheck_Stub()
        {
            //Create BrowserWindow
            BrowserWindow browind = new BrowserWindow();

            browind.SearchProperties[UITestControl.PropertyNames.Name] = "Personal Information";

            /********************/
            /*Period of Resident*/
            /********************/
            HtmlEdit since = new HtmlEdit(browind);

            since.SearchProperties[HtmlEdit.PropertyNames.Id] = "current_from";
            //Get data from eReg
            string eRegSinceDate = (string)since.GetProperty(HtmlEdit.PropertyNames.Text);

            /******************************/
            /* Button "Save And Continue" */
            /******************************/
            HtmlInputButton btnSaveNCont = new HtmlInputButton(browind);

            btnSaveNCont.SearchProperties[HtmlInputButton.PropertyNames.Id] = "ForwardButton_button";

            //Verify if button Save and Continue is disable if mandatory field is empty
            if (eRegSinceDate == "")
            {
                Assert.IsFalse(btnSaveNCont.Enabled);
            }


            if (eRegSinceDate == "")
            {
                //Get data from KSN/Excel
                string KSNSinceDate = PersonalInformation1.ReadData(1, "RESIDENTPERIOD");
                if (KSNSinceDate == "")
                {
                    since.SetProperty(HtmlEdit.PropertyNames.Text, "01/1990");
                }
                else
                {
                    since.SetProperty(HtmlEdit.PropertyNames.Text, PersonalInformation1.ReadData(1, "RESIDENTPERIOD"));
                }
            }

            Mouse.MoveScrollWheel(-100);


            /***********************/
            /*Paycheck/Stub Address*/
            /***********************/

            //Checkbox
            HtmlCheckBox chk = new HtmlCheckBox(browind);

            chk.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "paycheck_current";
            if (chk.Checked == false)
            {
                chk.SetProperty(HtmlCheckBox.PropertyNames.Checked, true);
            }

            //Verify if the address is disable
            //Address
            HtmlEdit add = new HtmlEdit(browind);

            add.SearchProperties[HtmlEdit.PropertyNames.Id] = "Address_pay_clone";
            Assert.IsFalse(add.Enabled);

            HtmlEdit apt = new HtmlEdit(browind);

            apt.SearchProperties[HtmlEdit.PropertyNames.Id] = "AptSuite_pay_clone";
            Assert.IsFalse(apt.Enabled);

            HtmlEdit ct = new HtmlEdit(browind);

            ct.SearchProperties[HtmlEdit.PropertyNames.Id] = "city_pay_clone";
            Assert.IsFalse(ct.Enabled);

            HtmlComboBox st = new HtmlComboBox(browind);

            st.SearchProperties[HtmlComboBox.PropertyNames.Id] = "state_pay_clone";
            Assert.IsFalse(st.Enabled);

            HtmlEdit postal = new HtmlEdit(browind);

            postal.SearchProperties[HtmlEdit.PropertyNames.Id] = "zip_pay_clone";
            Assert.IsFalse(postal.Enabled);

            HtmlEdit z4 = new HtmlEdit(browind);

            z4.SearchProperties[HtmlEdit.PropertyNames.Id] = "zip_four_pay_clone";
            Assert.IsFalse(z4.Enabled);

            HtmlEdit county = new HtmlEdit(browind);

            county.SearchProperties[HtmlEdit.PropertyNames.Id] = "county_pay_clone";
            Assert.IsFalse(county.Enabled);

            HtmlComboBox country = new HtmlComboBox(browind);

            country.SearchProperties[HtmlComboBox.PropertyNames.Id] = "country_pay_clone";
            Assert.IsFalse(country.Enabled);

            HtmlEdit from = new HtmlEdit(browind);

            from.SearchProperties[HtmlEdit.PropertyNames.Id] = "pay_from_clone";
            Assert.IsFalse(from.Enabled);

            HtmlEdit to = new HtmlEdit(browind);

            to.SearchProperties[HtmlEdit.PropertyNames.Id] = "pay_to_clone";
            Assert.IsFalse(to.Enabled);

            /****************/
            /*Progress Meter*/
            /****************/

            HtmlCustom progress = new HtmlCustom(browind);

            progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter";
            bool   availabilty   = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists);
            string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW");

            if (workflowEvent == "S1PROSPECT")
            {
                Assert.IsTrue(availabilty, "Progress Meter is not showing");

                HtmlSpan bar = new HtmlSpan(browind);
                bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterlabel";
                string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText);
                Assert.AreEqual(percentage, "15%");
            }
            else
            {
                Assert.IsFalse(availabilty, "Progress Meter is showing");
            }

            Assert.IsTrue(btnSaveNCont.Enabled);
            Mouse.Click(btnSaveNCont);

            browind.WaitForControlReady(2000);
        }
        public static void eReg_EncryptionConsent()
        {
            //*****************/
            //Create browserwindow
            /*****************/
            BrowserWindow browind = new BrowserWindow();

            browind.SearchProperties[UITestControl.PropertyNames.Name] = "Encryption Consent";

            //Verify References pane is available
            HtmlControl EncryptionConsentPane = new HtmlControl(browind);

            EncryptionConsentPane.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "Encryption Consent";

            // CheckBox I have read, understand, and agree to the policy above.

            //check checkbox
            HtmlCheckBox checkBox = new HtmlCheckBox(browind);

            checkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "encrypt_consent_ack";
            checkBox.DrawHighlight();
            Mouse.Click(checkBox);


            //chkBox.DrawHighlight();
            if (checkBox.Checked == true)
            {
                //Verify SaveNContinue button is Enable

                Assert.IsTrue(checkBox.Enabled);
                checkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true);
                Mouse.Click(checkBox);
            }
            else
            {
                Assert.IsTrue(checkBox.Enabled, "I have read, understand, and agree to the policy above");
            }

            /*****************/
            /* Progress Meter*/
            /*****************/
            HtmlCustom progress = new HtmlCustom(browind);

            progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter";
            progress.DrawHighlight();
            bool   availabilty   = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists);
            string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW");

            if (workflowEvent == "S1PROSPECT")
            {
                Assert.IsTrue(availabilty, "Progress Meter is not showing");

                HtmlSpan bar = new HtmlSpan(browind);
                bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "progressmeterdiv";
                bar.DrawHighlight();
                string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText);
                Assert.AreEqual(percentage, "95%");
            }
            else
            {
                Assert.IsFalse(availabilty, "Progress Meter is showing");
            }


            //Click button Save And Continue
            HtmlSpan SaveAndContinue = new HtmlSpan(browind);

            SaveAndContinue.SearchProperties[HtmlSpan.PropertyNames.Id] = "ForwardButton_button";
            // SaveAndCountinue.DrawHighlight();
            Mouse.Click(SaveAndContinue);

            browind.WaitForControlReady(2000);
        }
        public static void workExperienceExmpt_SaveNContinue()
        {
            //Create BrowserWindow

            BrowserWindow browind = new BrowserWindow();

            //Work Experience Exmpt pane
            browind.WaitForControlReady(20000);
            browind.SearchProperties[UITestControl.PropertyNames.Name] = "Work Experience Exempt";

            //check checkbox
            HtmlCheckBox chkBox = new HtmlCheckBox(browind);

            chkBox.SearchProperties[HtmlCheckBox.PropertyNames.Id] = "Employer1_minMonths_claim";


            //Button Save And Continue
            HtmlControl SaveCont = new HtmlControl(browind);

            SaveCont.SearchProperties[HtmlButton.PropertyNames.Id] = "ForwardButton_button";

            if (chkBox.Checked == false)
            {
                //Verify SaveNContinue button is unable
                Assert.IsFalse(SaveCont.Enabled);
                chkBox.SetProperty(HtmlCheckBox.PropertyNames.Checked, true);
            }
            else
            {
                Assert.IsTrue(SaveCont.Enabled);
            }


            // Progress Meter

            HtmlCustom progress = new HtmlCustom(browind);

            progress.SearchProperties[HtmlCustom.PropertyNames.Id] = "progressmeter";
            bool   availabilty   = (bool)progress.GetProperty(HtmlCustom.PropertyNames.Exists);
            string workflowEvent = PersonalInformation1.ReadData(1, "WORKFLOW");

            if (workflowEvent == "S1PROSPECT")
            {
                Assert.IsTrue(availabilty, "Progress Meter is not showing");

                HtmlSpan bar = new HtmlSpan(browind);
                bar.SearchProperties[HtmlSpan.PropertyNames.Id] = "meterlabel";
                string percentage = (string)bar.GetProperty(HtmlSpan.PropertyNames.InnerText);
                //Assert.AreEqual(percentage, "55%");
                Assert.AreEqual(percentage, "50%");
            }
            else
            {
                Assert.IsFalse(availabilty, "Progress Meter is showing");
            }

            //Click Save And Continue

            Mouse.Click(SaveCont);
            browind.WaitForControlReady(2000);
        }