예제 #1
0
        public void Email_Test_SPP()
        {
            try
            {
                CRM_UAT_ServiceProviderPortal_Page spp_crm = new CRM_UAT_ServiceProviderPortal_Page(GetDriver());

                _driver.Navigate().GoToUrl(URLConfig.UAT_CRM);
                spp_crm.Email_LinkActivation(_driver);
            }

            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
예제 #2
0
        //[Parallelizable]

        public void SPP_CRM_validation()
        {
            try
            {
                CRM_UAT_ServiceProviderPortal_Page spp_crm = new CRM_UAT_ServiceProviderPortal_Page(GetDriver());

                _driver.Navigate().GoToUrl(URLConfig.UAT_CRM);
                spp_crm.CRM_SPP_TRN_SearchAndApproval(_driver);

                _test.Log(Status.Pass, "CRM_UAT_Validation" + " " + "PASSED");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
예제 #3
0
        public void OnboardingTest_CRO_Option()
        {
            OnBoarding_CRO_Selection_And_ChangeOfCircumstances_Scenarios Op = new OnBoarding_CRO_Selection_And_ChangeOfCircumstances_Scenarios(GetDriver());

            _driver.Navigate().GoToUrl(URLConfig.TestURL_ServiceProviderPortal);
            string url = _driver.Url;

            _test.Log(Status.Pass, "Service Provider Portal -URL :" + "    " + _driver.Url + "           " + "PASSED");
            AJAXCall.CheckPageIsLoaded(_driver);


            Op.StartOnboarding_Frontend_CRO(_driver);

            DateTime time               = DateTime.Now;
            string   fileName           = "Screenshot_" + time.ToString("h_mm_ss") + ".png";
            string   screenShotLocation = Capture(GetDriver(), fileName, true);


            Thread.Sleep(500);
            _test.Log(Status.Pass, "Snapshot below: " + _test.AddScreenCaptureFromPath(screenShotLocation + "\\Result_Tier\\Screenshots\\" + fileName));

            Thread.Sleep(1000);

            CRM_UAT_ServiceProviderPortal_Page spp_crm = new CRM_UAT_ServiceProviderPortal_Page(GetDriver());

            _driver.Navigate().GoToUrl(URLConfig.UAT_CRM);


            Thread.Sleep(1000);
            spp_crm.Email_LinkActivation(_driver);

            time               = DateTime.Now;
            fileName           = "Screenshot_" + time.ToString("h_mm_ss") + ".png";
            screenShotLocation = Capture(GetDriver(), fileName, true);
            Thread.Sleep(500);


            _test.Log(Status.Pass, "Snapshot below: " + _test.AddScreenCaptureFromPath(screenShotLocation + "\\Result_Tier\\Screenshots\\" + fileName));

            Thread.Sleep(1000);

            _driver.Navigate().GoToUrl(URLConfig.UAT_CRM);
            spp_crm.crm_uat_validation(_driver);
            _test.Log(Status.Pass, "CRM_UAT_Validation" + " " + "PASSED");
        }
        public void TuslaCRM_Approval()
        {
            webDriver.Navigate().GoToUrl(URLConfig.CRM_SPP_Frame);

            Thread.Sleep(800);
            if (AJAXCall.IsElementPresent(By.CssSelector(".idp:nth-child(4) .largeTextNoWrap")))
            {
                pobalOption_Select.Click();
            }
            userName.SendKeys(Credentials_Data.UserName);
            password.SendKeys(Credentials_Data.Password);

            signIN.Click();
            AJAXCall.WaitForReady(webDriver);

            Thread.Sleep(1000);

            CRM_TabOptions.Click();
            Thread.Sleep(1500);

            tuslaTab.Click();

            Thread.Sleep(500);
            webDriver.SwitchTo().DefaultContent();
            Thread.Sleep(2000);

            //webDriver.SwitchTo().Frame("contentIFrame1");
            webDriver.SwitchTo().Frame(0);
            Thread.Sleep(500);

            ViewSelectorContainer.Click();
            webDriver.FindElement(By.Id("crmGrid_findCriteria")).Click();
            Thread.Sleep(500);

            WebDriverWait wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));

            Thread.Sleep(1000);



            if (AJAXCall.IsElementPresent(By.Id("crmGrid_findCriteria")) || crmGrid_FindCriteria.Displayed)
            {
                //crmSearchGrid.Click();

                IWebElement clickwebforms = webDriver.FindElement(By.Id("crmGrid_findCriteria"));
                wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));


                IWebElement wb    = webDriver.FindElement(By.Id("crmGrid_findHintText"));
                var         value = wb.GetAttribute("style");

                AJAXCall.WaitForAjax();

                if (value.Contains("display: none;"))
                {
                    AJAXCall.WaitForAjax();

                    clickwebforms.Click();
                    if (value.Contains("display: none;"))
                    {
                        Thread.Sleep(1000);
                        clickwebforms.Click();

                        Thread.Sleep(900);
                        clickwebforms.SendKeys(Constant_functions.tuslaNumber);
                        AJAXCall.WaitForAjax();
                        clickwebforms.SendKeys(Keys.Enter);
                        Thread.Sleep(1000);
                    }
                }
                else
                {
                    Thread.Sleep(1000);
                    clickwebforms.Click();
                    if (value.Contains("display: inline;"))
                    {
                        Thread.Sleep(1000);
                        clickwebforms.Click();

                        Thread.Sleep(900);
                        clickwebforms.SendKeys(Constant_functions.tuslaNumber);

                        AJAXCall.WaitForAjax();
                        Thread.Sleep(1000);
                        clickwebforms.SendKeys(Keys.Enter);
                        Thread.Sleep(1000);
                    }
                }
            }
            Thread.Sleep(1000);

            wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));

            CRM_UAT_ServiceProviderPortal_Page tuslaCRMPage = new CRM_UAT_ServiceProviderPortal_Page(webDriver);

            tuslaCRMPage.OnBoardingAdmin();

            webDriver.SwitchTo().DefaultContent();

            Thread.Sleep(2000);
            webDriver.SwitchTo().Frame(0);

            webDriver.SwitchTo().ParentFrame();
            Thread.Sleep(2000);

            webDriver.SwitchTo().Frame(1);
            Thread.Sleep(2000);


            Thread.Sleep(2000);
            if (AJAXCall.IsElementPresent(By.XPath("//*[@id='FormSecNavigationControl - Icon']")))
            {
                NavigationFlyOut_Button.Click();
                Review_Click.Click();
            }

            else
            {
                Actions action = new Actions(webDriver);
                action.KeyDown(Keys.Control).SendKeys(Keys.End).Perform();
            }
            IJavaScriptExecutor js = (IJavaScriptExecutor)webDriver;

            js.ExecuteScript("window.scrollBy(0,250)", "");

            Thread.Sleep(1000);

            IWebElement chkBox_td = webDriver.FindElement(By.Id("eyp_markasapproved_d"));
            var         td        = chkBox_td.GetAttribute("class");

            Thread.Sleep(2000);

            approve_chkBox.Click();
            AJAXCall.WaitForAjax();
            Thread.Sleep(1000);

            webDriver.SwitchTo().DefaultContent();

            AJAXCall.WaitForAjax();
            Thread.Sleep(800);

            SaveAndClose.Click();
            webDriver.SwitchTo().Frame(1);

            Thread.Sleep(1000);
            // webDriver.SwitchTo().DefaultContent();
            AJAXCall.WaitForAjax();
        }
