Esempio n. 1
0
        public static void Init(TestContext context)
        {
            testContext    = context;
            driver         = Driver.Initialize(testContext.Properties["BrowserIEName"].ToString());
            freshStart     = new FreshStartHome(driver);
            commonhelper   = new WebObjectFunctions(driver);
            newEnroll      = new NewEnrollClient(driver);
            myPipeline     = new MyPipeline(driver);
            apiHelper      = new CommonAPIHelper(driver);
            pipelineSearch = new PipelineSearch(driver);
            string freshStartUrl = ConfigurationManager.AppSettings["FreshStartUrl"];

            newEnroll.NavigateToFreshStartHome(driver, freshStartUrl);
            Assert.IsTrue(commonhelper.ValidatateWebElementDisplayed(newEnroll.newEnroll_Subheading));
            Assert.IsTrue(commonhelper.ValidatateWebElementTextDisplayed(newEnroll.newEnroll_Subheading, ConfigurationManager.AppSettings["NewEnrollText"]));
            Assert.IsTrue(commonhelper.ValidatateWebElementDisplayed(newEnroll.newEnrollLoanNumber_Label));
            Assert.IsTrue(commonhelper.ValidatateWebElementTextDisplayed(newEnroll.newEnrollLoanNumber_Label, ConfigurationManager.AppSettings["LoanNumberText"]));
            Assert.IsTrue(commonhelper.ValidatateWebElementDisplayed(newEnroll.newEnrollLoanNumber_TextBox));
            Assert.IsTrue(commonhelper.ValidatateWebElementAttributeCheck(newEnroll.newEnrollLoanNumber_TextBox, ConfigurationManager.AppSettings["MaxLengthTenText"]));
            Assert.IsTrue(commonhelper.ValidatateWebElementAttributeCheck(newEnroll.newEnrollLoanNumber_TextBox, ConfigurationManager.AppSettings["NgPatternText"]));
            Assert.IsTrue(commonhelper.ValidatateWebElementAttributeCheck(newEnroll.newEnrollEntroll_Button, ConfigurationManager.AppSettings["DisabledText"]));
            newEnroll.EnterLoanNumber(driver, ConfigurationManager.AppSettings["LoanNumber"]);
            Assert.IsTrue(commonhelper.ValidatateWebRemovedElementAttributeCheck(newEnroll.newEnrollEntroll_Button, ConfigurationManager.AppSettings["DisabledText"]));
            newEnroll.NavigateToClientOption(driver);
            newEnroll.SelectFirstClient(driver);
        }
