コード例 #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);
        }
コード例 #2
0
        public FreshStartHome ValidateReferralAndMortgageBanker(IWebDriver driver, string Option)
        {
            if (common.WaitUntilElementSelected(driver, FreshStartReferralYes_DropDown, 1).Text.Equals(Option))
            {
                Actions action = new Actions(driver);
                action.MoveToElement(FreshStartMortgageBanker_TextBox).Click().Perform();
                action.MoveToElement(FreshStartMortgageBanker_TextBox).SendKeys("ada").Perform();
                Actions action2 = new Actions(driver);
                action2.MoveToElement(FreshStartMortgageBankerOption_TextBox).Click().Perform();
            }
            else
            {
                common.ValidatateWebElementAttributeCheck(FreshStartMortgageBanker_TextBox, "disabled=\"disabled\"");
            }

            return(new FreshStartHome());
        }