public void pricingPlanPushToOffice()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var createPricingPlanHelper = new CreatePricingPlanHelper(GetWebDriver());

            //Variable
            var name = "Test" + GetRandomNumber();
            var Test = "New" + GetRandomNumber();

            //Login with valid credential  Username
            createPricingPlanHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            createPricingPlanHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            createPricingPlanHelper.ClickElement("ClickOnLoginButtojn");

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Residual Income tab
            createPricingPlanHelper.ClickElement("ClickMasterTab");

            //Click to Import
            createPricingPlanHelper.redirectToPage();

            //Click On Create
            createPricingPlanHelper.ClickElement("ClickOnCreate");

            //Enter Processor name
            createPricingPlanHelper.TypeText("PricingPlan", name);

            //Enter ProcessorCode
            createPricingPlanHelper.Select("SelectProcessor", "63");

            //Click On Save Btn
            createPricingPlanHelper.ClickElement("ClickOnSaveBtn");
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Click On Push Office
            createPricingPlanHelper.ClickElement("ClickOnPushOffice");
            createPricingPlanHelper.WaitForWorkAround(2000);

            createPricingPlanHelper.AcceptAlert();

            createPricingPlanHelper.WaitForWorkAround(5000);

            //##############################  LOGOUT ######################

              //Mover HoverWelcome
              createPricingPlanHelper.MouseHover("WelcomeMoveHover");

               // Logout button
               //   createPricingPlanHelper.ClickElement("LogouFrmCorp");
              GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout");
               createPricingPlanHelper.WaitForWorkAround(7000);

            //################### OFFICE SIDE

            //Login with valid credential  Username
            createPricingPlanHelper.TypeText("EnterUsernameOff", "AslamKhan");

            //Login with valid credential password
            createPricingPlanHelper.TypeText("EnterPasswordOff", "1qaz!QAZ");

            //Click On Login Button
            createPricingPlanHelper.ClickElement("ClickOnLoginButtojn");

            //Mover HoverWelcome
            createPricingPlanHelper.MouseHover("WelcomeMoveHover");

            // Click ON Admin
            createPricingPlanHelper.ClickElement("ClickOnAdmin");
            createPricingPlanHelper.WaitForWorkAround(4000);

            //Click On Mater
            createPricingPlanHelper.ClickElement("ClickOnMaterOff");

               //Redirect to Procesosr
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pricing_plans");

            //Search
            createPricingPlanHelper.TypeText("SearchPricingPlan", name);
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Verify Pricing Plan
            createPricingPlanHelper.VerifyPageText(name);
            createPricingPlanHelper.WaitForWorkAround(3000);
        }
