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.");
        }
示例#2
0
        public void editOffice()
        {
            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(99, 999);

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

            //Click on office name
            //            editOfficeHelper.ClickElement("ClickOnOfficeName");

            //Click on Click On Partner Agent
            editOfficeHelper.ClickElement("CreateNewbtn");

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

               //##########################  ADDRESS

            //Enter Address
              //      editOfficeHelper.Select("AddressType", "");

            //Enter AddressLine1
            editOfficeHelper.TypeText("AddressLine1", "FC-89");

            //Enter CITY
            editOfficeHelper.TypeText("CITY", "test");

            //Select Country
            editOfficeHelper.Select("SelectCountry", "Canada");
            editOfficeHelper.WaitForWorkAround(5000);

            // Select State
            editOfficeHelper.Select("SelectState", "BC");

            //Do Not Create Primary User
            editOfficeHelper.ClickElement("DoNotCreatePrimaryUser");

               //#SAVE
            editOfficeHelper.ClickElement("ClickOnSaveBtn");
            editOfficeHelper.WaitForWorkAround(5000);

            //Verify text on the page
            editOfficeHelper.VerifyPageText("Office created successfully.");
            editOfficeHelper.WaitForWorkAround(3000);

            //##################### Edit

            //Click on Edit
            editOfficeHelper.ClickElement("ClickOnEdit");
            editOfficeHelper.WaitForWorkAround(4000);

            //Enter DBAName
            editOfficeHelper.TypeText("DBAName", "TEST123");

            //Enter Website
            editOfficeHelper.TypeText("Website", "TEST.COM");

            //Enter OfficeCode
            editOfficeHelper.TypeText("OfficeCode", "12345");

            //Enter SysPrinNumber
            editOfficeHelper.TypeText("SysPrinNumber", "123456");

            //Enter FDNAgentNummber
            editOfficeHelper.TypeText("FDNAgentNummber", "2000");

            //Enter STWShortName
            editOfficeHelper.TypeText("STWShortName", "TEST");

            //Enter AssocaitionId
            editOfficeHelper.TypeText("AssocaitionId", "123");

            //Enter STWTransFreedomCode
            editOfficeHelper.TypeText("STWTransFreedomCode", "12345");

            //Enter OfficeCommanEmail
            editOfficeHelper.TypeText("OfficeCommanEmail", "*****@*****.**");

            //Enter VenderName
            editOfficeHelper.TypeText("VenderName", "VenderTEST");

            //Enter VenderName
            editOfficeHelper.TypeText("VenderCode", "1234");

            //Enter VenderName
            editOfficeHelper.TypeText("OfficephoneNumber", "1234567890");

            //Enter VenderName
            editOfficeHelper.TypeText("BusinessPhoneNumber", "1234567890");

            //Enter VenderName
            editOfficeHelper.TypeText("FaxNumber", "1234567890");

            //Enter VenderName
            editOfficeHelper.TypeText("LinkedURL", "Linked.com");

            //Enter VenderName
            editOfficeHelper.TypeText("FacebookURL", "Facebook.com");

            //Enter TwitterURL
            editOfficeHelper.TypeText("TwitterURL", "Twitter.com");

            //#################################### SAVE
            editOfficeHelper.ClickElement("OfficeEditBtn");
            editOfficeHelper.WaitForWorkAround(5000);
        }
示例#3
0
        public void deleteOfficeCorp()
        {
            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 editOfficeHelper = new EditOfficeHelper(GetWebDriver());

            //Variable random

              //  var usernae = "TESTUSER" + GetRandomNumber();
            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.");

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

            //Craete Office
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/offices/create");
            editOfficeHelper.WaitForElementPresent("Name",30);

            //Enter Name
            editOfficeHelper.TypeText("Name", "DELETE OFFICE");
            editOfficeHelper.WaitForElementPresent("AddressType", 30);

               //##########################  ADDRESS

            //Enter Address
            editOfficeHelper.Select("AddressType", "Office");

            //Enter AddressLine1
            editOfficeHelper.TypeText("AddressLine1", "FC-89");

            //Enter CITY
            editOfficeHelper.TypeText("CITY", "test");

            //Select Country
            editOfficeHelper.Select("SelectCountry", "Canada");
            editOfficeHelper.WaitForWorkAround(5000);

            // Select State
            editOfficeHelper.Select("SelectState", "BC");

            //Do Not Create Primary User
            editOfficeHelper.ClickElement("DoNotCreatePrimaryUser");

               //#SAVE
            editOfficeHelper.ClickElement("ClickOnSaveBtnNS");
            editOfficeHelper.WaitForWorkAround(5000);

            //Verify text on the page
            editOfficeHelper.VerifyPageText("Office created successfully.");
            editOfficeHelper.WaitForWorkAround(3000);

            //#####################

            //Enter Name To Search Office
            editOfficeHelper.TypeText("EnterNameToSrch", "DELETE OFFICE");
            editOfficeHelper.WaitForWorkAround(6000);

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

            //Click Delete to confirm
            editOfficeHelper.ClickElement("ConfrmDelbtn");
            editOfficeHelper.WaitForWorkAround(3000);
            editOfficeHelper.VerifyPageText("Office deleted successfully");
        }