//[TestMethod]
        public void sendEmailAdmin()
        {
            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());
            SendEmailAdminHelper sendEmailAdminHelper = new SendEmailAdminHelper(GetWebDriver());

            // Variable
            String name = "Testing Subject" + RandomNumber(1,99);
            String email = "Test" + RandomNumber(1,999)+ "@gmail.com.com";

            //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
            sendEmailAdminHelper.RedirectToAdmin();

            //################################# SEND E-MAIL #############################################

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

            VerifyTitle("Mails");

            // Click On send Email
            sendEmailAdminHelper.ClickElement("ClickOnSendEmail");

            //Verify title
            VerifyTitle("Compose");

            //Enter to
            sendEmailAdminHelper.TypeText("To", "*****@*****.**");
            //Enter Name
            sendEmailAdminHelper.TypeText("EnterSubjuct", name);

            //Click on importance
            sendEmailAdminHelper.ClickElement("importance");

            //Select Department
            sendEmailAdminHelper.TypeText("EnterMsgtxt", "This is testing description notes");

            //cLICK on Save
            sendEmailAdminHelper.ClickElement("ClickOnSend");

            //Wait for text
            sendEmailAdminHelper.WaitForText("E-Mail Sent Successfully.", 30);
        }
        public void createUserError1()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(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");

            //Go to Create user page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/users/create");

            //Verify title
            VerifyTitle("Create User");

            //Select User type
            partnerAgentHelperNewSkin.SelectByText("Usertype", "Employee");

            //Click on Create new
            partnerAgentHelperNewSkin.ClickElement("UserCreate");

            //Enter first name
            partnerAgentHelperNewSkin.TypeText("UserFirstName", "Aslam");

            //Enter last Name
            partnerAgentHelperNewSkin.TypeText("UserLastName", "Khan");

            //Enter existing user name
            partnerAgentHelperNewSkin.TypeText("Userusername", username[0]);

            //Enter primary email
            partnerAgentHelperNewSkin.TypeText("UserEmail", "*****@*****.**");

            //Click on 'Save' button
            partnerAgentHelperNewSkin.ClickElement("UserSave");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("This username already taken", 50);

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("Internal server error page");

            //Logout from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void createPDFPackage()
        {
            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 pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());

            //Variable random
            var name = "TESTCLIENT" + RandomNumber(1,999);

            //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");
            pDFTemplateAdminHelper.WaitForWorkAround(4000);

            //ClickOnPdfTab
            pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");

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

            //cLICK ON pdf
            pDFTemplateAdminHelper.ClickElement("ClickCreatePackage");
            pDFTemplateAdminHelper.WaitForWorkAround(2000);

            //Enter pakage name
            pDFTemplateAdminHelper.TypeText("PackageName","Test Pakage");

            //Select Module
            pDFTemplateAdminHelper.Select("SelectModule", "20");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);

            //Select
            pDFTemplateAdminHelper.Select("SelectPDFTemplate", "8760");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);

            //SelectCategoryPackage
            pDFTemplateAdminHelper.Select("SelectCategoryPackage", "336");

            //Save PDF Package
            pDFTemplateAdminHelper.ClickElement("SavePDFPakage");
            pDFTemplateAdminHelper.WaitForWorkAround(3000);
        }
        public void createLeadErrrorMessage()
        {
            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 leadNewSkinHelper = new LeadNewSkinHelper(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.");

            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/leads/create");

            //Verify title
            VerifyTitle("Create a Lead");

            //Verify no error message displayed
            loginHelper.VerifyTextNotAvailable("A Lead already exists with the same Company name/Contact Name/Phone Number. Would you like to Merge or Duplicate the Lead?");
        }
        public void createProcessor()
        {
            //   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 createProcessorHelper = new CreateProcessorHelper(GetWebDriver());

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

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

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

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

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

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

            //Click to Import
            createProcessorHelper.redirectToPage();

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

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

            //Enter Processor name
            createProcessorHelper.TypeText("ProcessorName", name);

            //Enter ProcessorCode
            createProcessorHelper.TypeText("ProcessorCode", Test);

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

            //Verify text present
            createProcessorHelper.VerifyPageText("The processor is successfully created!!");
            createProcessorHelper.WaitForWorkAround(3000);
        }
        public void merchantTabCorp()
        {
            string[] username = null;
            string[] password = null;

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

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

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

            //verify
            clientHelperNewSkin.VerifyPageText("Merchants");
            clientHelperNewSkin.WaitForWorkAround(3000);
        }
        public void pDFImportError()
        {
            string[] username = null;
            string[] password = null;

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

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());

            //Variable random
            var name = "TESTCLIENT" + RandomNumber(1,999);

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

            //ClickOnPdfTab
            pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates");
            pDFTemplateAdminHelper.WaitForWorkAround(2000);

            //Redirect To Import
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/import");

            //ChooseModule
            pDFTemplateAdminHelper.Select("ChooseModule", "20");

            var path = GetPathToFile() + "2.pdf";

            //bROWSER
            pDFTemplateAdminHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path);

            //Click import
            pDFTemplateAdminHelper.ClickElement("ClickOnImport");
            pDFTemplateAdminHelper.WaitForWorkAround(10000);

            //Select tab
            pDFTemplateAdminHelper.SelectByText("Tab", "Business Details");
            pDFTemplateAdminHelper.WaitForWorkAround(5000);

            //Verify fields availble under section
            pDFTemplateAdminHelper.SelectByText("Section", "Merchant Account Data");
            pDFTemplateAdminHelper.WaitForWorkAround(5000);

            //Verify fields under fields
            pDFTemplateAdminHelper.SelectByText("Fields", "Merchant Type");
        }
        public void createAndDeletePDFCategories()
        {
            string[] username = null;
               string[] password = null;

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

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

            //Initializing the objects
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            LoginAsCorpHelper loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            CreatePDFCategoriesHelper createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());

            //Variable random

            String  name = "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.");

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

            //Redirect To
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/categories");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Click on Click create button
            createPDFCategoriesHelper.ClickElement("ClickOnCreateBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

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

            //Click on Save Button
            createPDFCategoriesHelper.ClickElement("ClickOnSaveBtn");
            createPDFCategoriesHelper.WaitForWorkAround(6000);

            //Verify text present
            createPDFCategoriesHelper.VerifyPageText("Category Created Successfully");

            //Clcik on Delete
            createPDFCategoriesHelper.SearchAndClick(name);
            createPDFCategoriesHelper.AcceptAlert();
            createPDFCategoriesHelper.ClickDisplayed("//a[@title='Save']");
            createPDFCategoriesHelper.WaitForWorkAround(4000);
             //   GetWebDriver().Navigate().Refresh();

               createPDFCategoriesHelper.VerifyPageText("Category Replaced Successfully.");
        }
