public void verifyDocumentDisplayedColumnIssue() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_DocumentHelper = new OfficeActivities_DocumentHelper(GetWebDriver()); // Variable Random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Redirect To URL"); VisitOffice("documents"); officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify page title."); VerifyTitle("Documents"); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Click on advance filter."); officeActivities_DocumentHelper.ClickElement("AdvanceFilter"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Get text of all the displayed columns."); var text = officeActivities_DocumentHelper.GetTextByXpath("//*[@id='display_cols']"); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Print all column names on thr console."); Console.WriteLine(text); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify owner column present in displayed column."); Assert.IsTrue(text.Contains("Owner")); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify modified column present in displayed column."); Assert.IsTrue(text.Contains("Modified")); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Redirect To URL"); VisitOffice("documents"); officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify page title."); VerifyTitle("Documents"); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify owner column is visible on the page."); officeActivities_DocumentHelper.IsElementPresent("HeadOwner"); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify Modified column is visible on the page."); officeActivities_DocumentHelper.IsElementPresent("HeadModified"); //officeActivities_DocumentHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Logout from the application."); VisitCorp("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyDocumentDisplayedColumnIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Document Displayed Column Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Document Displayed Column Issue", "Bug", "Medium", "Activities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Document Displayed Column Issue"); TakeScreenshot("VerifyDocumentDisplayedColumnIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentDisplayedColumnIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyDocumentDisplayedColumnIssue"); string id = loginHelper.getIssueID("Verify Document Displayed Column Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentDisplayedColumnIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Document Displayed Column Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Document Displayed Column Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyDocumentDisplayedColumnIssue"); executionLog.WriteInExcel("Verify Document Displayed Column Issue", Status, JIRA, "Tasks Management"); } }
public void checkFieldRelationships() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); ExecutionLog executionLog = new ExecutionLog(); LoginHelper loginHelper = new LoginHelper(GetWebDriver()); AdminCheckFieldRelationshipsHelper adminHelper = new AdminCheckFieldRelationshipsHelper(GetWebDriver()); // Testing Variables string[] dateDropdownArray = { "Yesterday", "ThisWeek", "ThisMonth", "LastMonth", "ThisQuarter", "LastQuarter", "ThisYear", "LastYear", "Last12Months", "Custom" }; var name = "Testing Subject" + GetRandomNumber(); var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; try { // Initiating Test executionLog.Log("AdminCheckFieldRelationships", "Login"); Login(username[0], password[0]); executionLog.Log("AdminCheckFieldRelationships", "Write information"); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("AdminCheckFieldRelationships", "Checking Master Data Tab"); VerifyTitle("Dashboard"); executionLog.Log("AdminCheckFieldRelationships", "Verify Office admin"); VisitOffice("admin"); // Testing Rates and Fees Section executionLog.Log("AdminCheckFieldRelationships", "Checking Master Data Tab"); VisitOffice("rates_fees"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Checking Temp1234"); adminHelper.ClickElement("Temp1234"); executionLog.Log("AdminCheckFieldRelationships", "Wait"); adminHelper.WaitForWorkAround(6000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Processor Type"); adminHelper.SelectByText("ProcessorType", "First Data Omaha"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminCheckFieldRelationships", "Clicking FirstDataOmahaOption"); adminHelper.ClickElement("FirstDataOmahaOption"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Waiting for DiscountCollected"); adminHelper.ElementVisible("DiscountCollected"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking FirstDataNorthOption"); adminHelper.ClickElement("FirstDataNorthOption"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking DiscountFrequency"); adminHelper.ElementVisible("DiscountFrequency"); VisitOffice("user_statistics"); adminHelper.WaitForWorkAround(3000); for (int i = 0; i < dateDropdownArray.Length - 1; i++) { executionLog.Log("AdminCheckFieldRelationships", "Clicking DateDropDown"); adminHelper.ClickElement("DateDropDown"); executionLog.Log("AdminCheckFieldRelationships", ("Clicking" + dateDropdownArray[i])); adminHelper.ClickElement(dateDropdownArray[i]); executionLog.Log("AdminCheckFieldRelationships", "Wait"); adminHelper.WaitForWorkAround(3000); } VisitOffice("tickets/settings"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking ReportingTimeStamp"); adminHelper.ClickElement("ReportingTimeStamp"); executionLog.Log("AdminCheckFieldRelationships", "Clicking StatusChangeOption"); adminHelper.ClickElement("StatusChangeOption"); executionLog.Log("AdminCheckFieldRelationships", "Waiting for SelectStatus"); adminHelper.ElementVisible("SelectStatus"); executionLog.Log("AdminCheckFieldRelationships", "Clicking ClosedTimeStamp"); adminHelper.ClickElement("ClosedTimeStamp"); executionLog.Log("AdminCheckFieldRelationships", "Clicking StatusChangeTimeStamp"); adminHelper.ClickElement("StatusChangeTimeStamp"); executionLog.Log("AdminCheckFieldRelationships", "Waiting for SelectStatus"); adminHelper.ElementVisible("SelectStatus"); VisitOffice("sections"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking SelectModule"); adminHelper.ClickElement("SelectModule"); executionLog.Log("AdminCheckFieldRelationships", "Clicking ClientsOption"); adminHelper.ClickElement("ClientsOption"); executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyAddress"); adminHelper.ElementVisible("CompanyAddress"); executionLog.Log("AdminCheckFieldRelationships", "Clicking LeadsOption"); adminHelper.ClickElement("LeadsOption"); executionLog.Log("AdminCheckFieldRelationships", "Waiting for Processor"); adminHelper.ElementVisible("Processor"); executionLog.Log("AdminCheckFieldRelationships", "Clicking OpportunitiesOption"); adminHelper.ClickElement("OpportunitiesOption"); executionLog.Log("AdminCheckFieldRelationships", "Waiting for Details"); adminHelper.ElementVisible("Details"); executionLog.Log("AdminCheckFieldRelationships", "Wait"); VisitOffice("fields"); adminHelper.WaitForWorkAround(3000); adminHelper.SelectByText("Module", "Clients"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Search"); adminHelper.ClickElement("Search"); adminHelper.WaitForWorkAround(5000); executionLog.Log("AdminCheckFieldRelationships", "Waiting for AmexVolume"); adminHelper.ElementVisible("AmexVolume"); executionLog.Log("AdminCheckFieldRelationships", "Clicking Module"); adminHelper.ClickElement("Module"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Leads"); adminHelper.ClickElement("Leads"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Search"); adminHelper.ClickElement("Search"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminCheckFieldRelationships", "Waiting for Salutation"); adminHelper.ElementVisible("Salutation"); executionLog.Log("AdminCheckFieldRelationships", "Clicking Module"); adminHelper.ClickElement("Module"); executionLog.Log("AdminCheckFieldRelationships", "Wait"); adminHelper.WaitForWorkAround(3000); // Checking opportuniteis executionLog.Log("AdminCheckFieldRelationships", "Clicking Opportunities"); adminHelper.ClickElement("Opportunities"); executionLog.Log("AdminCheckFieldRelationships", "Wait"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Search"); adminHelper.ClickElement("Search"); adminHelper.WaitForWorkAround(4000); // Validating change executionLog.Log("AdminCheckFieldRelationships", "Waiting for OpportunityName"); adminHelper.ElementVisible("OpportunityName"); VisitOffice("field_order_management"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Module2"); adminHelper.ClickElement("Module2"); adminHelper.WaitForWorkAround(3000); // Viewing a client executionLog.Log("AdminCheckFieldRelationships", "Clicking Clients2"); adminHelper.ClickElement("Clients2"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Tab"); adminHelper.ClickElement("Tab"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyDetails2"); adminHelper.ClickElement("CompanyDetails2"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Section"); adminHelper.ClickElement("Section"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyDetails3"); adminHelper.ClickElement("CompanyDetails3"); adminHelper.WaitForWorkAround(5000); executionLog.Log("AdminCheckFieldRelationships", "Clicking Search2"); adminHelper.ClickElement("Search2"); adminHelper.WaitForWorkAround(5000); // Validating change executionLog.Log("AdminCheckFieldRelationships", "Waiting for BusinessDBAName"); adminHelper.ElementVisible("BusinessDBAName"); // Beginning Aslam's code for JIRA } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminCheckFieldRelationships"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Check Field Relationships"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Check Field Relationships", "Bug", "Medium", "Document page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Check Field Relationships"); TakeScreenshot("AdminCheckFieldRelationships"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminCheckFieldRelationships.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminCheckFieldRelationships"); string id = loginHelper.getIssueID("Admin Check Field Relationships"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminCheckFieldRelationships.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Check Field Relationships"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Check Field Relationships"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminCheckFieldRelationships"); executionLog.WriteInExcel("Admin Check Field Relationships", Status, JIRA, "Office Activities"); } }
public void verifyLabelSelectForMeeting() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyLabelSelectForMeeting", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyLabelSelectForMeeting", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyLabelSelectForMeeting", "Click on Activities >> meetings"); VisitOffice("meetings"); executionLog.Log("VerifyLabelSelectForMeeting", "Click on any Task"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); executionLog.Log("VerifyLabelSelectForMeeting", "Verify Select for category"); officeActivities_MeetingHelper.VerifyText("CategoryLabel", "Select"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyLabelSelectForMeeting"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Label Select For Meeting"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Label Select For Meeting", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Label Select For Meeting"); TakeScreenshot("VerifyLabelSelectForMeeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyLabelSelectForMeeting.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyLabelSelectForMeeting"); string id = loginHelper.getIssueID("Verify Label Select For Meeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyLabelSelectForMeeting.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Label Select For Meeting"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Label Select For Meeting"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyLabelSelectForMeeting"); executionLog.WriteInExcel("Verify Label Select For Meeting", Status, JIRA, "Office Activities"); } }
public void verifyingPricingPlanPushtoOfficeError() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corpMasterdata_PricingPlanHelper = new CorpMasterdata_PricingPlanHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); // Variable random var name = "Test" + GetRandomNumber(); var Test = "New" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Procing plan page"); VisitCorp("masterdata/pricing_plans"); VerifyTitle("Master Pricing Plans"); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Click On Push Office"); corpMasterdata_PricingPlanHelper.ClickElement("PushOffice"); corpMasterdata_PricingPlanHelper.WaitForWorkAround(2000); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Click Ok to Accept alert."); corpMasterdata_PricingPlanHelper.AcceptAlert(); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Verify 500 Interanl error not occured."); corpMasterdata_PricingPlanHelper.VerifyTextNotPresent("500 Internal Server Error"); executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Verify Success message for push to office"); corpMasterdata_PricingPlanHelper.WaitForText("Pricing Plans successfully pushed to offices.", 20); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyingPricingPlanPushtoOfficeError"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Pricing Plan Push to office error"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Pricing Plan Push to office error", "Bug", "Medium", "Corp Pricing plan page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Pricing Plan"); TakeScreenshot("VerifyingPricingPlanPushtoOfficeError"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingPricingPlanPushtoOfficeError.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyingPricingPlanPushtoOfficeError"); string id = loginHelper.getIssueID("Verify Pricing Plan Push to office error"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingPricingPlanPushtoOfficeError.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Pricing Plan Push to office error"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Pricing Plan Push to office error"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyingPricingPlanPushtoOfficeError"); executionLog.WriteInExcel("Verify Pricing Plan Push to Office error", Status, JIRA, "Corp Master Data"); } }
public void TicketDraftTester() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var ticketDraftHelper = new TicketDraftHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Test" + RandomNumber(99, 99999); var LName = "Test" + RandomNumber(99, 99999); var CDBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("TicketDraft", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("TicketDraft", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("TicketDraft", "Create a ticket"); VisitOffice("tickets/create"); ticketDraftHelper.WaitForWorkAround(2000); executionLog.Log("TicketDraft", "Input Subject Name"); ticketDraftHelper.TypeText("Subject", "TestDraft"); executionLog.Log("TicketDraft", "Select Client"); ticketDraftHelper.ClickElement("SelectClient"); ticketDraftHelper.ClickElement("FirstClient"); executionLog.Log("TicketDraft", "Select Client"); ticketDraftHelper.SelectByText("Status", "Open"); executionLog.Log("TicketDraft", "Save Draft"); ticketDraftHelper.ClickElement("Draft"); ticketDraftHelper.WaitForWorkAround(3000); executionLog.Log("TicketDraft", "Check Draft exist"); VisitOffice("tickets/draft"); ticketDraftHelper.WaitForWorkAround(2000); executionLog.Log("TicketDraft", "Search for draft"); ticketDraftHelper.TypeText("DraftSearch", "TestDraft"); ticketDraftHelper.WaitForWorkAround(2000); executionLog.Log("TicketDraft", "check exist"); ticketDraftHelper.clickByText("TestDraft"); ticketDraftHelper.WaitForWorkAround(2000); } catch (Exception e) { // Console.WriteLine("ERRROROOR"); // executionLog.Log("Error", e.StackTrace); // Status = "Fail"; // String counter = executionLog.readLastLine("counter"); // String Description = executionLog.GetAllTextFile("ticketDraft"); // String Error = executionLog.GetAllTextFile("Error"); // if (counter == "") // { // counter = "0"; // } // bool result = loginHelper.CheckExstingIssue("ticketDraft"); // if (!result) // { // if (Int16.Parse(counter) < 5) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // loginHelper.CreateIssue("ticketDraft", "Bug", "Medium", "Office page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); // string id = loginHelper.getIssueID("ticketDraft"); // TakeScreenshot("ticketDraft"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\ticketDraft"; // loginHelper.AddAttachment(location, id); // } // } // else // { // if (Int16.Parse(counter) < 5) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // TakeScreenshot("ticketDraft"); // string id = loginHelper.getIssueID("ticketDraft"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\ticketDraft"; // loginHelper.AddAttachment(location, id); // loginHelper.AddComment(loginHelper.getIssueID("ticketDraft"), "This issue is still occurring"); // } // } // JIRA = loginHelper.getIssueID("ticketDraft"); // executionLog.DeleteFile("Error"); // throw; //} //finally //{ // // executionLog.DeleteFile("ticketDraft"); // executionLog.WriteInExcel("ticketDraft", Status, JIRA, "Office"); //} } }
public void officeUserSkin() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); log = oXMLData.getData("settings/URL", "logout"); var name = "Office" + GetRandomNumber(); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); Console.WriteLine("Username = "******"Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Create office page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/offices/create"); //Verify title VerifyTitle("Create an Office"); //Enter name partnerAgentHelperNewSkin.TypeText("OfficeName", name); //Enter address partnerAgentHelperNewSkin.TypeText("OfficeAddress1", "Address1"); //Enter city partnerAgentHelperNewSkin.TypeText("OfficeCity", "Alaska"); //Select country partnerAgentHelperNewSkin.SelectByText("OfficeCountry", "Canada"); partnerAgentHelperNewSkin.WaitForWorkAround(2000); //Select State partnerAgentHelperNewSkin.SelectByText("OfficeState", "AB"); //Enter username partnerAgentHelperNewSkin.TypeText("OfficeUsername", name); //Click on Autogenerate partnerAgentHelperNewSkin.ClickElement("OfficeAutoGenerate"); //Enter password partnerAgentHelperNewSkin.TypeText("OfficePassword", name); //Enter first name partnerAgentHelperNewSkin.TypeText("OfficeFirstName", name); //Enter last name partnerAgentHelperNewSkin.TypeText("OfficeLastName", "Last"); //Enter e address partnerAgentHelperNewSkin.TypeText("OfficeEAddress", name + "@yopmail.com"); //Click on Save partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Verify Title VerifyTitle("Offices"); //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); //Verify title VerifyTitle("Login"); //Go to yopmail GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); //Verify Title VerifyTitle("YOPmail"); //Enter username partnerAgentHelperNewSkin.TypeText("Yopmail", name); //Click on Button partnerAgentHelperNewSkin.ClickElement("YopmailClick"); //Switch frame partnerAgentHelperNewSkin.switchFrame("ifinbox"); //Click on Email partnerAgentHelperNewSkin.ClickElement("OfficeMail"); //Out of the fame partnerAgentHelperNewSkin.outFrame(); //Switch frame partnerAgentHelperNewSkin.switchFrame("ifmail"); //Click on Link partnerAgentHelperNewSkin.ClickElement("OfficeLink"); //Switch window partnerAgentHelperNewSkin.SwitchNewWindow("Login"); //Verify Title // VerifyTitle("Login"); //Verify page text //partnerAgentHelperNewSkin.VerifyPageText("Thank you, your account is activated now"); //Login with new user //Login(name, name); //verify title //VerifyTitle("Dashboard"); //Verify new skin //partnerAgentHelperNewSkin.verifyNewDashboard("NewDashboard"); //partnerAgentHelperNewSkin.verifyNewDashboard("NewDashboard1"); //Log out from the application //GetWebDriver().Navigate().GoToUrl(log[0]); }
public void masterDataProcessorPushToOfficeNewSkin() { 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 masterDataCorpHelper = new MasterDataCorpHelper(GetWebDriver()); //Variable var name = "PushToOffice" + RandomNumber(33, 999); var Code = "1" + RandomNumber(1, 99); //Login with valid credential Username masterDataCorpHelper.TypeText("EnterUsername", "selcorp"); //Login with valid credential password masterDataCorpHelper.TypeText("EnterPassword", "seWelcome2"); //Click On Login Button masterDataCorpHelper.ClickElement("LoginBtn"); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Residual Income tab masterDataCorpHelper.ClickElement("ClickMasterTab"); //Click to Import GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/masterdata/processor_types"); //Click On Create masterDataCorpHelper.ClickElement("ClickOnCreate"); //Click On Save Btn masterDataCorpHelper.ClickElement("ClickOnSaveBtn"); masterDataCorpHelper.WaitForWorkAround(5000); //Enter Processor name masterDataCorpHelper.TypeText("ProcessorName", name); //Enter ProcessorCode masterDataCorpHelper.TypeText("ProcessorCode", Code); //Click On Save Btn masterDataCorpHelper.ClickElement("ClickOnSaveBtn"); masterDataCorpHelper.WaitForWorkAround(3000); //Verify text present masterDataCorpHelper.VerifyPageText("Processor is successfully created!!"); masterDataCorpHelper.WaitForWorkAround(3000); //Click on Push TO office masterDataCorpHelper.ClickElement("ClickOnPushOffice"); masterDataCorpHelper.AcceptAlert(); masterDataCorpHelper.WaitForWorkAround(3000); masterDataCorpHelper.VerifyPageText("Processors successfully pushed to offices."); //Mouse Hover To masterDataCorpHelper.MouseOver("//*[@id='page-wrapper']/div[1]/nav/ul/li[2]/a/span"); //Click On Logout masterDataCorpHelper.ClickElement("ClickOnLogout"); masterDataCorpHelper.WaitForWorkAround(3000); //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 Admin GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin"); //Click on masterDataCorpHelper.ClickElement("ClickOnMaterOff"); //Redirect To Processor GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/processor_types"); //Enter SearchProcessor masterDataCorpHelper.TypeText("SearchProcessor", name); masterDataCorpHelper.WaitForWorkAround(3000); //Enter Processor masterDataCorpHelper.TypeText("EnterCode", Code); masterDataCorpHelper.WaitForWorkAround(6000); //Verify masterDataCorpHelper.VerifyPageText(name); //Verify masterDataCorpHelper.VerifyPageText(Code); masterDataCorpHelper.WaitForWorkAround(3000); }
public void residualIncomePublishPayoutFromOffice() { 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 loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver()); var resdiualIncmeSkipHelper = new ResdiualIncmeSkipHelper(GetWebDriver()); var resdiualIncmeFstDataNrthHelperRevnueShareSet = new ResdiualIncmeFstDataNrthHelperRevnueShareSet(GetWebDriver()); var clientBugsHelper = new ClientBugsHelper(GetWebDriver()); //Login with valid credential Username loginAsCorpHelper.TypeText("EnterUsername", "selcorp"); //Login with valid credential password loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2"); //Click On Login Button loginAsCorpHelper.ClickElement("ClickOnLoginButton"); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Residual Income tab resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickResidualIncomeTab"); //Click to Import resdiualIncmeFstDataNrthHelperRevnueShareSet.redirectToPage(); //Click On Import New button resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportNew"); //Processor resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ProcessorType", "First Data North"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000); //Reporting Period resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("ReportingPeriod", "11"); resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectYr", "2016"); //File Date clientBugsHelper.ClickElement("ClickOnFileDate"); //Click on Date clientBugsHelper.ClickElement("SelectDate"); var FileName = "D:\\pegqa\\TestAutomationProject\\PegasusTests\\Files\\FirstDataNorth_ResidualSamples - Small.csv"; resdiualIncmeFstDataNrthHelperRevnueShareSet.Upload("SelectBrowseCSVFile", FileName); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000); //Import resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnImportBtn"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(5000); //################################## SET FILTER ################################## //Select Filter ReportingPeriod resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016"); // Select Processor Filer resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North"); //Select Filter FileFormat resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North"); //Select Filter ReportingPeriod resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small"); //Select Status resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Imported"); //############# CALCULATION WIZARD //Click On Calculation wizard resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnCalculation"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000); //Click On Step1 resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickOnSkipRecal1"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000); //Click on skip step 2 resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("ClickSkipStp2Recal"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(6000); // Publish Payout resdiualIncmeFstDataNrthHelperRevnueShareSet.ClickElement("PublishPayout"); // resdiualIncmeFstDataNrthHelper.elementpre(); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(8000); //################################## SET FILTER ################################## //Select Filter ReportingPeriod resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016"); // Select Processor Filer resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North"); //Select Filter FileFormat resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North"); //Select Filter ReportingPeriod resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small"); //Select Status resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectStatus", "Published"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(4000); //Logout GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Click on Residual Income Tab clientBugsHelper.ClickElement("ClickOnPDFTemplates"); clientBugsHelper.WaitForWorkAround(3000); //Redirect To URL GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/rir/payout_summary"); resdiualIncmeFstDataNrthHelperRevnueShareSet.WaitForWorkAround(3000); //Select Filter ReportingPeriod resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectFiletReportingPeriod", "November 2016"); // Select Processor Filer resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("SelectProcessorFiler", "First Data North"); //Select Filter FileFormat resdiualIncmeFstDataNrthHelperRevnueShareSet.Select("FilterFileFormat", "First Data North"); //Select Filter ReportingPeriod // resdiualIncmeFstDataNrthHelperRevnueShareSet.TypeText("FileName", "FirstDataNorth_ResidualSamples - Small"); //Select Status New clientBugsHelper.Select("SelectStatusRIReport", "New"); clientBugsHelper.WaitForWorkAround(3000); //Click On Calculation Wizard clientBugsHelper.ClickElement("ClickOnCalculationWizard"); //Agent LookUp clientBugsHelper.ClickElement("AgentLookUp"); clientBugsHelper.WaitForWorkAround(3000); //Calculate Adjustment clientBugsHelper.ClickElement("CalculateAdjustment"); clientBugsHelper.WaitForWorkAround(3000); clientBugsHelper.VerifyPageText("Adjustments calculation successfully completed"); //AgentPayout Calculation clientBugsHelper.ClickElement("AgentPayoutCalculation"); clientBugsHelper.WaitForWorkAround(3000); //Click Publish clientBugsHelper.ClickElement("ClickPublish"); clientBugsHelper.WaitForWorkAround(3000); clientBugsHelper.VerifyPageText("Payouts Published."); //View Published PayoutRI clientBugsHelper.ClickElement("ViewPublishedPayoutRI"); clientBugsHelper.WaitForWorkAround(3000); }
public void agentEmployeePage() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var agents_EmployeesHelper = new Agents_EmployeesHelper(GetWebDriver()); // VARIABLE var name = "TestEmployee" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AgentEmployeePage", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("AgentEmployeePage", "Verify Page title"); VerifyTitle("Dashboard"); //executionLog.Log("AgentEmployeePage", "Click on 'Menu' icon "); //agents_EmployeesHelper.ClickElement("MenuIcon"); executionLog.Log("AgentEmployeePage", "Click on Agent tab"); agents_EmployeesHelper.ClickElement("AgentTab"); executionLog.Log("AgentEmployeePage", "Click On Employee"); VisitOffice("employees"); agents_EmployeesHelper.WaitForWorkAround(3000); executionLog.Log("AgentEmployeePage", "Verify title"); agents_EmployeesHelper.VerifyText("EmployeeHead", "Employee"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AgentEmployeePage"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Agent Employee Page"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Agent Employee Page", "Bug", "Medium", "Employee page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Agent Employee Page"); TakeScreenshot("AgentEmployeePage"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AgentEmployeePage.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AgentEmployeePage"); string id = loginHelper.getIssueID("Agent Employee Page"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AgentEmployeePage.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Agent Employee Page"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Agent Employee Page"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AgentEmployeePage"); executionLog.WriteInExcel("Agent Employee Page", Status, JIRA, "Agent Portal"); } }
public void leadsEmailUrlChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_EmailHelper = new OfficeActivities_EmailsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); var SendTo = "Test" + GetRandomNumber() + "@yopmail.com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadsEmailUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadsEmailUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadsEmailUrlChange", "Go to Leads page"); VisitOffice("leads"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("LeadsEmailUrlChange", "Click On Any Lead"); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Click On Send Email"); office_LeadsHelper.ClickElement("SendEmail"); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Enter Email Id"); officeActivities_EmailHelper.TypeText("Sendto", SendTo); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Enter Subject"); officeActivities_EmailHelper.TypeText("EmailName", "Email Subject"); officeActivities_EmailHelper.WaitForWorkAround(1000); executionLog.Log("LeadsEmailUrlChange", "Click on Send button"); officeActivities_EmailHelper.ClickElement("SendEmailActivity"); officeActivities_EmailHelper.WaitForWorkAround(2000); //executionLog.Log("LeadsEmailUrlChange", "Wait for element to present."); //officeActivities_EmailHelper.WaitForText("Description", 10); executionLog.Log("LeadsEmailUrlChange", "Select Activity >> Emails"); officeActivities_EmailHelper.Select("SelectActivityType", "E-Mails"); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Click On E-mail"); officeActivities_EmailHelper.PressEnter("ClickOnNoteOppSubj"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("LeadsEmailUrlChange", "Change the url with the url number of another office"); VisitOffice("mails/view/57"); officeActivities_EmailHelper.WaitForWorkAround(4000); executionLog.Log("LeadsEmailUrlChange", "Verify Validation"); officeActivities_EmailHelper.WaitForText("You don't have privileges to view this E-Mail.", 10); officeActivities_EmailHelper.WaitForWorkAround(1000); executionLog.Log("LeadsEmailUrlChange", "Redirect to URL"); VisitOffice("mails/sent"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("LeadsEmailUrlChange", "Verify page title"); VerifyTitle("Sent"); //officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Enter Send to in search "); officeActivities_EmailHelper.TypeText("SearchMailInput", SendTo); officeActivities_EmailHelper.WaitForWorkAround(1000); executionLog.Log("LeadsEmailUrlChange", "Click on search btn"); officeActivities_EmailHelper.ClickElement("SearchBtn"); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("LeadsEmailUrlChange", "Select searched email."); officeActivities_EmailHelper.ClickJS("CheckBox1"); officeActivities_EmailHelper.WaitForWorkAround(1000); executionLog.Log("LeadsEmailUrlChange", "Click on delete btn"); officeActivities_EmailHelper.ClickElement("Delete"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("LeadsEmailUrlChange", "Verify Email Deleted successfully"); officeActivities_EmailHelper.WaitForText("E-Mail has been moved to the Recycle Bin.", 05); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadsEmailUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Leads Email Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Leads Email Url Change", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Leads Email Url Change"); TakeScreenshot("LeadsEmailUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsEmailUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadsEmailUrlChange"); string id = loginHelper.getIssueID("Leads Email Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsEmailUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Leads Email Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Leads Email Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadsEmailUrlChange"); executionLog.WriteInExcel("Leads Email Url Change", Status, JIRA, "Leads Email"); } }
public void addtaskforlead() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/OrganizationSetting.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var AddEventsForLeadHelper = new AddEventsForLeadHelper(GetWebDriver()); //Variable var TaskSubject = "Test Task" + RandomNumber(1, 99); var TaskLocation = "Test City" + 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 Leads AddEventsForLeadHelper.ClickElement("ClickOnLeads"); //GetWebDriver().Navigate().GoToUrl("http://zaspire.com/infoaspire/leads"); //AddEventsForLeadHelper.WaitForWorkAround(7000); //Open Lead AddEventsForLeadHelper.ClickElement("FirstLeadNameLink"); //Click on Move over //AddEventsForLeadHelper.ClickElement("MoveHover"); AddEventsForLeadHelper.ClickElement("ClickOn"); //################### ADD TASK ######################### //Click on Add Task AddEventsForLeadHelper.ClickElement("ClickOnAddTask"); //Select Event Type AddEventsForLeadHelper.Select("SelectEventType", "Task"); //Enter Event Location AddEventsForLeadHelper.TypeText("EnterEventLocation", TaskLocation); //Enter Event Subject AddEventsForLeadHelper.TypeText("EnterEventSubject", TaskSubject); //Enter Event Start Date AddEventsForLeadHelper.TypeText("SelectEventStartDate", "2015-12-07"); //Click On Start Time //AddEventsForLeadHelper.ClickElement("SelectStartTime"); //Click On Starting Time //AddEventsForLeadHelper.ClickElement("ClickOnHours"); //Click On Starting Time //AddEventsForLeadHelper.ClickElement("ClickOnMinutes"); //Enter Event Due Date AddEventsForLeadHelper.TypeText("SelectEventDueDate", "2015-12-08"); //Click On End Time //AddEventsForLeadHelper.ClickElement("SelectEndTime"); //Click On Starting Time //AddEventsForLeadHelper.ClickElement("ClickOnHours"); //Click On Starting Time //AddEventsForLeadHelper.ClickElement("ClickOnMinutes"); //Click On Check Reminder Check Box //AddEventsForLeadHelper.ClickElement("CheckReminder"); //Select Reminder Time //AddEventsForLeadHelper.ClickElement("SelectReminderTime"); //Click On Check Email Check Box //AddEventsForLeadHelper.ClickElement("CheckEmail"); //Select Email Reminder Time //AddEventsForLeadHelper.ClickElement("CheckRecurringEvent"); //Click On Save AddEventsForLeadHelper.ClickElement("ClickOnSave"); AddEventsForLeadHelper.WaitForWorkAround(7000); }
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 processorNameOnSavingMerchant() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var processorNameOnSavingMerchantHelper = new ProcessorNameOnSavingMerchantHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; var CompanyName = "QALeadCompany" + RandomNumber(1, 100); try { executionLog.Log("ProcessorNameOnSavingMerchant", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifySelectedUserGroup", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); VisitOffice("leads"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Create button"); processorNameOnSavingMerchantHelper.ClickElement("CreateBtn"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the Company Name"); processorNameOnSavingMerchantHelper.TypeText("CompanyNameTab", CompanyName); executionLog.Log("ProcessorNameOnSavingMerchant", "Select the status"); processorNameOnSavingMerchantHelper.SelectByText("Status", "New"); executionLog.Log("ProcessorNameOnSavingMerchant", "Select the responsibility"); processorNameOnSavingMerchantHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Next button"); processorNameOnSavingMerchantHelper.ClickElement("NextBtn"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Business details tab"); processorNameOnSavingMerchantHelper.ClickElement("BusinessDetailsTab"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Save button"); processorNameOnSavingMerchantHelper.ClickElement("SaveBtn"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Business Banking Account tab"); processorNameOnSavingMerchantHelper.ClickElement("BusinessBankAcc"); processorNameOnSavingMerchantHelper.WaitForWorkAround(2000); executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the routing number"); processorNameOnSavingMerchantHelper.TypeText("RoutingNumber", "889876765"); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Save button"); processorNameOnSavingMerchantHelper.ClickElement("SaveBtn"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); VisitOffice("leads"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Search the company name"); processorNameOnSavingMerchantHelper.TypeText("CompanySearchField", CompanyName); processorNameOnSavingMerchantHelper.WaitForWorkAround(2000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on first lead element"); processorNameOnSavingMerchantHelper.ClickElement("FirstCompanyName"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Company details tab"); processorNameOnSavingMerchantHelper.ClickElement("BusinessDetailsTab"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the processor name"); processorNameOnSavingMerchantHelper.TypeText("ProcessorName", "First Data Omaha"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Save button"); processorNameOnSavingMerchantHelper.ClickElement("SaveBtn"); processorNameOnSavingMerchantHelper.WaitForWorkAround(5000); executionLog.Log("ProcessorNameOnSavingMerchant", "Verify the added processor name "); processorNameOnSavingMerchantHelper.verifyFieldText("//*[@id='LeadDetailIfyesProcessorName']", "First Data Omaha"); VisitOffice("leads"); processorNameOnSavingMerchantHelper.WaitForWorkAround(3000); executionLog.Log("ProcessorNameOnSavingMerchant", "Search the company name"); processorNameOnSavingMerchantHelper.TypeText("CompanySearchField", CompanyName); processorNameOnSavingMerchantHelper.WaitForWorkAround(2000); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on first check box"); processorNameOnSavingMerchantHelper.ClickElement("FirstCheckBox"); executionLog.Log("ProcessorNameOnSavingMerchant", "Click on delete button"); processorNameOnSavingMerchantHelper.ClickElement("DeleteBtn"); processorNameOnSavingMerchantHelper.AcceptAlert(); processorNameOnSavingMerchantHelper.WaitForWorkAround(4000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ProcessorNameOnSavingMerchant"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Processor Name On Saving Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Processor Name On Saving Merchant", "Bug", "Medium", "Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Processor Name On Saving Merchant"); TakeScreenshot("ProcessorNameOnSavingMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProcessorNameOnSavingMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ProcessorNameOnSavingMerchant"); string id = loginHelper.getIssueID("Processor Name On Saving Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProcessorNameOnSavingMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Processor Name On Saving Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Processor Name On Saving Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ProcessorNameOnSavingMerchant"); executionLog.WriteInExcel("Processor Name On Saving Merchant", Status, JIRA, "Office Merchant data"); } }
public void corpEmployeeIssues() { 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 corpEmployeeHelper = new CorpEmployeeHelper(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."); //Click on Agent in Topmenu corpEmployeeHelper.ClickElement("ClickOnEmployeeTab"); corpEmployeeHelper.WaitForWorkAround(4000); //ClickOnCreate corpEmployeeHelper.ClickElement("ClickOnCreate"); //Enter User Name var usernme = "DemoUser" + RandomNumber(1, 999); corpEmployeeHelper.TypeText("EnterUserName", usernme); //Click On Save corpEmployeeHelper.ClickElement("ClickOnSave"); corpEmployeeHelper.WaitForWorkAround(4000); //Verify This field is required. corpEmployeeHelper.VerifyPageText("This field is required."); //Verifytext corpEmployeeHelper.VerifyPageText("This field is required."); //verify corpEmployeeHelper.VerifyText("VerifyvALIDATION", "This field is required."); //Enter Phone Number corpEmployeeHelper.VerifyText("VerifyAvatar", "This field is required."); //Enter Phone Number corpEmployeeHelper.VerifyText("VerifyEmail", "This field is required."); //Enter Phone Number corpEmployeeHelper.VerifyText("VerifyPhoneNumber", "This field is required."); //Enter Phone Number corpEmployeeHelper.VerifyText("VerifyLastName", "This field is required."); //Enter First Name corpEmployeeHelper.TypeText("EnterFirstName", "Test"); //Enter Last Name corpEmployeeHelper.TypeText("EnterLastName", "Tester"); //Enter Primary Email var Email = "Email" + RandomNumber(1, 999) + "@yopmail.com"; corpEmployeeHelper.TypeText("EnterPrimaryEmail", Email); //Click On Check box corpEmployeeHelper.ClickElement("ClickOnCheckBox"); //VerifyMandatoryStar corpEmployeeHelper.VerifyText("VerifyMandatoryStar", "*"); //Enter Phone Number corpEmployeeHelper.TypeText("EnterPhneNumber", "9898777332"); //Enter Eaddress var mail = "mail" + RandomNumber(1, 999) + "@yopmail.com"; corpEmployeeHelper.TypeText("EnterEaddress", mail); //Click On Save corpEmployeeHelper.ClickElement("ClickOnSave"); corpEmployeeHelper.WaitForWorkAround(4000); //verify Page Text corpEmployeeHelper.VerifyPageText("Employee Created Successfully."); corpEmployeeHelper.WaitForWorkAround(4000); //Search Employee corpEmployeeHelper.TypeText("SearchEmployee", "Test Tester"); //Enter Email To Search corpEmployeeHelper.TypeText("SearchEnterEmail", Email); corpEmployeeHelper.WaitForWorkAround(3000); }
public void clientTextTab() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientTextTab", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("ClientTextTab", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ClientTextTab", "Go to client page"); VisitOffice("clients"); executionLog.Log("ClientTextTab", "Verify title"); VerifyTitle(); executionLog.Log("ClientTextTab", "Open a client"); office_ClientsHelper.ClickElement("Client1"); executionLog.Log("ClientTextTab", "Verify title"); VerifyTitle(" Details"); executionLog.Log("ClientTextTab", "Click on 'Owner' tab"); office_ClientsHelper.ClickElement("OwnerTab"); executionLog.Log("ClientTextTab", "Verify title"); VerifyTitle(" Owners"); executionLog.Log("ClientTextTab", "Verify text displayed properly"); office_ClientsHelper.verifyElementVisible("TextOwnwerInfo"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientTextTab"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Text Tab"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Text Tab", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Client Text Tab"); TakeScreenshot("ClientTextTab"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientTextTab.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientTextTab"); string id = loginHelper.getIssueID("Client Text Tab"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientTextTab.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Text Tab"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Text Tab"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientTextTab"); executionLog.WriteInExcel("Client Text Tab", Status, JIRA, "Client Management"); } }
public void activitiesDocumentManagement2() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_DocumentsHelper = new OfficeActivities_DocumentHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); var ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver()); // Variable var name = "Doc" + RandomNumber(1, 9999); var email = "Test" + GetRandomNumber() + "@gmail.com"; String ValidFile = GetPathToFile() + "index.jpg"; String InvalidFile = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesDocumentManagement2", " Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesDocumentManagement2", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesDocumentManagement2", "Click On Admin"); VisitOffice("admin"); executionLog.Log("ActivitiesDocumentManagement2", "Redirect to create document page"); VisitOffice("documents/create"); executionLog.Log("ActivitiesDocumentManagement2", "verify title"); VerifyTitle("Create a New Document"); executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for name."); officeActivities_DocumentsHelper.VerifyText("NameError", "This field is required."); executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for attachment."); officeActivities_DocumentsHelper.VerifyText("AttachmentError", "This field is required."); executionLog.Log("ActivitiesDocumentManagement2", "Enter Document name"); officeActivities_DocumentsHelper.TypeText("Name", name); executionLog.Log("ActivitiesDocumentManagement2", "Click on document version"); officeActivities_DocumentsHelper.ClickElement("DocumentVersion"); executionLog.Log("ActivitiesDocumentManagement2", "Upload an invalid File "); officeActivities_DocumentsHelper.Upload("BrowseAttachment", InvalidFile); executionLog.Log("ActivitiesDocumentManagement2", "Verify alert message for invalid file."); officeActivities_DocumentsHelper.VerifyAlertText("please select a valid file!"); officeActivities_DocumentsHelper.AcceptAlert(); executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File."); officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile); executionLog.Log("ActivitiesDocumentManagement2", "Select Assign owner"); officeActivities_DocumentsHelper.SelectByText("AssignOwner", "Howard Tang"); executionLog.Log("ActivitiesDocumentManagement2", "Select status"); officeActivities_DocumentsHelper.Select("Status", "Active"); executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document saved successfully.", 10); executionLog.Log("ActivitiesDocumentManagement2", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); executionLog.Log("ActivitiesDocumentManagement2", "Select document related to."); officeActivities_DocumentsHelper.Select("ReletedTo", "18"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on any meeting."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement2", "Redirect at meetings page."); VisitOffice("meetings"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present."); officeActivities_DocumentsHelper.WaitForElementPresent("ClickOnAnyMeeting", 10); executionLog.Log("ActivitiesDocumentManagement2", "Click on any meeting."); office_ClientsHelper.ClickElement("ClickOnAnyMeeting"); office_ClientsHelper.WaitForWorkAround(3000); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(3000); VerifyTitle("Documents"); executionLog.Log("ActivitiesDocumentManagement2", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Select document related to."); officeActivities_DocumentsHelper.SelectByText("ReletedTo", "Client"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on any task."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement2", "Redirect at tasks page."); VisitOffice("tasks"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present."); officeActivities_DocumentsHelper.WaitForElementPresent("OpenTask", 10); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(3000); VerifyTitle("Documents"); executionLog.Log("ActivitiesDocumentManagement2", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on add new version."); officeActivities_DocumentsHelper.ClickElement("NewVersion"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File."); officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Write a comment about version."); officeActivities_DocumentsHelper.TypeText("DocCommnet", "This is newly added version."); executionLog.Log("ActivitiesDocumentManagement2", "Click on save button."); officeActivities_DocumentsHelper.ClickElement("AddVersionSave"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("New Version File Uploaded successfully.", 10); executionLog.Log("ActivitiesDocumentManagement2", "Redirect to document page"); VisitOffice("documents"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present."); officeActivities_DocumentsHelper.WaitForElementPresent("SearchDocumet", 10); executionLog.Log("ActivitiesDocumentManagement2", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(3000); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on Checkbox"); officeActivities_DocumentsHelper.ClickElement("CheckDocToDel"); executionLog.Log("ActivitiesDocumentManagement2", "Click on Delete button"); officeActivities_DocumentsHelper.ClickElement("DeleteDoc"); executionLog.Log("ActivitiesDocumentManagement2", "Acccept alert to delete doc."); officeActivities_DocumentsHelper.AcceptAlert(); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document deleted successfully.", 20); executionLog.Log("ActivitiesDocumentManagement2", "Redirect at recyclebin page."); VisitOffice("documents/recyclebin"); executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present."); officeActivities_DocumentsHelper.WaitForElementPresent("DeleteRecycle", 10); executionLog.Log("ActivitiesDocumentManagement2", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(3000); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Click on delete icon."); officeActivities_DocumentsHelper.ClickElement("DeleteRecycle"); officeActivities_DocumentsHelper.AcceptAlert(); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.."); officeActivities_DocumentsHelper.WaitForText("Document Permanently Deleted.", 20); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesDocumentManagement2"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Document Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Document Management", "Bug", "Medium", "Document page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Activities Document Management"); TakeScreenshot("ActivitiesDocumentManagement2"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesDocumentManagement2.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesDocumentManagement2"); string id = loginHelper.getIssueID("Activities Document Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesDocumentManagement2.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Document Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Document Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesDocumentManagement2"); executionLog.WriteInExcel("Activities Document Management", Status, JIRA, "Office Activities"); } }
public void shippingCarrierSaveWithInvalidURLIssue() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Redirect at shipping carriers page."); VisitOffice("shipping_carriers"); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Click on Edit button."); equipment_ShippingCarrierHelper.ClickElement("Edit"); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Wait for tracking Url."); equipment_ShippingCarrierHelper.WaitForElementPresent("TrackingURL", 10); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Enter Tracking Url."); equipment_ShippingCarrierHelper.TypeText("TrackingURL", "Test"); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Click on Save button."); equipment_ShippingCarrierHelper.ClickElement("Save"); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Wait for tracking Url error validation."); equipment_ShippingCarrierHelper.WaitForElementPresent("TrackingError2", 10); executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Verify Please enter a valid URL."); equipment_ShippingCarrierHelper.VerifyText("TrackingError2", "Please enter a valid URL."); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ShippingCarrierSaveWithInvalidURLIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Shipping Carrier Save With Invalid URL Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Shipping Carrier Save With Invalid URL Issue", "Bug", "Medium", "Equipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue"); TakeScreenshot("ShippingCarrierSaveWithInvalidURLIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ShippingCarrierSaveWithInvalidURLIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ShippingCarrierSaveWithInvalidURLIssue"); string id = loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ShippingCarrierSaveWithInvalidURLIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ShippingCarrierSaveWithInvalidURLIssue"); executionLog.WriteInExcel("Shipping Carrier Save With Invalid URL Issue", Status, JIRA, "Admin Equipments"); } }
public void editOfficeDetail() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_Admin_DashboardHelper = new DashBoard_CreateDashboardHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditOfficeDetail", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditOfficeDetail", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("EditOfficeDetail", "Visit admin page"); VisitOffice("admin"); office_Admin_DashboardHelper.WaitForWorkAround(1000); executionLog.Log("EditOfficeDetail", "Click on Edit Office details button"); office_Admin_DashboardHelper.ClickElement("ClickOnEditOfficeCode"); office_Admin_DashboardHelper.WaitForWorkAround(1000); executionLog.Log("EditOfficeDetail", "Click on Save button"); office_Admin_DashboardHelper.ClickElement("SaveDashboard"); executionLog.Log("EditOfficeDetail", "Verify Confirmation"); office_Admin_DashboardHelper.WaitForText("Office codes updated successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditOfficeDetail"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Office Detail"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Addresses", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Edit Office Detail"); TakeScreenshot("EditOfficeDetail"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditOfficeDetail.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditOfficeDetail"); string id = loginHelper.getIssueID("Edit Office Detail"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientAddresses.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Office Detail"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Office Detail"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditOfficeDetail"); executionLog.WriteInExcel("Edit Office Detail", Status, JIRA, "Client Management"); } }
public void FileVali() { string[] username1 = null; string[] password1 = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username1 = oXMLData.getData("settings/Credentials", "username"); password1 = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var clientCreateValiHelper = new ClientCreateValiHelper(GetWebDriver()); var username = "******" + GetRandomNumber(); var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; //try //{ executionLog.Log("ClientCreateVali", "Login with valid username and password"); Login(username1[0], password1[0]); clientCreateValiHelper.WaitForWorkAround(3000); executionLog.Log("ClientCreateVali", "check mandatory and length"); checkMandatory(clientCreateValiHelper, executionLog); executionLog.Log("ClientCreateVali", "check data type and data format"); checkDataTypeandFormat(clientCreateValiHelper, executionLog); // clean up cleanVali(clientCreateValiHelper, executionLog); // } // catch (Exception e) // { // Console.WriteLine("ERRROROOR"); // executionLog.Log("Error", e.StackTrace); // Status = "Fail"; // String counter = executionLog.readLastLine("counter"); // String Description = executionLog.GetAllTextFile("FieldValidationFrame"); // String Error = executionLog.GetAllTextFile("Error"); // if (counter == "") // { // counter = "0"; // } // bool result = loginHelper.CheckExstingIssue("FieldValidationFrame"); // if (!result) // { // if (Int16.Parse(counter) < 5) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // loginHelper.CreateIssue("FieldValidationFrame", "Bug", "Medium", "Pricing page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); // string id = loginHelper.getIssueID("FieldValidationFrame"); // TakeScreenshot("FieldValidationFrame"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\Iframe.png"; // loginHelper.AddAttachment(location, id); // } // } // else // { // if (Int16.Parse(counter) < 5) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // TakeScreenshot("OfficeFieldDictionary"); // string id = loginHelper.getIssueID("FieldValidationFrame"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\FieldValidationFrame.png"; // loginHelper.AddAttachment(location, id); // loginHelper.AddComment(loginHelper.getIssueID("FieldValidationFrame"), "This issue is still occurring"); // } // } // JIRA = loginHelper.getIssueID("FieldValidationFrame"); // executionLog.DeleteFile("Error"); // throw; // } // finally // { // executionLog.DeleteFile("FieldValidationFrame"); // executionLog.WriteInExcel("FieldValidationFrame", Status, JIRA, "FieldValidationFrame"); // } //} //} //} }
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 leadsbulkdeleteforgroupview() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/OrganizationSetting.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var LeadsBulkActionsForGroupViewHelper = new LeadsBulkActionsForGroupViewHelper(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."); //Click on Leads LeadsBulkActionsForGroupViewHelper.ClickElement("ClickOnLeads"); //GetWebDriver().Navigate().GoToUrl("http://zaspire.com/infoaspire/leads"); //LeadsBulkActionsForGroupViewHelper.WaitForWorkAround(7000); //Click On Groups //LeadsBulkActionsForGroupViewHelper.ClickElement("ClickOnGroups"); GetWebDriver().Navigate().GoToUrl("http://zaspire.com/infoaspire/leads/groups"); LeadsBulkActionsForGroupViewHelper.WaitForWorkAround(7000); //Open Group LeadsBulkActionsForGroupViewHelper.ClickElement("FirstLeadGroupNameLink"); //################### BULK DELETE LEADS FOR GROUPS VIEW ######################### //Click on Master Check Box LeadsBulkActionsForGroupViewHelper.ClickElement("CheckMasterCheckBox"); //Mouse Over LeadsBulkActionsForGroupViewHelper.MouseOver("locator"); //Click on Delete Leads LeadsBulkActionsForGroupViewHelper.ClickElement("ClickOnDeleteLeads"); LeadsBulkActionsForGroupViewHelper.AcceptAlert(); LeadsBulkActionsForGroupViewHelper.WaitForWorkAround(4000); //################### DELETE LEAD FOR GROUPS VIEW ######################### //Click on Delete Lead LeadsBulkActionsForGroupViewHelper.ClickElement("ClickOnDeleteLead"); LeadsBulkActionsForGroupViewHelper.AcceptAlert(); LeadsBulkActionsForGroupViewHelper.WaitForWorkAround(4000); }
public void createCategoryTickets() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); String JIRA = ""; String Status = "Pass"; // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Variable var name = "Test" + GetRandomNumber(); try { executionLog.Log("CreateCategoryTickets", " Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CreateCategoryTickets", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("CreateCategoryTickets", "Redirect To URL"); VisitOffice("tickets/masterdata/category"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateCategoryTickets", "Verify title"); VerifyTitle("Master Data"); executionLog.Log("CreateCategoryTickets", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateCategoryTickets", "Verify title"); VerifyTitle("Create"); executionLog.Log("CreateCategoryTickets", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", name); executionLog.Log("CreateCategoryTickets", "Click on Save "); tickets_MasterDataHelper.ClickElement("Save"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("CreateCategoryTickets", "Wait for text"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("CreateCategoryTickets", "Click on delete item"); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("CreateCategoryTickets", "Delete item."); tickets_MasterDataHelper.DeleteCategory(name); executionLog.Log("CreateCategoryTickets", "Select replace with "); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Other"); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("CreateCategoryTickets", "Confirm delete by clicking save. "); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(4000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CreateCategoryTickets"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Create Category Tickets"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Create Category Tickets", "Bug", "Medium", "Ticket category page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Category Tickets"); TakeScreenshot("CreateCategoryTickets"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateCategoryTickets.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CreateCategoryTickets"); string id = loginHelper.getIssueID("Create Category Tickets"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateCategoryTickets.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Create Category Tickets"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Create Category Tickets"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CreateCategoryTickets"); executionLog.WriteInExcel("Create Category Tickets", Status, JIRA, "Ticketing System"); } }
public void editEquipment() { 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()); EditEquipmentAdminHelper editEquipmentAdminHelper = new EditEquipmentAdminHelper(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."); //Click On Admin editEquipmentAdminHelper.RedirectToAdmin(); //Redirect To URL editEquipmentAdminHelper.RedirectToPage(); //Verify title VerifyTitle("Equipment"); //#### Create Equipments // Click On Create editEquipmentAdminHelper.ClickElement("ClickOnCreate"); //Verify title VerifyTitle("Equipment Create"); //Enter Equipment Name editEquipmentAdminHelper.TypeText("EqpName", name); //Enter DownloadsIDName editEquipmentAdminHelper.Select("Type", "Check Reader"); //Enter Equipment Id editEquipmentAdminHelper.TypeText("EquipmentId", Id); //Enter Version editEquipmentAdminHelper.TypeText("Version", "Testing"); //Enter Description editEquipmentAdminHelper.TypeText("Description", "This is Testing Description"); //Click On First CheckBox editEquipmentAdminHelper.ClickElement("ClickOnFirstCheckBox"); //Click On Second CheckBox editEquipmentAdminHelper.ClickElement("ClickOn2CheckBox"); //######################## CLICK ON SAVE BUTTON ######################################## // Click on Save button editEquipmentAdminHelper.ClickElement("SaveBtn"); //Wait for text editEquipmentAdminHelper.WaitForText("Equipment saved successfully", 30); //Verify title VerifyTitle("Equipment"); //########################### EDIT ###################################### //Enter Name in seacrh field editEquipmentAdminHelper.TypeText("EnterNameInSearch", name); //Clik To EditEquipment editEquipmentAdminHelper.ClickElement("ClikToEditEquipment"); //Verify title VerifyTitle("Equipment Edit: "); //Enter Equipment Name editEquipmentAdminHelper.TypeText("EqpName", name); //Enter DownloadsIDName editEquipmentAdminHelper.Select("Type", "Check Reader"); //Enter Equipment Id editEquipmentAdminHelper.TypeText("EquipmentId", Id); //Enter Version editEquipmentAdminHelper.TypeText("Version", "Testing"); //Enter Description editEquipmentAdminHelper.TypeText("Description", "This is Testing Description"); // Click on Save button editEquipmentAdminHelper.ClickElement("SaveBtn"); editEquipmentAdminHelper.WaitForText("Equipment saved successfully", 30); }
public void leadsAdvanceFilterResultsPP() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadsAdvanceFilterResultsPP", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadsAdvanceFilterResultsPP", "Redirect To URL"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify page title."); VerifyTitle("Leads"); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on advance filter."); office_LeadsHelper.ClickElement("AdvanceFilter"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 10."); office_LeadsHelper.SelectByText("ResultsPerPage", "10"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on apply button."); office_LeadsHelper.ClickElement("Apply"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed."); office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 10 of"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on advance filter."); office_LeadsHelper.ClickElement("AdvanceFilter"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 20."); office_LeadsHelper.SelectByText("ResultsPerPage", "20"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on apply button."); office_LeadsHelper.ClickElement("Apply"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed."); office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 20 of"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on advance filter."); office_LeadsHelper.ClickElement("AdvanceFilter"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 50."); office_LeadsHelper.SelectByText("ResultsPerPage", "50"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on apply button."); office_LeadsHelper.ClickElement("Apply"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed."); office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 50 of"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on advance filter."); office_LeadsHelper.ClickElement("AdvanceFilter"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 100."); office_LeadsHelper.SelectByText("ResultsPerPage", "100"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Click on apply button."); office_LeadsHelper.ClickElement("Apply"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed."); office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 100 of"); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsAdvanceFilterResultsPP", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadsAdvanceFilterResultsPP"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Clients Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Clients Advance Filter ResultsPP", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); TakeScreenshot("LeadsAdvanceFilterResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadsAdvanceFilterResultsPP"); string id = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Clients Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadsAdvanceFilterResultsPP"); executionLog.WriteInExcel("Clients Advance Filter ResultsPP", Status, JIRA, "Opportunities Management"); } }
public void leadPhoneUpdate() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // VARIABLE var Company = "My Company" + RandomNumber(1, 9999); var name = "TestEmployee" + RandomNumber(1, 9999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadPhoneUpdate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadPhoneUpdate", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("LeadPhoneUpdate", "Redirect To create lead page. "); VisitOffice("leads/create"); executionLog.Log("LeadPhoneUpdate", "Verify page title. "); VerifyTitle("Create a Lead"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("LeadPhoneUpdate", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadPhoneUpdate", "Select Lead Status"); office_LeadsHelper.Select("LeadStatus", "New"); executionLog.Log("LeadPhoneUpdate", "Select Lead Responsibility"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadPhoneUpdate", "Click on Save"); office_LeadsHelper.ClickElement("SaveLeadButton"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("LeadPhoneUpdate", "Enter First Name "); office_LeadsHelper.TypeText("FirstNameLead", "Test Lead"); executionLog.Log("LeadPhoneUpdate", "Enter Last Name"); office_LeadsHelper.TypeText("LeadLastName", "Tester"); executionLog.Log("LeadPhoneUpdate", "Enter Company Name"); office_LeadsHelper.TypeText("CompanyName", Company); executionLog.Log("LeadPhoneUpdate", "Click on Save"); office_LeadsHelper.ClickElement("SaveLeadButton"); office_LeadsHelper.WaitForWorkAround(4000); var LocDub = "//button[text()='Create Duplicate']"; if (office_LeadsHelper.IsElementPresent(LocDub)) { office_LeadsHelper.WaitForWorkAround(4000); executionLog.Log("LeadPhoneUpdate", "Click on duplicate btn"); office_LeadsHelper.Click(LocDub); office_LeadsHelper.WaitForWorkAround(4000); executionLog.Log("LeadPhoneUpdate", "Verify text."); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("LeadPhoneUpdate", "Redirect To lead page. "); VisitOffice("leads"); executionLog.Log("LeadPhoneUpdate", "Enter Company Name"); office_LeadsHelper.TypeText("CompanySearch", Company); executionLog.Log("LeadPhoneUpdate", "Wait for checkbox to appear."); office_LeadsHelper.WaitForElementPresent("CheckDocToDel", 10); executionLog.Log("LeadPhoneUpdate", "Select lead by check box"); office_LeadsHelper.ClickElement("CheckDocToDel"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadPhoneUpdate", "Click on delete lead"); office_LeadsHelper.ClickElement("DeleteLead"); executionLog.Log("LeadPhoneUpdate", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadPhoneUpdate", "Wait for success message."); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadPhoneUpdate"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Lead Phone Update"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Lead Phone Update", "Bug", "Medium", "PDF Tab page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Lead Phone Update"); TakeScreenshot("LeadPhoneUpdate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadPhoneUpdate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadPhoneUpdate"); string id = loginHelper.getIssueID("Lead Phone Update"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadPhoneUpdate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Lead Phone Update"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Lead Phone Update"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadPhoneUpdate"); executionLog.WriteInExcel("Lead Phone Update", Status, JIRA, "Leads Management"); } }
public void leadZipCode() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var Office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Variable var CompanyNameLead = "Lead" + GetRandomNumber(); var FirstName = "Lead" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadZipCode", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadZipCode", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("LeadZipCode", "Redirect To Lead"); VisitOffice("leads/create"); Office_LeadsHelper.WaitForWorkAround(5000); executionLog.Log("LeadSave", "Verify page title. "); VerifyTitle("Create a Lead"); executionLog.Log("LeadZipCode", "Click on Comapy Detail"); Office_LeadsHelper.TypeText("CompanyName", CompanyNameLead); executionLog.Log("LeadZipCode", "Select Salutation"); Office_LeadsHelper.Select("Salutaion", "Mr"); executionLog.Log("LeadZipCode", "Enter First Name"); Office_LeadsHelper.TypeText("FirstNameLead", FirstName); executionLog.Log("LeadZipCode", "Enter Last Name"); Office_LeadsHelper.TypeText("LastName", "Tester"); executionLog.Log("LeadZipCode", "Select the Status"); Office_LeadsHelper.SelectByText("LeadStatus", "Marketing"); executionLog.Log("LeadZipCode", "Select the Responsbility"); Office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadZipCode", "Click on Save Button button"); Office_LeadsHelper.ClickElement("SaveLeadButton"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadZipCode"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Lead Zip Code"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Lead Zip Code", "Bug", "Medium", "Lead page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Lead Zip Code"); TakeScreenshot("LeadZipCode"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadZipCode.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadZipCode"); string id = loginHelper.getIssueID("Lead Zip Code"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadZipCode.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Lead Zip Code"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Lead Zip Code"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadZipCode"); executionLog.WriteInExcel("Lead Zip Code", Status, JIRA, "Leads Management"); } }
public void verifyModifiedMovementIssue() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyModifiedMovementIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyModifiedMovementIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyModifiedMovementIssue", "Redirect To URL"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(5000); executionLog.Log("VerifyModifiedMovementIssue", "Verify page title."); VerifyTitle("Leads"); executionLog.Log("VerifyModifiedMovementIssue", "Click on advance filter."); office_LeadsHelper.ClickElement("AdvanceFilter"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyModifiedMovementIssue", "Select 'Modified' in displayed columns."); office_LeadsHelper.SelectByText("DisplayedCols", "Modified"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyModifiedMovementIssue", "Move column to available columns"); office_LeadsHelper.ClickElement("RemoveCols"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyModifiedMovementIssue", "Click on apply button."); office_LeadsHelper.ClickElement("Apply"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyModifiedMovementIssue", "Verify unexpected error message not present on the page."); office_LeadsHelper.VerifyTextNot("OOPS you are trying to access a non existing page on the website."); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyModifiedMovementIssue", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyModifiedMovementIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Modified Movement Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Modified Movement Issue", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Modified Movement Issue"); TakeScreenshot("VerifyModifiedMovementIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyModifiedMovementIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyModifiedMovementIssue"); string id = loginHelper.getIssueID("Verify Modified Movement Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyModifiedMovementIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Modified Movement Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Modified Movement Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyModifiedMovementIssue"); executionLog.WriteInExcel("Verify Modified Movement Issue", Status, JIRA, "Opportunities Management"); } }
public void verifyEditPartnerAssociationConnectUsername() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver()); // Variable var assname = "TestAssociate" + GetRandomNumber(); var name = "TestAgent" + RandomNumber(111, 999999); var user = "******" + RandomNumber(111, 9999999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to Partner Agent page."); VisitOffice("partners/association/create"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify page title."); VerifyTitle("Create a Partner Association"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Association name"); agents_PartnerAssociationHelper.TypeText("Name", assname); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter FirstNAME"); agents_PartnerAssociationHelper.TypeText("FirstNAME", name); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter LastName"); agents_PartnerAssociationHelper.TypeText("LastName", "Tester"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Date Of Birth"); agents_PartnerAssociationHelper.TypeText("Birthday", "08/08/1992"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressType"); agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressLebel"); agents_PartnerAssociationHelper.Select("eAddressLebel", "Work"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter eAddressType"); var Email = "P.Ass" + GetRandomNumber() + "@yopmail.com"; agents_PartnerAssociationHelper.TypeText("eAddress", Email); //executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select User Account Check Box"); //agents_PartnerAssociationHelper.ClickElement("UserAccChkBox"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Username"); agents_PartnerAssociationHelper.TypeText("UserName", user); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select PartnerUser Avatar Check Box"); agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Click Save Agent btn"); agents_PartnerAssociationHelper.ClickElement("AssSave"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify success message. "); agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 05); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to All Partner Association"); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter association name to be searched"); agents_PartnerAssociationHelper.TypeText("SearchAssociation", assname); agents_PartnerAssociationHelper.WaitForWorkAround(2000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Edit association"); agents_PartnerAssociationHelper.ClickElement("EditAssociation1"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify username box is not present anymore"); Assert.IsFalse(agents_PartnerAssociationHelper.IsElementPresent("//*[@id='UserUserName']")); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyEditPartnerAssociationConnectUsername"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Edit Partner Association Connect Username"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Edit Partner Association Connect Username", "Bug", "Medium", "Partner Agents", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); TakeScreenshot("VerifyEditPartnerAssociationConnectUsername"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyEditPartnerAssociationConnectUsername.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyEditPartnerAssociationConnectUsername"); string id = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyEditPartnerAssociationConnectUsername.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Edit Partner Association Connect Username"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyEditPartnerAssociationConnectUsername"); executionLog.WriteInExcel("Verify Edit Partner Association Connect Username", Status, JIRA, "Agents Portal"); } }
public void createEquipments() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver()); // Variable var name = "Test" + GetRandomNumber(); var Id = "12345" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("CreateEquipments", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CreateEquipments", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("CreateEquipments", "Click On Admin"); VisitOffice("admin"); eqiupment_EquipmentHelper.WaitForWorkAround(2000); executionLog.Log("CreateEquipments", "Redirect To URL"); VisitOffice("equipment"); eqiupment_EquipmentHelper.WaitForWorkAround(5000); executionLog.Log("CreateEquipments", "Verify title"); VerifyTitle("Equipment"); eqiupment_EquipmentHelper.WaitForWorkAround(4000); executionLog.Log("CreateEquipments", " Click On Create"); eqiupment_EquipmentHelper.Clickjs("Create"); eqiupment_EquipmentHelper.WaitForWorkAround(5000); executionLog.Log("CreateEquipments", "Verify title"); VerifyTitle("Equipment Create"); executionLog.Log("CreateEquipments", "Enter Equipment Name"); eqiupment_EquipmentHelper.TypeText("Name", name); eqiupment_EquipmentHelper.WaitForWorkAround(500); executionLog.Log("CreateEquipments", "Select DownloadsIDName"); eqiupment_EquipmentHelper.Select("Type", "Check Reader"); eqiupment_EquipmentHelper.WaitForWorkAround(500); executionLog.Log("CreateEquipments", "Enter Equipment Id"); eqiupment_EquipmentHelper.TypeText("EquipmentId", Id); eqiupment_EquipmentHelper.WaitForWorkAround(500); executionLog.Log("CreateEquipments", "Enter Version"); eqiupment_EquipmentHelper.TypeText("Version", "5.1"); eqiupment_EquipmentHelper.WaitForWorkAround(500); executionLog.Log("CreateEquipments", "Enter Description"); eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description"); eqiupment_EquipmentHelper.WaitForWorkAround(2000); executionLog.Log("CreateEquipments", "Click On First CheckBox"); eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1"); eqiupment_EquipmentHelper.WaitForWorkAround(2000); executionLog.Log("CreateEquipments", "Click On First CheckBox"); eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2"); eqiupment_EquipmentHelper.WaitForWorkAround(2000); executionLog.Log("CreateEquipments", " Click on Save button "); eqiupment_EquipmentHelper.Clickjs("Save"); eqiupment_EquipmentHelper.WaitForWorkAround(5000); executionLog.Log("CreateEquipments", " Wait for save equipment text "); eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 20); executionLog.Log("CreateEquipments", "Redirect To URL"); VisitOffice("equipment"); eqiupment_EquipmentHelper.WaitForWorkAround(6000); executionLog.Log("CreateEquipments", "Verify title"); VerifyTitle("Equipment"); eqiupment_EquipmentHelper.WaitForWorkAround(4000); executionLog.Log("CreateEquipments", "Enter Name to search"); eqiupment_EquipmentHelper.TypeText("SearchId", Id); eqiupment_EquipmentHelper.WaitForWorkAround(5000); executionLog.Log("CreateEquipments", "cLICK Delete btn "); eqiupment_EquipmentHelper.Clickjs("DeleteEuipment"); eqiupment_EquipmentHelper.WaitForWorkAround(3000); executionLog.Log("CreateEquipments", "Accept alert message. "); eqiupment_EquipmentHelper.AcceptAlert(); eqiupment_EquipmentHelper.WaitForWorkAround(3000); executionLog.Log("CreateEquipments", "Wait for delete message. "); eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully", 30); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CreateEquipments"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Create Equipments"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Create Equipments", "Bug", "Medium", "Create Eqiupment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Equipments"); TakeScreenshot("CreateEquipments"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateEquipments.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CreateEquipments"); string id = loginHelper.getIssueID("Create Equipments"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateEquipments.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Create Equipments"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Create Equipments"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CreateEquipments"); executionLog.WriteInExcel("Create Equipments", Status, JIRA, "Equipment Management"); } }
public void verifyingOfficeEadressIssues() { string[] username1 = null; string[] password1 = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username1 = oXMLData.getData("settings/Credentials", "username_corp"); password1 = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corpOffice_OfficeHelper = new CorpOffice_OfficeHelper(GetWebDriver()); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyingOfficeEadressIssues", "Login with valid username and password"); Login("newthemecorp", "pegasus"); executionLog.Log("VerifyingOfficeEadressIssues", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyingOfficeEadressIssues", "Go to office page"); VisitCorp("offices"); executionLog.Log("VerifyingOfficeEadressIssues", "Verify title"); VerifyTitle("Offices"); executionLog.Log("VerifyingOfficeEadressIssues", "Click On Create button"); corpOffice_OfficeHelper.ClickElement("Create"); executionLog.Log("VerifyingOfficeEadressIssues", "Verify title"); VerifyTitle("Create an Office"); executionLog.Log("VerifyingOfficeEadressIssues", "Verify title"); corpOffice_OfficeHelper.ClickElement("AddEmail"); corpOffice_OfficeHelper.WaitForWorkAround(1000); executionLog.Log("VerifyingOfficeEadressIssues", "Verifies first eaddress label a drop down."); corpOffice_OfficeHelper.Select("EaddressLabel", "Home"); corpOffice_OfficeHelper.WaitForWorkAround(1000); executionLog.Log("VerifyingOfficeEadressIssues", "Select eAddress type as social media."); corpOffice_OfficeHelper.Select("Eadresstype2", "Social Media"); corpOffice_OfficeHelper.WaitForWorkAround(1000); executionLog.Log("VerifyingOfficeEadressIssues", "Verify eAddress label contains social media options."); corpOffice_OfficeHelper.VerifySocialMedia(); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyingOfficeEadressIssues"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verifying Office Eadress Issues"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verifying Office Eadress Issues", "Bug", "Medium", "Office page", "QA", "Log in as: " + username1[0] + " / " + password1[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verifying Office Eadress Issues"); TakeScreenshot("VerifyingOfficeEadressIssues"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingOfficeEadressIssues.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyingOfficeEadressIssues"); string id = loginHelper.getIssueID("Verifying Office Eadress Issues"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingOfficeEadressIssues.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verifying Office Eadress Issues"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verifying Office Eadress Issues"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyingOfficeEadressIssues"); executionLog.WriteInExcel("Verifying Office Eadress Issues", Status, JIRA, "Corp Office"); } }