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

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper         = new LoginHelper(GetWebDriver());
            var clientHelper        = new ClientsHelper(GetWebDriver());
            var clientHelperNewSkin = new ClientHelperNewSkin(GetWebDriver());

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

            //Redirect To Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");
            clientHelperNewSkin.WaitForWorkAround(4000);

            //Click on Agent in Topmenu
            clientHelperNewSkin.ClickElement("ClickProductTabAdmin");

            //Redirect
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/products/categories");
            clientHelperNewSkin.WaitForWorkAround(3000);


            //Click Create Category Admin
            clientHelperNewSkin.ClickElement("ClickCreateCategoryAdmin");
            clientHelperNewSkin.WaitForWorkAround(4000);

            //EnterCategoryName
            var name = "Test" + RandomNumber(1, 999);

            clientHelperNewSkin.TypeText("EnterCategoryName", name);

            //Save Category
            clientHelperNewSkin.ClickElement("SaveCategoryAdmin");
            clientHelperNewSkin.WaitForWorkAround(4000);

            //Verify text
            clientHelperNewSkin.WaitForText("Category Created Successfully", 30);
            clientHelperNewSkin.WaitForWorkAround(4000);

            //Seacrh And Edit
            clientHelperNewSkin.SearchAndEdit(name);
            clientHelperNewSkin.WaitForWorkAround(5000);

            //Verify title
            VerifyTitle("Edit Category");

            //Click
            clientHelperNewSkin.ClickElement("ClickEditSaveBtnCa");
            clientHelperNewSkin.WaitForWorkAround(4000);
        }
Пример #2
0
        public void productIpage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper         = new LoginHelper(GetWebDriver());
            var clientHelper        = new ClientsHelper(GetWebDriver());
            var clientHelperNewSkin = new ClientHelperNewSkin(GetWebDriver());

            //VARIABLE
            var name = "TestEmployee" + GetRandomNumber();


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

            //Redirect To Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //Click Product Tab Admin
            clientHelperNewSkin.ClickElement("ClickProductTabAdmin");

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/products");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //ClickOnCreate
            clientHelperNewSkin.ClickElement("ClickOnCreate");

            //Enter ProductName
            clientHelperNewSkin.TypeText("EnterNamePrd", "ProductName");

            //SelectCategoryProd
            clientHelperNewSkin.Select("SelectCategoryProd", "93");

            //Click on Add Custom field
            clientHelperNewSkin.ClickElement("AddCustomField");

            clientHelperNewSkin.WaitForWorkAround(3000);
            //Enter field name
            clientHelperNewSkin.TypeText("EnterFeildName", "FieldSelect");

            //SelectFieldType
            clientHelperNewSkin.Select("SelectFieldType", "select");

            //ClickSaveProdBtn
            clientHelperNewSkin.ClickElement("ClickSaveProdBtn");

            //ClickSaveProdBtn
            clientHelperNewSkin.ClickElement("ClickSaveProdBtn");
            clientHelperNewSkin.WaitForWorkAround(3000);
            clientHelperNewSkin.WaitForText("Product Created Successfully", 30);
            clientHelperNewSkin.WaitForWorkAround(3000);
        }
Пример #3
0
        public void editClientNewSkin()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper         = new LoginHelper(GetWebDriver());
            var clientHelper        = new ClientsHelper(GetWebDriver());
            var clientHelperNewSkin = new ClientHelperNewSkin(GetWebDriver());

            //VARIABLE
            var name = "TestEmployee" + GetRandomNumber();


            //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 Agent in Topmenu
            clientHelperNewSkin.ClickElement("ClickOnClientTab");


            //ClickOnCreateClient
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //Select Status
            clientHelperNewSkin.Select("SelectClientStatus", "New");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //SelectResponsibilty
            clientHelperNewSkin.SelectDropDownByText("//*[@id='ClientAssignedUserId']", "Aslam Khan");

            //Save Client
            clientHelperNewSkin.ClickElement("ClickSaveClient");
            clientHelperNewSkin.WaitForWorkAround(3000);


            //EnterDBAName
            clientHelperNewSkin.TypeText("EnterDBAName", "Eidt DBA Name");

            //Save Client
            clientHelperNewSkin.ClickElement("ClickSaveClient");
            //clientHelperNewSkin.WaitForWorkAround(5000);

            //Verify
            clientHelperNewSkin.WaitForText("Client saved successfully.", 30);
            clientHelperNewSkin.WaitForWorkAround(3000);

//###############   EDIT CLIENT


            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients");


            //EnterCompanyDba
            clientHelperNewSkin.TypeText("EnterCompanyDba", "Eidt DBA Name");

            //ClickOnClient
            clientHelperNewSkin.ClickElement("ClickOnClient");

            //Click on company details
            clientHelperNewSkin.ClickElement("ClickOnCompanyDetailTab");

            //Enter Company CFO
            clientHelperNewSkin.TypeText("EnterCompanyCFO", "test CFO");


            //Click on Contact tab
            clientHelperNewSkin.ClickElement("ClickOnContactTab");

            //Enter Zip Code
            clientHelperNewSkin.TypeText("EnterZipCode", "60601");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //Save Client
            clientHelperNewSkin.ClickElement("ClickSaveClient");
            clientHelperNewSkin.WaitForWorkAround(3000);
        }