Beispiel #9
0
        public void createGroups()
        {
            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 createOfficeGrpAdminHelper = new CreateOfficeGrpAdminHelper(GetWebDriver());

            // Variable
            var name = "Test" + RandomNumber(1, 99);
            var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";

            //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
            createOfficeGrpAdminHelper.RedirectToAdmin();

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

            //Redirect To URL
            createOfficeGrpAdminHelper.RedirectToPage();

            //Verify title
            VerifyTitle("Groups");

            //################################# Create Master Category #############################################

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

            //Verify title
            VerifyTitle("Create a Group");

            //Enter Group Name
            createOfficeGrpAdminHelper.TypeText("GrpName", name);

            //Enter Description
            createOfficeGrpAdminHelper.TypeText("Description", "THIS IS TEST DESCRIPTION");

            //cLICK on Save
            createOfficeGrpAdminHelper.ClickElement("ClickOnSave");

            //Wait for text
            createOfficeGrpAdminHelper.WaitForText("Group has been saved.", 30);
        }
        public void pDFTemplatesPerminsions()
        {
            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
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            // Variable
            var name = "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
              //  clientBugsHelper.ClickElement("MouserHoverWelcome");

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

            //################################# PDF TEMPLATE TAB #############################################

            //Click on Terminal And Equipment Tab
            clientBugsHelper.ClickElement("ClickOnPDFTab");

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

            //Click on PDF
            clientBugsHelper.ClickElement("ClickPDF");

            //Click On Permisions
            clientBugsHelper.ClickElement("ClickOnPermisions");
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On None Of These
            clientBugsHelper.ClickElement("ClickOnNoneOfThese");

            //Click on Updtae
            clientBugsHelper.ClickElement("ClickOnUpdate");
            clientBugsHelper.WaitForWorkAround(2000);

            //Verify Text
            clientBugsHelper.VerifyPageText("Pdf Permissions Updated Successfully.");
        }