예제 #5
0
        public void BankApproval()
        {
            try
            {
                AJAXCall.WaitForAjax();

                Thread.Sleep(2000);
                tabCRM.Click();
                Thread.Sleep(1500);

                BankAccount_Link.Click();

                Thread.Sleep(2000);
                webDriver.SwitchTo().ParentFrame();

                Thread.Sleep(2000);
                webDriver.SwitchTo().Frame(0);



                //webDriver.FindElement(By.Id("crmGrid_findHintText")).Click();
                Thread.Sleep(500);
                webDriver.FindElement(By.Id("crmGrid_findCriteria")).Click();
                Thread.Sleep(500);

                WebDriverWait wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));
                Thread.Sleep(1000);



                if (AJAXCall.IsElementPresent(By.Id("crmGrid_findCriteria")) || crmGrid_FindCriteria.Displayed)
                {
                    //crmSearchGrid.Click();

                    IWebElement clickwebforms = webDriver.FindElement(By.Id("crmGrid_findCriteria"));
                    wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));


                    IWebElement wb    = webDriver.FindElement(By.Id("crmGrid_findHintText"));
                    var         value = wb.GetAttribute("style");

                    AJAXCall.WaitForAjax();


                    if (value.Contains("display: none;"))
                    {
                        AJAXCall.WaitForAjax();

                        clickwebforms.Click();
                        if (value.Contains("display: none;"))
                        {
                            Thread.Sleep(1000);
                            clickwebforms.Click();

                            Excel_Suite ex = new Excel_Suite(Env.BANK_NAME);
                            ex.getBankAccount("BankName");

                            Thread.Sleep(900);
                            clickwebforms.SendKeys(Env.BankName);

                            Thread.Sleep(1000);
                            clickwebforms.SendKeys(Keys.Enter);

                            AJAXCall.WaitForAjax();

                            arrowDown.Click();

                            Thread.Sleep(1000);
                            arrowDown.Click();
                        }
                    }

                    else
                    {
                        Thread.Sleep(1000);
                        clickwebforms.Click();
                        if (value.Contains("display: inline;"))
                        {
                            Thread.Sleep(1000);
                            clickwebforms.Click();

                            Excel_Suite ex = new Excel_Suite(Env.BANK_NAME);
                            ex.getBankAccount("BankName");

                            Thread.Sleep(900);
                            clickwebforms.SendKeys(Env.BankName);

                            Thread.Sleep(1000);
                            clickwebforms.SendKeys(Keys.Enter);

                            Thread.Sleep(1000);
                            arrowDown.Click();

                            Thread.Sleep(1000);
                            arrowDown.Click();
                        }
                    }
                }

                Thread.Sleep(1000);

                wait = new WebDriverWait(webDriver, TimeSpan.FromSeconds(800));
                CRM_UAT_ServiceProviderPortal_Page bankAccSearch = new CRM_UAT_ServiceProviderPortal_Page(webDriver);
                bankAccSearch.OnBoardingAdmin();

                webDriver.SwitchTo().DefaultContent();

                Thread.Sleep(2000);
                webDriver.SwitchTo().Frame("contentIFrame1");


                Thread.Sleep(5000);

                /* if (AJAXCall.IsElementPresent(By.XPath("//*[@id='FormSecNavigationControl - Icon']")))
                 * {
                 *
                 *   NavigationFlyOut_Button.Click();
                 *   Review_Click.Click();
                 * }
                 *
                 * else
                 * {
                 *   Actions action = new Actions(webDriver);
                 *   action.KeyDown(Keys.Control).SendKeys(Keys.End).Perform();
                 * } */


                crmContentLink.Click();

                IJavaScriptExecutor js = (IJavaScriptExecutor)webDriver;
                js.ExecuteScript("window.scrollBy(0, 380)", "");


                Thread.Sleep(3000);


                Thread.Sleep(1000);
                IWebElement chkBox_td = webDriver.FindElement(By.Id("eyp_markasapproved_d"));
                var         td        = chkBox_td.GetAttribute("class");

                Thread.Sleep(2000);
                approve_chkBox.Click();


                /*if(value_box.Contains("display: inline-block;"))
                 * {
                 *   approve_chkbox.Click();
                 *
                 * } */


                AJAXCall.WaitForAjax();
                Thread.Sleep(1000);

                webDriver.SwitchTo().ParentFrame();

                AJAXCall.WaitForAjax();
                Thread.Sleep(800);

                SaveAndClose.Click();
                webDriver.SwitchTo().Frame(1);

                AJAXCall.WaitForAjax();

                js.ExecuteScript("window.scrollBy(0,250)", "");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }