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 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); }