Beispiel #11
0
        public void createLanguage()
        {
            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 createLanguageHelper = new CreateLanguageHelper(GetWebDriver());

            //Variable
            var mail = "Test" + RandomNumber(1, 99) + "@yopmail.com";
            var numb = "12345678" + RandomNumber(10, 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.");

            //Redirect To Language
            createLanguageHelper.redirectToPage();

            //Verify title
            VerifyTitle("Languages");

            //Click On Create Btn
            createLanguageHelper.ClickElement("ClickOnCreateBtn");

            //Enter Language Name
            var lang = "AA_Lang" + RandomNumber(99,999);
            createLanguageHelper.WaitForWorkAround(5000);
            createLanguageHelper.TypeText("EnterName", lang);

            //Clcik on Master Data
            createLanguageHelper.ClickElement("ClickSave");

            //Clcik on Edit language
            createLanguageHelper.ClickElement("ClickOnEditLanguage");

            //Enter Language Name
            var Elang = "AAA" + RandomNumber(1,99);
            createLanguageHelper.TypeText("EnterLanguage", Elang);

            //ClickOn Edit Save Button
            createLanguageHelper.ClickElement("ClickOnSaveBtn");

            //Click On Del Lang
            createLanguageHelper.ClickElement("ClickOnDelLang");
        }
        public void importClientsFromCSV()
        {
            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 clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            //Variable

            var FirstName = "Test" + RandomNumber(1, 99);
            var LastName = "Tester" + RandomNumber(1, 99);
            var Number = "12345678" + RandomNumber(10, 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
            clientBugsHelper.ClickElement("ClientTab");
            clientBugsHelper.WaitForElementPresent("ClickOnImport", 20);

            //Click On Import
            clientBugsHelper.ClickElement("ClickOnImport");
            clientBugsHelper.WaitForWorkAround(2000);

            //Upload
            var Path = GetPathToFile() + "clientsamples(2).csv";
            clientBugsHelper.uploadCSVClient("SelectFile", Path);
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On Import
            clientBugsHelper.ClickElement("ClickOnImportClint");
            clientBugsHelper.WaitForWorkAround(3000);

            //Select Client Import
            //  clientBugsHelper.Select("SelectClientImport","47");
            clientBugsHelper.WaitForWorkAround(3000);

            //Residual Import Sel
            //clientBugsHelper.Select("ResidualImportSel", "");

            //ClickImprtProcess
            clientBugsHelper.ClickElement("ClickImprtProcess");
            clientBugsHelper.WaitForWorkAround(10000);
        }
        public void verifyAddAnotherVersionDisplay()
        {
            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
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var equiomentHelperAdmin = new EquiomentHelperAdmin(GetWebDriver());

            //Variable
            String  name = "Test" + RandomNumber(1,99);
            String Id = "12345" + 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
            equiomentHelperAdmin.ClickElement("MoveHover");

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

            //################################# Terminal And Equipment Tab #############################################

            //Click on Terminal And Equipment Tab
            equiomentHelperAdmin.ClickElement("ClickOnEquipmentTab");

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

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

            //################################# Create Equipments #############################################

            // Click On Create
            equiomentHelperAdmin.ClickElement("ClickOnCreate");
            equiomentHelperAdmin.WaitForWorkAround(3000);

            //Click on Add Another
            equiomentHelperAdmin.ClickElement("ClickAddAnother");

            //ClickAddAnother
            equiomentHelperAdmin.ClickElement("ClickAddAnother");
            equiomentHelperAdmin.WaitForWorkAround(3000);
        }
        public void createOfficeTeams()
        {
            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 createOfficeTeamAdmin = new CreateOfficeTeamAdmin(GetWebDriver());

            // Variable
            var name = "Testing" + RandomNumber(1, 99);
            var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";

            //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
            createOfficeTeamAdmin.RedirectToAdmin();

            //Redirect To URL
            createOfficeTeamAdmin.RedirectToPage();

            //Verify Title
            VerifyTitle("Teams");

            //################################# Create Master Category #############################################

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

            //Wait
            createOfficeTeamAdmin.WaitForWorkAround(3000);

            //Enter Name
            createOfficeTeamAdmin.TypeText("TeamName", name);

            //Select Department
            createOfficeTeamAdmin.Selectbytext("SelectDepartment", "IT");

            //cLICK on Save
            createOfficeTeamAdmin.ClickElement("ClickOnSave");

            //Wait for text
            createOfficeTeamAdmin.WaitForText("Team has been saved.", 30);
        }
Beispiel #15
0
        public void checkProcessor()
        {
            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());
            AddDocumentAdminHelper addDocumentAdminHelper = new AddDocumentAdminHelper(GetWebDriver());

            // Variable
            var Proname = "Product" + RandomNumber(100, 999);

            //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
            addDocumentAdminHelper.RedirectToAdmin();

            //Redirect to the master Processors page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/processor_types");

            //verify title
            VerifyTitle("Master Processors");

            //Get all processor count
            int processcount = addDocumentAdminHelper.GetProcessorCount("ProcessTable");

            //Get all processor
            string[] processor = addDocumentAdminHelper.GetAllProcessor("ProcessTable");

            //Redirect to the Create client page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create");

            //Verify title
            VerifyTitle("Create a Client");

            //Click on Bussiness details
            addDocumentAdminHelper.ClickElement("Bussiness");

            //Verify Count
            addDocumentAdminHelper.VerifyProcessCount("ProcessDropdown", processcount);

            //Verify all processor
            addDocumentAdminHelper.VerifyAllProcessor("ProcessDropdown", processor);
        }
        public void editThemeAdmin()
        {
            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 themeAdminHelper = new ThemeAdminHelper(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.");

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

            //Click on Agent in Topmenu
            themeAdminHelper.ClickElement("ClickOnSystemTab");

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

            //EnterThemeSearch
            themeAdminHelper.TypeText("EnterThemeSearch", "test234");
            themeAdminHelper.WaitForWorkAround(3000);

            //SelectFontSize
            themeAdminHelper.ClickElement("ClickEditTheme");
            themeAdminHelper.WaitForWorkAround(3000);

            //SelectFontSize
            themeAdminHelper.SelectDropDownByText("//*[@id='ThemeOption27Value']", "10px");

            //CLickSaveButton
            themeAdminHelper.ClickElement("CLickSaveButton");
            themeAdminHelper.WaitForWorkAround(3000);

            //Verify
            themeAdminHelper.VerifyPageText("Theme Configuration has been updated.");
            themeAdminHelper.WaitForWorkAround(3000);
        }
        public void createProcessorNewSkin()
        {
            string[] username = null;
            string[] password = null;

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

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

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

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

            //Click on Create
               clientHelperNewSkin.ClickElement("ClickOnCreateBtn");
               clientHelperNewSkin.WaitForWorkAround(3000);

               //Click save
               clientHelperNewSkin.ClickElement("ClickOnSavePro");
               clientHelperNewSkin.WaitForWorkAround(3000);

               //EnterProcessorName
               var procnam = "TestPro" + RandomNumber(1,99);
               clientHelperNewSkin.TypeText("EnterProcessorName",procnam);

               //EnterProcessorName
               var Code = "1" + RandomNumber(1, 99);
               clientHelperNewSkin.TypeText("EnterCode", Code);

            //Click save
               clientHelperNewSkin.ClickElement("ClickOnSavePro");
               clientHelperNewSkin.WaitForWorkAround(3000);

            //Verify
               clientHelperNewSkin.VerifyPageText("Processor is successfully created!!");
        }
        public void sendEmailFromOfficeCorp()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            // Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var editOfficeHelper = new EditOfficeHelper(GetWebDriver());

            //Variable random

            var username = "******" + GetRandomNumber();
            var name = "Test" + RandomNumber(1, 99);

            //Login with valid username and password
            editOfficeHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid username and password
            editOfficeHelper.TypeText("EnterPassword", "seWelcome2");

            //Login Button
            editOfficeHelper.ClickElement("ClickOnLoginButtojn");

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

            //Click on Agent in Topmenu
            editOfficeHelper.ClickElement("ClickOnOfficeTab");

            //################################# CREATE A agent   #############################################

            //Redirect to Office
            editOfficeHelper.redirectToPage();

            //Enter Name To Search Office
            editOfficeHelper.TypeText("EnterNameToSrch", "Selenium Office");
            editOfficeHelper.WaitForWorkAround(3000);

            //Click on Delete
            editOfficeHelper.ClickElement("ClickOnOffice");

            //Click Delete to confirm
            editOfficeHelper.ClickElement("ClickOfficeEmail");

            //Enter Subject
            editOfficeHelper.TypeText("EnterSubject", "Testing Email");

            //Enter Message
            editOfficeHelper.TypeText("Message", "This is testing message");

            //Click Send Button
            editOfficeHelper.ClickElement("SendEmailBtn");
            editOfficeHelper.WaitForWorkAround(2000);
            editOfficeHelper.VerifyPageText("Email Sent Successfully.");
        }
        public void fieldDictionaryFields()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(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.");

            //Go to Field Dictionary Fields page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/fields");

            //Verify Title
            VerifyTitle("Field Management");

               //Select Module
            partnerAgentHelperNewSkin.SelectByText("FSModule", "Clients");

            partnerAgentHelperNewSkin.WaitForWorkAround(3000);

            //Select Tab
            partnerAgentHelperNewSkin.SelectByText("FSTab", "Company Details");

            //Click on Search Button
            partnerAgentHelperNewSkin.ClickElement("FSSearch");

            //Verify field availabe
            partnerAgentHelperNewSkin.verifyElementPresent("FSFilter");

            //Enter  mail
            partnerAgentHelperNewSkin.TypeText("FSFilter", "Mail");

            //Click on Mail
            partnerAgentHelperNewSkin.ClickElement("FSMail");

            //Verify Manage button available
            partnerAgentHelperNewSkin.verifyElementPresent("FSManage");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
Beispiel #20
0
        public void addNotesAdmin()
        {
            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());
            AddNotesAdminHelper addNotesAdminHelper = new AddNotesAdminHelper(GetWebDriver());

            // Variable
            String name = "Testing Subject" + RandomNumber(1, 99);
            String email = "Test" + RandomNumber(1,999)+ "@gmail.com";

            //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
            addNotesAdminHelper.RedirectToAdmin();

            //################################# Corprate TAB #############################################

            //Click on Terminal And Equipment Tab
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/notes/create");

            //verify title
            VerifyTitle("Create a New Note");

            //################################# ADD NOTE #############################################

            //Enter Name
            addNotesAdminHelper.TypeText("EnterSubjuct", name);

            //Select Department
            //addNotesAdminHelper.TypeText("EnterDescription", "This is testing description notes");

            //cLICK on Save
            addNotesAdminHelper.ClickElement("ClickOnSave");
            addNotesAdminHelper.WaitForText("Note saved successfully.",30);
        }
        public void allAgentDisplayePage()
        {
            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 saleAgentRevenueAdjustmentHelper = new SaleAgentRevenueAdjustmentHelper(GetWebDriver());

            //Variable random
            var name = "TESTCLIENT" + RandomNumber(1,999);

            //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
            saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnAgentTab");
            saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000);

            //################################# CREATE A agent   #############################################

            //Click on Click On Partner Agent
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/agents");
               saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000);

            //Verify text
               VerifyTitle("selOffice's All Agents");
               saleAgentRevenueAdjustmentHelper.WaitForWorkAround(2000);

            //Select SelectUserType
            saleAgentRevenueAdjustmentHelper.Select("SelectUserType","Employee");
            saleAgentRevenueAdjustmentHelper.WaitForWorkAround(2000);

             //Select SelectUserType
            saleAgentRevenueAdjustmentHelper.Select("SelectUserType","1099 Sales Agent");
            saleAgentRevenueAdjustmentHelper.WaitForWorkAround(2000);

             //Select SelectUserType
            saleAgentRevenueAdjustmentHelper.Select("SelectUserType","Partner Agent");
            saleAgentRevenueAdjustmentHelper.WaitForWorkAround(2000);

             //Select SelectUserType
            saleAgentRevenueAdjustmentHelper.Select("SelectUserType","Partner Association");
            saleAgentRevenueAdjustmentHelper.WaitForWorkAround(2000);
        }
        public void createProductCategory()
        {
            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 createProductsCategoryHelper = new CreateProductsCategoryHelper(GetWebDriver());

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

            //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
            createProductsCategoryHelper.RedirectToAdmin();

            //Redirect To URL
            createProductsCategoryHelper.RedirectToPage();

            //Verify title
            VerifyTitle("Product Categories");

            //################################# Create Equipments #############################################

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

            createProductsCategoryHelper.WaitForWorkAround(3000);

            //Enter Name
            createProductsCategoryHelper.TypeText("Name", name);

            //######################## CLICK ON SAVE BUTTON  ########################################
            // Click on Save button
            createProductsCategoryHelper.ClickElement("SaveBtn");

            //wait for text
            createProductsCategoryHelper.WaitForText("Category Created Successfully", 30);

            //Search and click
            createProductsCategoryHelper.SearchAnclick(name);
        }
        public void pDFImportWizard()
        {
            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());
            PDFImportWizardHelper pDFImportWizardHelper = new PDFImportWizardHelper(GetWebDriver());

            // Variable
            String name = "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
            pDFImportWizardHelper.RedirectToAdmin();

            //Redirect
            pDFImportWizardHelper.RedirectToPage();

            //Verify title
            VerifyTitle("PDF Import Wizard");

            //Click on Import  button
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            //Choose Module
            pDFImportWizardHelper.Select("ChooseModule", "20");

            //Upload PDF File\
            String filename = GetPathToFile()+"2.pdf";
            pDFImportWizardHelper.upload("SelectFile", filename);

            //Click On Import
            pDFImportWizardHelper.ClickElement("ClickOnImport");

            pDFImportWizardHelper.WaitForWorkAround(10000);
            VerifyTitle("PDF Import Wizard");

            //Click On Next
            pDFImportWizardHelper.ClickElement("ClickOnNext");
            pDFImportWizardHelper.WaitForWorkAround(1000);
        }
        public void createPricingPlanAdmin()
        {
            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());
            CreatePrcingPlanHelperAdmin createPrcingPlanHelperAdmin = new CreatePrcingPlanHelperAdmin(GetWebDriver());

            //Variable
            String name = "100" + 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
            createPrcingPlanHelperAdmin.RedirectToAdmin();

            //Redirect To URL
            createPrcingPlanHelperAdmin.RedirectToPage();

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

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

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

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

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

            // Click On Create
            createPrcingPlanHelperAdmin.Selectbytext("Processor", "Chy Processor");

              //  Click on Save button
                createPrcingPlanHelperAdmin.ClickElement("SaveBtn");

            //Wait for text
                createPrcingPlanHelperAdmin.WaitForText("The pricing plan is successfully created!!", 30);
        }
        public void clientVerifyCanadaCountry()
        {
            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);

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

            //Select Mailing Country
            clientHelperNewSkin.Select("SelectMailingCountry","Canada");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //Select Location counrty
            clientHelperNewSkin.Select("SelectLocationCountry","Canada");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //SelectAddressCountry
            clientHelperNewSkin.Select("SelectAddressCountry","Canada");
            clientHelperNewSkin.WaitForWorkAround(3000);

            //Clkck on Owner tab
            clientHelperNewSkin.ClickElement("OwnerTab");
            //Select Owner Address country
            clientHelperNewSkin.Select("SelectOwnerAddressCountry","Canada");
            clientHelperNewSkin.WaitForWorkAround(3000);
        }
        public void addDocumentAdmin()
        {
            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());
            AddDocumentAdminHelper addDocumentAdminHelper = new AddDocumentAdminHelper(GetWebDriver());

            // Variable
            var name = "Testing Subject" + RandomNumber(1, 99);
            var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";

            //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
            addDocumentAdminHelper.RedirectToAdmin();

            //################################# Corprate TAB #############################################

            //Click on Terminal And Equipment Tab
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/documents/create");

            //verify title
            VerifyTitle("Create a New Document");

            //################################# ADD Document #############################################

            //Select displayed new window
            addDocumentAdminHelper.TypeText("Name", "TEST DOCUMENT");

            //Upload doc
            String Filename = GetPathToFile() + "index.jpg";
            addDocumentAdminHelper.Upload("ClickToUpload", Filename);

            //Enter dESCRIPTION
               // addDocumentAdminHelper.TypeText("Description", "THIS IS DOCUMENT DESCRIPTION");

            //Click on Save button
            addDocumentAdminHelper.ClickElement("ClickOnSave");
            addDocumentAdminHelper.WaitForText("Document saved successfully.", 30);
        }
        public void createCategoryTickets()
        {
            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 createCategoryTicketsHelper = new CreateCategoryTicketsHelper(GetWebDriver());

            // Variable
            var name = "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
            createCategoryTicketsHelper.RedirectToAdmin();

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

            //Redirect To URL
            createCategoryTicketsHelper.RedirectToPage();

            //Verify title
            VerifyTitle("Master Data");
            //################################# Create Master Category #############################################

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

            //Verify title
            VerifyTitle("Create");

            //Enter Name
            createCategoryTicketsHelper.TypeText("Name", name);

            //cLICK on Save
            createCategoryTicketsHelper.ClickElement("SaveBtn");

            //Wait for text
            createCategoryTicketsHelper.WaitForText("Masterdata created successfully", 30);
        }
        public void createClientError()
        {
            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 partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(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.");

            //navigate to the Create client page.
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create");

            //verify title
            VerifyTitle("Create a Client");

            //Select Status
            partnerAgentHelperNewSkin.SelectByText("ClientStatus", "Agreement");

            //Select Responsibility
            partnerAgentHelperNewSkin.SelectByText("ClientRespo", "Aslam Khan");

            //Click on Company details tab
            partnerAgentHelperNewSkin.ClickElement("ClientCompany");

            //Verify field available for company DBA name
            partnerAgentHelperNewSkin.verifyElementPresent("ClientDBAName");

            //Enter DBA name
            partnerAgentHelperNewSkin.TypeText("ClientDBAName", "DBA");

            //Enter legal name
            partnerAgentHelperNewSkin.TypeText("ClientLegalName", RandomNumber(1,1000).ToString());

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("OfficeSave");

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("Already Exist");
        }
        public void blankSubjectValidation()
        {
            string[] username = null;
            string[] password = null;
            string[] log = null;
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(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.");

            //Visit to Opportunities page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/opportunities");

            //Verify title
            VerifyTitle("Opportunities");

               //Open an opportunities
            partnerAgentHelperNewSkin.ClickElement("OpenOpportunities");

            //Verify title
            VerifyTitle("Details");

            //Click on Add note button
            partnerAgentHelperNewSkin.ClickElement("AddNote");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("Create a Note", 30);

            //Click on Save button without subject
            partnerAgentHelperNewSkin.ClickElement("ClickOnSaveBtnAdjustmnet");

            //Verify validation message
            partnerAgentHelperNewSkin.verifyElementPresent("NoteError");
            partnerAgentHelperNewSkin.WaitForText("This field is required",30);

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void manageMultipleSysprins()
        {
            string[] username = null;
            string[] password = null;

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

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

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(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.");

            //Go to office code management
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/office_codes_management");

            //Verify title
            VerifyTitle("Office Codes Management");

             //Select Sysprins
            partnerAgentHelperNewSkin.SelectByText("SelectSys", "Sysprins");
            partnerAgentHelperNewSkin.WaitForWorkAround(3000);

            //Enter value1
            partnerAgentHelperNewSkin.TypeText("Value1", GetRandomNumber().ToString());

            partnerAgentHelperNewSkin.WaitForWorkAround(1000);

            //Click on Add button
            partnerAgentHelperNewSkin.ClickElement("AddAnother");

            //Enter value2
            partnerAgentHelperNewSkin.TypeText("Value2", GetRandomNumber().ToString());

            partnerAgentHelperNewSkin.WaitForWorkAround(1000);

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("RMPSave");
            //Click on Save button
            partnerAgentHelperNewSkin.WaitForText("Office codes updated successfully.", 30);
        }