Esempio n. 2
0
        public FreshStartHome FillNewClient(IWebDriver driver)
        {
            common.ValidatateWebElementAttributeCheck(FreshStartSave_Button, "disabled=\"disabled\"");
            Actions actionLoanNumber = new Actions(driver);
            string  loanNumber       = common.RandomDigits(10);

            actionLoanNumber.MoveToElement(FreshStartLoanNumber_TextBox).Click().Perform();
            actionLoanNumber.MoveToElement(FreshStartLoanNumber_TextBox).SendKeys(loanNumber).Perform();
            Actions actionFirstName = new Actions(driver);

            actionFirstName.MoveToElement(FreshStartFirstName_TextBox).Click().Perform();
            actionFirstName.MoveToElement(FreshStartFirstName_TextBox).SendKeys("QAFirstname").Perform();
            Actions actionLastName = new Actions(driver);

            actionLastName.MoveToElement(FreshStartLastName_TextBox).Click().Perform();
            actionLastName.MoveToElement(FreshStartLastName_TextBox).SendKeys("QALastname").Perform();
            Actions actionEmail = new Actions(driver);

            actionEmail.MoveToElement(FreshStartEmail_TextBox).Click().Perform();
            actionEmail.MoveToElement(FreshStartEmail_TextBox).SendKeys("*****@*****.**").Perform();
            Actions actionPhone = new Actions(driver);

            actionPhone.MoveToElement(FreshStartPhone_TextBox).Click().Perform();
            actionPhone.MoveToElement(FreshStartPhone_TextBox).SendKeys("5868542986").Perform();
            Actions actionCurrentFICO = new Actions(driver);

            actionCurrentFICO.MoveToElement(FreshStartCurrentFICO_TextBox).Click().Perform();
            actionCurrentFICO.MoveToElement(FreshStartCurrentFICO_TextBox).SendKeys("123").Perform();
            Actions actionState = new Actions(driver);

            actionState.MoveToElement(FreshStartState_DropDown).Click().Perform();
            Actions actionState2 = new Actions(driver);

            actionState2.MoveToElement(FreshStartStateOption_DropDown).SendKeys("ARIZONA").Perform();
            actionState2.MoveToElement(FreshStartStateOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionStatus = new Actions(driver);

            actionStatus.MoveToElement(FreshStartStatus_DropDown).Click().Perform();
            Actions actionStatus2 = new Actions(driver);

            actionStatus2.MoveToElement(FreshStartStatusOption_DropDown).SendKeys("Back to Banker").Perform();
            actionStatus2.MoveToElement(FreshStartStatusOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionDLP = new Actions(driver);

            actionDLP.MoveToElement(FreshStartDesiredLoanProgram_DropDown).Click().Perform();
            Actions actionDLP2 = new Actions(driver);

            actionDLP2.MoveToElement(FreshStartDesiredLoanProgramOption_DropDown).SendKeys("HARP").Perform();
            actionDLP2.MoveToElement(FreshStartDesiredLoanProgramOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionLoanpurpose = new Actions(driver);

            actionLoanpurpose.MoveToElement(FreshStartLoanPurpose_DropDown).Click().Perform();
            Actions actionLoanpurpose2 = new Actions(driver);

            actionLoanpurpose2.MoveToElement(FreshStartLoanPurposeOption_DropDown).SendKeys("Purchase").Perform();
            actionLoanpurpose2.MoveToElement(FreshStartLoanPurposeOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionTargetFICO = new Actions(driver);

            actionTargetFICO.MoveToElement(FreshStartTargetFICO_TextBox).Click().Perform();
            actionTargetFICO.MoveToElement(FreshStartTargetFICO_TextBox).SendKeys("123").Perform();
            SelectMultipleStrategies(driver);
            Actions actionMortgageBanker = new Actions(driver);

            actionMortgageBanker.MoveToElement(FreshStartMortgageBanker_TextBox).Click().Perform();
            actionMortgageBanker.MoveToElement(FreshStartMortgageBanker_TextBox).SendKeys("ada").Perform();
            Actions actionMortgageBanker2 = new Actions(driver);

            actionMortgageBanker2.MoveToElement(FreshStartMortgageBankerOption_TextBox).Click().Perform();
            Actions actionLOLALoanStatus = new Actions(driver);

            actionLOLALoanStatus.MoveToElement(FreshStartLOALAMPLoanStatus_DropDown).Click().Perform();
            Actions actionLOLALoanStatus2 = new Actions(driver);

            actionLOLALoanStatus2.MoveToElement(FreshStartLOALAMPLoanStatusOption_DropDown).SendKeys("Initial Contact").Perform();
            actionLOLALoanStatus2.MoveToElement(FreshStartLOALAMPLoanStatusOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionQLMSLoan = new Actions(driver);

            actionQLMSLoan.MoveToElement(FreshStartQLMSLoan_DropDown).Click().Perform();
            Actions actionQLMSLoan2 = new Actions(driver);

            actionQLMSLoan2.MoveToElement(FreshStartLOALAMPLoanStatusOption_DropDown).SendKeys("Yes").Perform();
            actionQLMSLoan2.MoveToElement(FreshStartLOALAMPLoanStatusOption_DropDown).SendKeys(Keys.Return).Perform();
            Actions actionNotes = new Actions(driver);

            actionNotes.MoveToElement(FreshStartNotes_TextBox).Click().Perform();
            actionNotes.MoveToElement(FreshStartNotes_TextBox).SendKeys("This is a test to validate the Save button become able after filling all fields in the new client page").Perform();
            common.ValidatateWebRemovedElementAttributeCheck(FreshStartSave_Button, "disabled=\"disabled\"");
            Actions actionSave = new Actions(driver);

            actionSave.MoveToElement(FreshStartSave_Button).Click().Perform();

            return(new FreshStartHome(driver));
        }