Ejemplo n.º 2
0
        public void createPricingPlan()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var createPricingPlanHelper = new CreatePricingPlanHelper(GetWebDriver());

            //Variable
            var name = "Test" + GetRandomNumber();
            var Test = "New" + GetRandomNumber();

            //Login with valid credential  Username
            createPricingPlanHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            createPricingPlanHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            createPricingPlanHelper.ClickElement("ClickOnLoginButtojn");

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Residual Income tab
            createPricingPlanHelper.ClickElement("ClickMasterTab");

            //Click to Import
            createPricingPlanHelper.redirectToPage();

            //Click On Create
            createPricingPlanHelper.ClickElement("ClickOnCreate");

            //Enter Processor name
            createPricingPlanHelper.TypeText("PricingPlan", name);

            //Enter ProcessorCode
            createPricingPlanHelper.Select("SelectProcessor", "63");

            //Click On Save Btn
            createPricingPlanHelper.ClickElement("ClickOnSaveBtn");
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Click On Push Office
            createPricingPlanHelper.ClickElement("ClickOnPushOffice");
            createPricingPlanHelper.WaitForWorkAround(2000);

            createPricingPlanHelper.AcceptAlert();

            createPricingPlanHelper.WaitForWorkAround(5000);

            /*
            //##############################  LOGOUT ######################

            <<<<<<< HEAD
                       //Mover HoverWelcome
                       createPricingPlanHelper.MouseHover("WelcomeMoveHover");

                       // Logout button
                       createPricingPlanHelper.ClickElement("LogoutCorp");
                       createPricingPlanHelper.WaitForWorkAround(7000);

            //################### OFFICE SIDE

                       //Login with valid username and password
                       Login(username[0], password[0]);
                       Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                       //Verify Page title
                       VerifyTitle("Dashboard");
                       Console.WriteLine("Redirected at Dashboard screen.");
            =======
            //Mover HoverWelcome
            createPricingPlanHelper.MouseHover("WelcomeMoveHover");

            // Logout button
            createPricingPlanHelper.ClickElement("ClickOnWelcomeBack");
            createPricingPlanHelper.WaitForWorkAround(4000);

            //################### OFFICE SIDE
            >>>>>>> 2949be6d53360f8d6082d2d8fe93d932e7f64507

            //Login with valid credential  Username
            createPricingPlanHelper.TypeText("EnterUsernameOff", "AslamKhan");

            //Login with valid credential password
            createPricingPlanHelper.TypeText("EnterPasswordOff", "1qaz!QAZ");

            //Click On Login Button
            createPricingPlanHelper.ClickElement("ClickOnLoginButtojn");

            //Mover HoverWelcome
            createPricingPlanHelper.MouseHover("WelcomeMoveHover");

            // Click ON Admin
            createPricingPlanHelper.ClickElement("ClickOnAdmin");
            createPricingPlanHelper.WaitForWorkAround(4000);

                       //Redirect to Procesosr
                       createPricingPlanHelper.redirectToAdminAmex();   */

            //Click On Mater
            createPricingPlanHelper.ClickElement("ClickOnMaterOff");

            //Redirect to Procesosr
            createPricingPlanHelper.redirectToAdminAmex();
        }
        public void editAndDeletePricingPlan()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var createPricingPlanHelper = new CreatePricingPlanHelper(GetWebDriver());

            //Variable
            var name = "Test" + RandomNumber(99, 999);
            var Test = "New" + RandomNumber(99, 999);

            //Login with valid credential  Username
            createPricingPlanHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            createPricingPlanHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            createPricingPlanHelper.ClickElement("ClickOnLoginButtojn");

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Click on Residual Income tab
            createPricingPlanHelper.ClickElement("ClickMasterTab");

            //Click to Import
            createPricingPlanHelper.redirectToPage();

            //Click On Create
            createPricingPlanHelper.ClickElement("ClickOnCreate");

            //Enter Processor name
            createPricingPlanHelper.TypeText("PricingPlan", name);

            //Enter ProcessorCode
            createPricingPlanHelper.Select("SelectProcessor", "63");

            //Click On Save Btn
            createPricingPlanHelper.ClickElement("ClickOnSaveBtn");
            createPricingPlanHelper.WaitForWorkAround(4000);

            //Search
            createPricingPlanHelper.TypeText("SearchPricingPlan", name);
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Click on Edit
            createPricingPlanHelper.ClickElement("ClickOnEdit");

            //Save Edit
            createPricingPlanHelper.ClickElement("SaveEditBtn");
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Verify Text
            createPricingPlanHelper.VerifyPageText("The pricing plan is already exists.");

            //Enter Processor name
            String NewNmae = "New Name" + RandomNumber(1,999);
            createPricingPlanHelper.TypeText("PricingPlan", NewNmae);

            //Enter ProcessorCode
            createPricingPlanHelper.Select("SelectProcessor", "63");

            //Save Edit
            createPricingPlanHelper.ClickElement("SaveEditBtn");
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Verify text present
            createPricingPlanHelper.VerifyPageText("The pricing plan is successfully updated!!");

            //Click to Delete pricing
            createPricingPlanHelper.ClickElement("DeletePricing");

            //Click ok to confirm
            createPricingPlanHelper.AcceptAlert();
            createPricingPlanHelper.WaitForWorkAround(3000);

            //Verify page text
            createPricingPlanHelper.VerifyPageText("The pricing plan is successfully deleted!!");
            createPricingPlanHelper.WaitForWorkAround(3000);
        }