public void createClientSectionMasterData()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
             //   string[] URL2 = oXMLData.getData("settings/URL", "application2");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Open application2 url
              //  Console.WriteLine("Second URL: " + URL2[0]);
            //    GetWebDriver().Navigate().GoToUrl(URL2[0]);

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            EditPrcingPlanHelperAdmin editPrcingPlanHelperAdmin = new EditPrcingPlanHelperAdmin(GetWebDriver());

            //Variable
            String name = "Test" + RandomNumber(99, 999);
            String num = "Test" + RandomNumber(1, 99);

            //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.");

            //#######################  MOVE HOVER TO THE WELCOME
            //Click on Move over
             //     editPrcingPlanHelperAdmin.ClickElement("MoveHover");

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/admin");

            //##################  Redirect To Url

            //Redirect To URL
            GetWebDriver().Navigate().GoToUrl("http://pegasus-test.info/selenium_corp/selenium_office/sections");

            Login(username[0], password[0]);

            // Verify title
            VerifyTitle("Section Management");
            //################################# Create Product tab #############################################

            //Select lead
            editPrcingPlanHelperAdmin.Selectbytext("SelectLeadDropDown", "Clients");

            //Click Create Btn
            editPrcingPlanHelperAdmin.ClickElement("ClickCreateBtn");
            editPrcingPlanHelperAdmin.WaitForWorkAround(4000);

            //Select TAB
            editPrcingPlanHelperAdmin.Selectbytext("SelectTabName", "Business Details");

            //Enter Name
            editPrcingPlanHelperAdmin.TypeText("EnterSectionName", name);

            //Click on save button
            editPrcingPlanHelperAdmin.ClickElement("SaveSecBtn");

            //Accept Alert
            editPrcingPlanHelperAdmin.AcceptAlert();
            editPrcingPlanHelperAdmin.WaitForWorkAround(4000);

            //Verify text Present
            editPrcingPlanHelperAdmin.WaitForText(name,30);

            //Go to Lead Tab
            GetWebDriver().Navigate().GoToUrl("http://pegasus-test.info/selenium_corp/selenium_office/leads");

            //Verify title
            VerifyTitle("Leads");

            //Click On Any Client
            editPrcingPlanHelperAdmin.ClickElement("ClickOnAnyClient");

            //Click on Company Details Tab
            editPrcingPlanHelperAdmin.ClickElement("ClickOnCompanyDetails");

            //Verify text present
            editPrcingPlanHelperAdmin.WaitForText(name,30);
        }
예제 #2
0
        public void editPricingPlanAdmin()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            EditPrcingPlanHelperAdmin editPrcingPlanHelperAdmin = new EditPrcingPlanHelperAdmin(GetWebDriver());

            //Variable
            String name = "Test" + RandomNumber(1, 99);
            String num = "Test" + RandomNumber(1, 99);

            //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.");

            //Click On  Admin
            editPrcingPlanHelperAdmin.RedirectToAdmin();

            //##################  Redirect To Url

            //Redirect To URL
            editPrcingPlanHelperAdmin.RedirectToPage();

            //Verify title
            VerifyTitle("Master Pricing Plans");

            //################################# Create Product tab #############################################

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

            //Verify title
            VerifyTitle("Manage Master Pricing Plans");

            //Enter Pricing Plan
            editPrcingPlanHelperAdmin.TypeText("PricingPlan", name);

              //  Click on Save button
             editPrcingPlanHelperAdmin.ClickElement("SaveBtn");
             editPrcingPlanHelperAdmin.WaitForWorkAround(3000);

            //########################  EDIT
            //Verify title
             VerifyTitle("Master Pricing Plans");

            //Click on Edit icon
             editPrcingPlanHelperAdmin.TypeText("Search", name);
             editPrcingPlanHelperAdmin.WaitForWorkAround(4000);

             //  Click on Edit button
             editPrcingPlanHelperAdmin.ClickElement("EditIcn");

            //Verify title
             VerifyTitle("Manage Master Pricing Plans");

             //Enter Pricing Plan
             editPrcingPlanHelperAdmin.TypeText("PricingPlan", num);

             //  Click on Save button
             editPrcingPlanHelperAdmin.ClickElement("SaveBtn");
             editPrcingPlanHelperAdmin.WaitForWorkAround(3000);
        }
        public void createClientTabsMasterData()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
            string[] URL2 = oXMLData.getData("settings/URL", "application2");
            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Open application2 url
             Console.WriteLine("Second URL: " + URL2[0]);
              GetWebDriver().Navigate().GoToUrl(URL2[0]);

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            EditPrcingPlanHelperAdmin editPrcingPlanHelperAdmin = new EditPrcingPlanHelperAdmin(GetWebDriver());

            //Variable
            String name = "Test" + RandomNumber(1, 99);
            String num = "Test" + RandomNumber(1, 99);

            //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.");

            //Click on Clients in Topmenu
            //            clientHelper.clickClients();

            //Click to open client info
               //         clientHelper.OpenClient();

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("http://pegasus-test.info/selenium_corp/selenium_office/admin");

            //Redirect To URL
            GetWebDriver().Navigate().GoToUrl("http://pegasus-test.info/selenium_corp/selenium_office/tabs");

            //Verify title
            VerifyTitle("Tabs Management");

            //################################# Create Product tab #############################################

            //Select lead
            editPrcingPlanHelperAdmin.Select("SelectLeadDropDown", "20");

            //Click Create Btn
            editPrcingPlanHelperAdmin.ClickElement("ClickCreateBtn1");
            editPrcingPlanHelperAdmin.WaitForWorkAround(1000);

            //Enter Name
            editPrcingPlanHelperAdmin.TypeText("EnterName", name);

            //Click on save button
            editPrcingPlanHelperAdmin.ClickElement("ClickSaveBtn");

            //Wait for text
            editPrcingPlanHelperAdmin.WaitForText("Tab Created Successfully", 30);

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("http://pegasus-test.info/selenium_corp/selenium_office/clients");

            //Verify title
            VerifyTitle("Clients");

            //Click On Any Client
            editPrcingPlanHelperAdmin.ClickElement("ClickOnAnyClient");

            //Verify title
            VerifyTitle("- Details");

            //Verify text present
            editPrcingPlanHelperAdmin.WaitForText(name,30);
        }