public void activitiesNotesManagement() { 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_NotesHelper = new OfficeActivities_NotesHelper(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 = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesNotesManagement", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesNotesManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesNotesManagement", "Redirect at admin page."); VisitOffice("admin"); executionLog.Log("ActivitiesNotesManagement", "Go to notes page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", " Click On Create"); officeActivities_NotesHelper.ClickElement("Create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Create a New Note"); executionLog.Log("ActivitiesNotesManagement", "Click on Save "); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify validation text for subject."); officeActivities_NotesHelper.VerifyText("SubjectError", "This field is required."); executionLog.Log("ActivitiesNotesManagement", "Enter note subject."); officeActivities_NotesHelper.TypeText("Subject", name); executionLog.Log("ActivitiesNotesManagement", "Click on save."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Wait for success text"); officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent"); officeActivities_NotesHelper.Select("NoteParent", "20"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any client."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at clients page."); VisitOffice("clients"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click on any client."); office_ClientsHelper.ClickElement("Client1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes."); office_ClientsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search."); office_ClientsHelper.TypeText("ActivitySubject", name); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on client page."); office_ClientsHelper.IsElementPresent("OpenFirstActivity"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); officeActivities_NotesHelper.WaitForWorkAround(3000); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as lead."); officeActivities_NotesHelper.Select("NoteParent", "14"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at leads page."); VisitOffice("leads"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes."); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search."); office_LeadsHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_LeadsHelper.SelectByText("CreatedByField", "All"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on leads page."); office_LeadsHelper.IsElementPresent("ClickNotes1"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as opportunity."); officeActivities_NotesHelper.Select("NoteParent", "15"); executionLog.Log("ActivitiesNotesManagement", "Click on findlist icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn"); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at opportunities page."); VisitOffice("opportunities"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes"); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter notes name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_OpportunitiesHelper.SelectByText("CreateByField", "All"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on opportunity page"); office_OpportunitiesHelper.IsElementPresent("OpenOpportunity"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as tickets."); officeActivities_NotesHelper.Select("NoteParent", "36"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any ticket."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn"); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at tickets page."); VisitOffice("tickets"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any ticket."); ticket_CreateATicketHelper.ClickElement("Ticket1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes"); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter ticket name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_OpportunitiesHelper.SelectByText("CreateByField", "All"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on ticket page."); ticket_CreateATicketHelper.IsElementPresent("OpenTicket"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select First Note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click Delete btn "); officeActivities_NotesHelper.ClickElement("DeleteNote"); executionLog.Log("ActivitiesNotesManagement", "Accept alert message. "); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesNotesManagement", "Wait for delete message. "); officeActivities_NotesHelper.WaitForText("Note deleted successfully", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect to recycle bin"); VisitOffice("notes/recyclebin"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on delete icon."); officeActivities_NotesHelper.ClickElement("DeleteNoteRBin"); //officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Accept alert message."); officeActivities_NotesHelper.AcceptAlert(); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Wait for success message."); officeActivities_NotesHelper.WaitForText("Note Permanently Deleted.", 5); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesNotesManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Notes Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Notes Management", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Activities Notes Management"); TakeScreenshot("ActivitiesNotesManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesNotesManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesNotesManagement"); string id = loginHelper.getIssueID("Activities Notes Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesNotesManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Notes Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Notes Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesNotesManagement"); executionLog.WriteInExcel("Activities Notes Management", Status, JIRA, "Office Activities"); } }
public void profileViewOfClientLeadAndOpportunities() { 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()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); // VARIABLE var name = "TestEmployee" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Clients"); VisitOffice("clients"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any client."); office_ClientsHelper.ClickElement("ClickOnAnyClient"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify View text on page"); office_ClientsHelper.VerifyPageText("View"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Leads"); VisitOffice("leads"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify view text on page"); office_LeadsHelper.VerifyPageText("View"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Opportunities page."); VisitOffice("opportunities"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify view text present on page."); office_OpportunitiesHelper.VerifyPageText("View"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ProfileViewOfClientLeadAndOpportunities"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Profile View Of Client Lead And Opportunities"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Profile View Of Client Lead And Opportunities", "Bug", "Medium", "CLient/Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); TakeScreenshot("ProfileViewOfClientLeadAndOpportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProfileViewOfClientLeadAndOpportunities.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ProfileViewOfClientLeadAndOpportunities"); string id = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProfileViewOfClientLeadAndOpportunities.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ProfileViewOfClientLeadAndOpportunities"); executionLog.WriteInExcel("Profile View Of Client Lead And Opportunities", Status, JIRA, "Leads/Client Management"); } }
public void textWithTitle() { string[] username = null; string[] password = null; String JIRA = ""; String Status = "Pass"; 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()); // VARIABLE var name = "TestEmployee" + GetRandomNumber(); try { executionLog.Log("TextWithTitle", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("TextWithTitle", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("TextWithTitle", "Go to client page"); VisitOffice("clients"); executionLog.Log("TextWithTitle", "Verify title clients"); VerifyTitle(); executionLog.Log("TextWithTitle", "Open a client"); office_ClientsHelper.ClickElement("Client1"); executionLog.Log("TextWithTitle", "Click on 'Owner' tab"); office_ClientsHelper.ClickForce("OwnerTab"); executionLog.Log("TextWithTitle", "Verify title owners"); VerifyTitle("Owners"); executionLog.Log("TextWithTitle", "Verify Text field in header not available"); office_ClientsHelper.verifyElementNotPresent("NoText"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TextWithTitle"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Text with Title"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Text with Title", "Bug", "Medium", "Clients page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Text with Title"); TakeScreenshot("TextWithTitle"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TextWithTitle.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TextWithTitle"); string id = loginHelper.getIssueID("Text with Title"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TextWithTitle.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Text with Title"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Text with Title"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TextWithTitle"); executionLog.WriteInExcel("Text with Title", Status, JIRA, "Client Management"); } }
public void checkFieldRelationshipsOfficeMain() { string[] username = null; string[] password = null; //Connecting XML Documents 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 ExecutionLog executionLog = new ExecutionLog(); LoginHelper loginHelper = new LoginHelper(GetWebDriver()); Office_ClientsHelper clienthelper = new Office_ClientsHelper(GetWebDriver()); // Testing Variables including JIRA variables var name = "Testing Subject" + GetRandomNumber(); var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; try { // Initiating Test Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); VerifyTitle("Dashboard"); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); VisitOffice("clients"); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); clienthelper.ClickElement("Client1"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); // Testing Rates and Fees Relationships executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("TabRatesandFees"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("SelectProcessorRF"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("FirstDataNorthOption"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); clienthelper.IsElementPresent("DiscountFrequency"); executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("SelectProcessorRF"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("FirstDataOmahaOption"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); clienthelper.IsElementPresent("DiscountCollected"); // Testing Marketting Tab relationships executionLog.Log("OfficeMainFieldRelationships", "Clicking tabRateFees"); clienthelper.ClickElement("ClickOnMarketingTab"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", " Testing A Client"); clienthelper.IsElementPresent("SelectDidMerchantChooseOffice"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "DidMerchantChooseOffice-Yes"); clienthelper.ClickElement("DidMerchantChooseOffice-Yes"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "PreviousMerchantAccnt"); clienthelper.ClickElement("PreviousMerchantAccnt"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "PreviousMerchantAccnt-Yes"); clienthelper.ClickElement("PreviousMerchantAccnt-Yes"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "PreviousMerchantNumber"); clienthelper.IsElementPresent("PreviousMerchantNumber"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "DidMerchantChooseOffice-No"); clienthelper.ClickElement("DidMerchantChooseOffice-No"); executionLog.Log("OfficeMainFieldRelationships", "Wait"); clienthelper.WaitForWorkAround(2000); executionLog.Log("OfficeMainFieldRelationships", "ReasonForNotChoosing"); clienthelper.IsElementPresent("ReasonForNotChoosing"); // Beginning Aslam's code for JIRA } catch (Exception e) { Console.WriteLine("ERRROROOR"); executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("OfficeMainFieldRelationships"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("OfficeMainFieldRelationships"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("OfficeMainFieldRelationships", "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("OfficeMainFieldRelationships"); TakeScreenshot("OfficeMainFieldRelationships"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OfficeMainFieldRelationships.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OfficeMainFieldRelationships"); string id = loginHelper.getIssueID("Jtable Common Layout OfficeMain"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OfficeMainFieldRelationships.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Jtable Common Layout OfficeMain"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Jtable Common Layout OfficeMain"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OfficeMainFieldRelationships"); executionLog.WriteInExcel("Jtable Common Layout OfficeMain", Status, JIRA, "Activities"); } }
public void labelSelectforClient() { 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_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LabelSelectforClient", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LabelSelectforClient", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LabelSelectforClient", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("LabelSelectforClient", "Search the Company"); office_ClientsHelper.TypeText("SearchClient", "Client"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("LabelSelectforClient", "Click on any Client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("LabelSelectforClient", "Verify Select for category"); office_ClientsHelper.VerifyText("CategoryClient", "Select"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LabelSelectforClient"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Label Select for Client"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Label Select for Client", "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("Label Select for Client"); TakeScreenshot("LabelSelectforClient"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LabelSelectforClient.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LabelSelectforClient"); string id = loginHelper.getIssueID("Label Select for Client"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LabelSelectforClient.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Label Select for Client"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Label Select for Client"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LabelSelectforClient"); executionLog.WriteInExcel("Label Select for Client", Status, JIRA, "Clients Management"); } }
public void verifyDocumentShareDBAPopulate() { 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()); var yopmail_Helper = new YopMailHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 9999); var OwnerFirst = "Owner" + RandomNumber(1, 9999); var OwnerLast = "Test" + RandomNumber(1, 9999); var DBAVerify = "Merchant Portal - " + DBA + " You have documents waiting for review"; // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyDocumentShareDBAPopulate", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected to Dashboard"); VisitOffice("clients/create"); office_clientsHelper.WaitForWorkAround(2000); Console.WriteLine("Redirected to Create Merchant page"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Bussiness DBA name"); office_clientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter First Name"); office_clientsHelper.TypeText("FirstName", "Test"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Last Name"); office_clientsHelper.TypeText("LastName", "Client"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Status"); office_clientsHelper.SelectByText("Status", "New"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Responsibility"); office_clientsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("Save"); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Merchant Created"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Owners tab"); office_clientsHelper.ClickElement("OwnerTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Owners tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner First Name"); office_clientsHelper.TypeText("OwnerFirstName", OwnerFirst); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Last Name"); office_clientsHelper.TypeText("OwnerLastName", OwnerLast); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Title"); office_clientsHelper.TypeText("TitleOwner", "NewTitle"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select eAddress Type"); office_clientsHelper.SelectByText("OwnereAddressType", "E-Mail"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter eAddress"); office_clientsHelper.TypeText("OwnereAddressEnter", "*****@*****.**"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("OwnerSave"); Console.WriteLine("Owner Information saved"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Default Password radio button"); office_clientsHelper.ClickElement("DefaultPwdRadioBtn"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create button"); office_clientsHelper.ClickElement("CreateBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Close Create User Popup"); office_clientsHelper.ClickElement("CrossIcon"); Console.WriteLine("Client User Created"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Info tab"); office_clientsHelper.ClickElement("InfoTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Info tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create/Manage button"); office_clientsHelper.ClickForce("ManageClientUser"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Manage option"); office_clientsHelper.ClickElement("ManageOption"); office_clientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select User"); office_clientsHelper.ClickElement("ClientChkBox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Activate Selected User button"); office_clientsHelper.ClickElement("ActivateBtn"); office_clientsHelper.WaitForWorkAround(4000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Client User Activated"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Owners Signature Required check box"); office_clientsHelper.ClickElement("OwnerSignReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Documents Required check box"); office_clientsHelper.ClickElement("DocReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Share button"); office_clientsHelper.ClickElement("ShareBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); Console.WriteLine("File Shared successfully"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to yopmail.com"); GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); yopmail_Helper.WaitForWorkAround(3000); Console.WriteLine("Redirected to yopmail.com"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Email"); yopmail_Helper.TypeText("Yopmail", "owner.pegasus"); yopmail_Helper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Check Inbox button"); yopmail_Helper.ClickElement("YopmailClick"); Console.WriteLine("Entered into inbox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify DBA Name present in Subject of email"); yopmail_Helper.switchFrame("ifmail"); yopmail_Helper.VerifyText("SubjectFirstMail", DBA); Console.WriteLine("DBA Name is populated in Subject if email"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyDocumentShareDBAPopulate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Document Share DBA Populate"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Document Share DBA Populate", "Bug", "Medium", "Office Merchant", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string id = loginHelper.getIssueID("Verify Document Share DBA Populate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Document Share DBA Populate"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Document Share DBA Populate"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyDocumentShareDBAPopulate"); executionLog.WriteInExcel("Verify Document Share DBA Populate", Status, JIRA, "Office Merchant"); } }
public void clientZipCode() { 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()); // Variable var DBA = "Client" + RandomNumber(1222, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientZipCode", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientZipCode", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientZipCode", "Create Client"); VisitOffice("clients/create"); executionLog.Log("ClientZipCode", "Verify page title"); VerifyTitleMerchantClient(); executionLog.Log("ClientZipCode", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("ClientZipCode", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientZipCode", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientZipCode", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("ClientZipCode", "Wait for element to be visible."); office_ClientsHelper.WaitForElementPresent("CompanyDetails", 10); executionLog.Log("ClientZipCode", "Goto Company details tab."); office_ClientsHelper.ClickElement("CompanyDetails"); executionLog.Log("ClientZipCode", "Enter Client federal tax id."); office_ClientsHelper.TypeText("FederalTaxID", "111122222"); executionLog.Log("ClientZipCode", "Enter Mail Client Address"); office_ClientsHelper.TypeText("AddressLine1MailingAddress", "Test"); executionLog.Log("ClientZipCode", "Enter Mailing Zip Code"); office_ClientsHelper.TypeText("ZipCodeMailingAddress", "60601"); executionLog.Log("ClientZipCode", "Click On Client Contact Tab"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Enetr Client First Name"); office_ClientsHelper.TypeText("ContactFirstName", "My Client"); executionLog.Log("ClientZipCode", "Enter Zip Code"); office_ClientsHelper.TypeText("ContactZipCode", "60601"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientZipCode", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("ClientZipCode", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientZipCode", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("ClientZipCode", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCode", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("ClientZipCode", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); executionLog.Log("ClientZipCode", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Select all in responsibity"); office_ClientsHelper.SelectByText("ClientResponsibityRecycle", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("ClientZipCode", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCode", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientZipCode"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Zip Code"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Zip Code", "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 Zip Code"); TakeScreenshot("ClientZipCode"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCode.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientZipCode"); string id = loginHelper.getIssueID("Client Zip Code"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCode.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Zip Code"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Zip Code"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientZipCode"); executionLog.WriteInExcel("Client Zip Code", Status, JIRA, "Client Management"); } }
public void verifyClientsPricingPlanDropDownOptions() { 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()); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Redirect at All merchants page"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Open any merchant"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Go to Rates and Fees tab"); office_ClientsHelper.ClickElement("RatesAndFee"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsPricingPlanDropDownOptions", "Verify Gross and Net option present"); office_ClientsHelper.VerifyText("PricingPlan", "Gross"); office_ClientsHelper.VerifyText("PricingPlan", "Net"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyClientsPricingPlanDropDownOptions"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Clients Pricing Plan Drop Down Options"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Clients Pricing Plan Drop Down Options", "Bug", "Medium", "Office Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Clients Pricing Plan Drop Down Options"); TakeScreenshot("VerifyClientsPricingPlanDropDownOptions"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientsPricingPlanDropDownOptions.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyClientsPricingPlanDropDownOptions"); string id = loginHelper.getIssueID("Verify Clients Pricing Plan Drop Down Options"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientsPricingPlanDropDownOptions.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Clients Pricing Plan Drop Down Options"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Clients Pricing Plan Drop Down Options"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyClientsPricingPlanDropDownOptions"); executionLog.WriteInExcel("Verify Clients Pricing Plan Drop Down Options", Status, JIRA, "Office Merchants"); } }
public void downloadIdsManagement() { 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 equipment_DownloadIDHelper = new Equipment_DownloadIDHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable var Name = "Download" + RandomNumber(1, 999); var name = "UpdateDown" + RandomNumber(33, 9999); var Id = "12" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("DownloadIdsManagement", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("DownloadIdsManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("DownloadIdsManagement", "Redirect To Downlaod id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Download IDs"); executionLog.Log("DownloadIdsManagement", " Click On Create"); equipment_DownloadIDHelper.ClickElement("Create"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Manage Master Equipment Type Download Ids"); executionLog.Log("DownloadIdsManagement", " Click on Save button"); equipment_DownloadIDHelper.ClickElement("Save"); //equipment_DownloadIDHelper.WaitForWorkAround(5000); executionLog.Log("DownloadIdsManagement", " Verify error for type"); equipment_DownloadIDHelper.VerifyText("TypeError", "This field is required."); executionLog.Log("DownloadIdsManagement", " Verify validation for name"); equipment_DownloadIDHelper.VerifyText("NameError", "This field is required"); executionLog.Log("DownloadIdsManagement", "Verify validation for ID"); equipment_DownloadIDHelper.VerifyText("IDError", "This field is required."); executionLog.Log("DownloadIdsManagement", "Select DownloadIdsType"); equipment_DownloadIDHelper.Select("DownloadIdsType", "Terminal"); executionLog.Log("DownloadIdsManagement", "Enter DownloadsIDName"); equipment_DownloadIDHelper.TypeText("DownloadsIDName", Name); executionLog.Log("DownloadIdsManagement", "Enter DownloadsID"); equipment_DownloadIDHelper.TypeText("DownloadID", Id); executionLog.Log("DownloadIdsManagement", "Select Status"); equipment_DownloadIDHelper.Select("Status", "0"); executionLog.Log("DownloadIdsManagement", " Click on Save button"); equipment_DownloadIDHelper.ClickElement("Save"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for text"); equipment_DownloadIDHelper.WaitForText("The download id is successfully created!!", 10); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Click on Edit button"); equipment_DownloadIDHelper.ClickElement("Edit"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Manage Master Equipment Type Download Ids"); executionLog.Log("DownloadIdsManagement", "Select DownloadIdsType"); equipment_DownloadIDHelper.Select("DownloadIdsType", "VAR"); executionLog.Log("DownloadIdsManagement", "Enter DownloadsIDName"); equipment_DownloadIDHelper.TypeText("DownloadsIDName", name); executionLog.Log("DownloadIdsManagement", "Enter DownloadsID"); equipment_DownloadIDHelper.TypeText("DownloadID", Id + "22"); executionLog.Log("DownloadIdsManagement", "Select Status"); equipment_DownloadIDHelper.Select("Status", "0"); executionLog.Log("DownloadIdsManagement", " Click on Save button "); equipment_DownloadIDHelper.ClickElement("Save"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for text"); equipment_DownloadIDHelper.WaitForText("The download id is successfully updated!!", 10); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Redirect at clients page"); VisitOffice("clients"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify page title"); VerifyTitle(); executionLog.Log("DownloadIdsManagement", "Click on any client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on terminals and equipment tab"); office_ClientsHelper.ClickElement("TerminalsandEquipments"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on Add equipment"); office_ClientsHelper.ClickElement("AddEquipment"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Click on any equipment"); office_ClientsHelper.ClickForce("Equipment1"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Verify created Download ID present on page."); Assert.IsTrue(office_ClientsHelper.IsElementPresent("//select//option[text()= '" + name + "']")); //office_ClientsHelper.WaitForWorkAround(7000); executionLog.Log("DownloadIdsManagement", "Redirect at download id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id + "22"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", " Click to change status"); equipment_DownloadIDHelper.ClickElement("StatusToggle"); executionLog.Log("DownloadIdsManagement", " Accept alert message."); equipment_DownloadIDHelper.AcceptAlert(); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Wait for status updation message"); equipment_DownloadIDHelper.WaitForText("Equipment Download ID is successfully deactivated", 10); executionLog.Log("DownloadIdsManagement", "Redirect at clients page"); VisitOffice("clients"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify page title"); VerifyTitle(); executionLog.Log("DownloadIdsManagement", "Click on any client"); office_ClientsHelper.ClickElement("Client1"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on terminals and equipment tab"); equipment_DownloadIDHelper.ClickElement("TerminalsandEquipments"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on Add equipment"); equipment_DownloadIDHelper.ClickElement("AddEquipment"); equipment_DownloadIDHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Click on any equipment"); equipment_DownloadIDHelper.ClickViaJavaScript("//*[@id='popupContent']/table/tbody/tr[1]/td[1]/a"); equipment_DownloadIDHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Verify download id not present on page."); Assert.IsFalse(equipment_DownloadIDHelper.IsElementPresent("//select//option[text()= '" + name + "']")); executionLog.Log("DownloadIdsManagement", "Redirect At download id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id + "22"); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", " Click on Change status icon"); equipment_DownloadIDHelper.ClickElement("StatusToggle"); executionLog.Log("DownloadIdsManagement", " Accept Alert message."); equipment_DownloadIDHelper.AcceptAlert(); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for status updation message"); equipment_DownloadIDHelper.WaitForText("Equipment Download ID is successfully activated", 5); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("DownloadIdsManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("DownloadIds Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("DownloadIds Management", "Bug", "Medium", "Create DownloadsIDS page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("DownloadIds Management"); TakeScreenshot("DownloadIdsManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DownloadIdsManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("DownloadIdsManagement"); string id = loginHelper.getIssueID("DownloadIds Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DownloadIdsManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("DownloadIds Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("DownloadIds Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("DownloadIdsManagement"); executionLog.WriteInExcel("DownloadIds Management", Status, JIRA, "Equipment Management"); } }
public void uniqueDocError() { string[] username = null; string[] password = null; String JIRA = ""; String Status = "Pass"; 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()); var officeActivities_DocumentHelper = new OfficeActivities_DocumentHelper(GetWebDriver()); try { executionLog.Log("UniqueDocError", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("UniqueDocError", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("UniqueDocError", "Redirect To create Document page"); VisitOffice("documents/create"); executionLog.Log("UniqueDocError", "Verify title"); VerifyTitle("Create a New Document"); executionLog.Log("UniqueDocError", "ClickOnCreate"); officeActivities_DocumentHelper.TypeText("Name", "Doc1"); string pathtofile = GetPathToFile() + "Upload1.pdf"; executionLog.Log("UniqueDocError", "Attach File"); officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile); executionLog.Log("UniqueDocError", "Select releted to"); officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client"); executionLog.Log("UniqueDocError", "Select Client"); officeActivities_DocumentHelper.ClickElement("Assign"); officeActivities_DocumentHelper.WaitForWorkAround(4000); officeActivities_DocumentHelper.ClickElement("AssignUser"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Click on Save"); officeActivities_DocumentHelper.ClickElement("Save"); executionLog.Log("UniqueDocError", "Wait for success message."); officeActivities_DocumentHelper.WaitForText("Document saved successfully.", 10); executionLog.Log("UniqueDocError", "Redirect To Document"); VisitOffice("documents/create"); executionLog.Log("UniqueDocError", "Verify title"); VerifyTitle("Create a New Document"); executionLog.Log("UniqueDocError", "ClickOnCreate"); officeActivities_DocumentHelper.TypeText("Name", "Doc2"); pathtofile = GetPathToFile() + "Upload2.pdf"; executionLog.Log("UniqueDocError", "Attach File"); officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile); executionLog.Log("UniqueDocError", "Select releted to"); officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Select Client"); officeActivities_DocumentHelper.ClickElement("Assign"); officeActivities_DocumentHelper.WaitForWorkAround(4000); officeActivities_DocumentHelper.ClickElement("AssignUser"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Click on Save"); officeActivities_DocumentHelper.ClickElement("Save"); executionLog.Log("UniqueDocError", "Wait for success message."); officeActivities_DocumentHelper.WaitForText("Document saved successfully.", 10); executionLog.Log("UniqueDocError", "Verify page title."); VerifyTitle("Documents"); executionLog.Log("UniqueDocError", "Redirect To Document"); VisitOffice("documents/create"); executionLog.Log("UniqueDocError", "ClickOnCreate"); officeActivities_DocumentHelper.TypeText("Name", "Doc3"); pathtofile = GetPathToFile() + "Upload3.pdf"; executionLog.Log("UniqueDocError", "Attach File"); officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile); executionLog.Log("UniqueDocError", "Select releted to"); officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Select Client"); officeActivities_DocumentHelper.ClickElement("Assign"); officeActivities_DocumentHelper.WaitForWorkAround(4000); officeActivities_DocumentHelper.ClickElement("AssignUser"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Click on Save"); officeActivities_DocumentHelper.ClickElement("Save"); executionLog.Log("UniqueDocError", "Wait for success message."); officeActivities_DocumentHelper.WaitForText("Document saved successfully.", 10); executionLog.Log("UniqueDocError", "Go to client page"); VisitOffice("clients"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Verify title"); VerifyTitle(); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Open the client"); office_ClientsHelper.ClickElement("Client1"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Click on info"); office_ClientsHelper.ClickElement("Info"); officeActivities_DocumentHelper.WaitForWorkAround(2000); executionLog.Log("UniqueDocError", "Verify title"); VerifyTitle("- Details"); officeActivities_DocumentHelper.WaitForWorkAround(2000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("UniqueDocError"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Unique Doc Error"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Unique Doc Error", "Bug", "Medium", "Documents page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Unique Doc Error"); TakeScreenshot("UniqueDocError"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\UniqueDocError.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("UniqueDocError"); string id = loginHelper.getIssueID("Unique Doc Error"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\UniqueDocError.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Unique Doc Error"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Unique Doc Error"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("UniqueDocError"); executionLog.WriteInExcel("Unique Doc Error", Status, JIRA, "Office Activities"); } }
public void verifyCreatedSectionReflect() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_FieldDictionary_SectionsHelper = new Office_FieldDictionary_SectionsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); String Status = "Pass"; String JIRA = ""; var secname = "Test" + GetRandomNumber(); try { executionLog.Log("VerifyCreatedSectionReflect", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyCreatedSectionReflect", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyCreatedSectionReflect", "Go to Field Dictionary Section page"); VisitOffice("sections"); office_FieldDictionary_SectionsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatedSectionReflect", "Verify Title"); VerifyTitle("Section Management"); executionLog.Log("VerifyCreatedSectionReflect", "Select Module >> Clients"); office_FieldDictionary_SectionsHelper.Selectbytext("SelectModule", "Clients"); office_FieldDictionary_SectionsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatedSectionReflect", "Select Tab >> Company Details"); office_FieldDictionary_SectionsHelper.Selectbytext("SelectTab", "Company Details"); office_FieldDictionary_SectionsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyCreatedSectionReflect", "Click on Create button"); office_FieldDictionary_SectionsHelper.ClickElement("Create"); office_FieldDictionary_SectionsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatedSectionReflect", "Enter section name"); office_FieldDictionary_SectionsHelper.TypeText("Name", secname); executionLog.Log("VerifyCreatedSectionReflect", "Click on Save button"); office_FieldDictionary_SectionsHelper.ClickElement("Save"); office_FieldDictionary_SectionsHelper.WaitForWorkAround(1000); office_FieldDictionary_SectionsHelper.AcceptAlert(); office_FieldDictionary_SectionsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyCreatedSectionReflect", "Redirect to All merchants page"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatedSectionReflect", "Open any merchant"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatedSectionReflect", "Go to Company Details"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatedSectionReflect", "Verify created section appearing"); office_ClientsHelper.VerifyPageText(secname); executionLog.Log("VerifyCreatedSectionReflect", "Log out from the application"); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyCreatedSectionReflect"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Created Section Reflect"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Created Section Reflect", "Bug", "Medium", "Field Section page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Created Section Reflect"); TakeScreenshot("VerifyCreatedSectionReflect"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCreatedSectionReflect.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyCreatedSectionReflect"); string id = loginHelper.getIssueID("Verify Created Section Reflect"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCreatedSectionReflect.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Created Section Reflect"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Created Section Reflect"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyCreatedSectionReflect"); executionLog.WriteInExcel("Verify Created Section Reflect", Status, JIRA, "Field Management"); } }
public void verifyClientTabs() { 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 executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_FieldDictionary_TabsHelper = new Office_FieldDictionary_TabsHelper(GetWebDriver()); var office_ClientHelper = new Office_ClientsHelper(GetWebDriver()); //Variable var name = "Test" + GetRandomNumber(); var num = "Test" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; // try // { executionLog.Log("VerifyClientTabs", " Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyClientTabs", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyClientTabs", "Click On Admin"); VisitOffice("admin"); executionLog.Log("VerifyClientTabs", "Redirect To URL"); VisitOffice("tabs"); executionLog.Log("VerifyClientTabs", "Verify title"); VerifyTitle("Tabs Management"); executionLog.Log("VerifyClientTabs", "Select lead"); office_FieldDictionary_TabsHelper.Select("TabsIn", "20"); executionLog.Log("VerifyClientTabs", "Click Create Btn"); office_FieldDictionary_TabsHelper.ClickElement("Create"); office_FieldDictionary_TabsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyClientTabs", "Enter Name"); office_FieldDictionary_TabsHelper.TypeText("Name", name); executionLog.Log("VerifyClientTabs", "Click on save button"); office_FieldDictionary_TabsHelper.ClickElement("Save"); executionLog.Log("VerifyClientTabs", "Wait for success text."); office_FieldDictionary_TabsHelper.WaitForText("Tab Created Successfully", 10); executionLog.Log("VerifyClientTabs", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("VerifyClientTabs", "Verify title"); VerifyTitle("Clients"); executionLog.Log("VerifyClientTabs", "Click On Any Client"); office_ClientHelper.ClickElement("Client1"); executionLog.Log("VerifyClientTabs", "Verify title"); VerifyTitle("- Details"); executionLog.Log("VerifyClientTabs", "Verify tab present on client page."); office_FieldDictionary_TabsHelper.WaitForText(name, 30); executionLog.Log("VerifyClientTabs", "Redirect To URL"); VisitOffice("tabs"); executionLog.Log("VerifyClientTabs", "Verify title"); VerifyTitle("Tabs Management"); }
public void validateName() { 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 ExecutionLog executionLog = new ExecutionLog(); LoginHelper loginHelper = new LoginHelper(GetWebDriver()); var validateNames = new AdminValidateDisplayNamesHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Random Variable String JIRA = ""; String Status = "Pass"; var DBAName = "DBA@Company" + RandomNumber(1, 999); try { //executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); //validateNames.WaitForWorkAround(2000); //Logging in executionLog.Log(" AdminValidateDisplayNames", "Login"); Login(username[0], password[0]); //executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); //validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", "Verify Dashboard"); VerifyTitle("Dashboard"); //VisitOffice("clients"); //validateNames.WaitForWorkAround(3000); //executionLog.Log(" AdminValidateDisplayNames", " Search the clients name "); //validateNames.TypeText("SearchFields", "Client's Name"); //validateNames.WaitForWorkAround(3000); //executionLog.Log(" AdminValidateDisplayNames", " Click on FirstClient "); //validateNames.ClickElement("FirstClient"); //executionLog.Log(" AdminValidateDisplayNames", "Hover on CompanyDetails "); //validateNames.MouseHover("CompanyDetails"); //executionLog.Log(" AdminValidateDisplayNames", " Click on CompanyDetails "); //validateNames.ClickElement("CompanyDetails"); //// Verifying the field exists that will be changed //executionLog.Log(" AdminValidateDisplayNames", " Verify NameCity "); //validateNames.ElementVisible("AddressLine1"); //// Going to admin office //executionLog.Log(" AdminValidateDisplayNames", " Visit office admin "); //VisitOffice("admin"); //validateNames.WaitForWorkAround(4000); // Accessing field in field dictionary VisitOffice("fields"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module"); validateNames.SelectByText("Module", "Clients"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationTime", "Select Processor as First Data North"); validateNames.SelectByText("Processor", "First Data North"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module tab"); validateNames.SelectByText("Tab", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select Section as Company Address"); validateNames.SelectByText("Section", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log(" AdminValidateDisplayNames", " Click on Search "); validateNames.ClickElement("Search"); validateNames.WaitForWorkAround(3000); executionLog.Log(" AdminValidateDisplayNames", " Click on Addressline1D "); validateNames.ClickElement("StoreName"); validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", " Click on FieldDisplayName "); validateNames.ClickElement("ProcFieldDisplayName"); // Changing the name of the field executionLog.Log(" AdminValidateDisplayNames", " Type City Name Here"); validateNames.TypeText("ProcFieldDisplayName", "Test"); executionLog.Log(" AdminValidateDisplayNames", " Click on Save "); validateNames.ClickElement("SaveFieldManager"); executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); validateNames.WaitForWorkAround(3000); // Vist Clients site executionLog.Log("AdminValidateDisplayNames", "Redirect at Create Client"); VisitOffice("clients/create"); validateNames.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Select Processor"); office_ClientsHelper.SelectByText("CreateProc", "First Data North"); executionLog.Log("AdminValidateDisplayNames", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBAName); executionLog.Log("AdminValidateDisplayNames", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("AdminValidateDisplayNames", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("AdminValidateDisplayNames", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("AdminValidateDisplayNames", "Click On Contact Tab Clinet"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Verify Title of Store Name"); office_ClientsHelper.VerifyText("StoreNameLabel", "Test"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Redirect To clients page. "); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select client by check box"); office_ClientsHelper.ClickForce("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("AdminValidateDisplayNames", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminValidateDisplayNames", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("AdminValidateDisplayNames", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("AdminValidateDisplayNames", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminValidateDisplayNames", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); // Vist field site VisitOffice("fields"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module"); validateNames.SelectByText("Module", "Clients"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationTime", "Select Processor as First Data North"); validateNames.SelectByText("Processor", "First Data North"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module tab"); validateNames.SelectByText("Tab", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select Section as Company Address"); validateNames.SelectByText("Section", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log(" AdminValidateDisplayNames", " Click on Search "); validateNames.ClickElement("Search"); validateNames.WaitForWorkAround(3000); executionLog.Log(" AdminValidateDisplayNames", " Click on Addressline1D "); validateNames.ClickElement("StoreName"); validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", " Click on FieldDisplayName "); validateNames.ClickElement("ProcFieldDisplayName"); // Changing the name of the field executionLog.Log(" AdminValidateDisplayNames", " Type City Name Here"); validateNames.TypeText("ProcFieldDisplayName", "Store/DBA Name"); executionLog.Log(" AdminValidateDisplayNames", " Click on Save "); validateNames.ClickElement("SaveFieldManager"); executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); validateNames.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminValidateDisplayNames"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("AdminValidateDisplayNames"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("AdminValidateDisplayNames", "Bug", "Medium", "Calls page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("AdminValidateDisplayNames"); TakeScreenshot("AdminValidateDisplayNames"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminValidateDisplayNames.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminValidateDisplayNames"); string id = loginHelper.getIssueID("Admin Validate Display Names"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminValidateDisplayNames.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Validate Display Names"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Validate Display Names"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminValidateDisplayNames"); executionLog.WriteInExcel("Admin Validate Display Names", Status, JIRA, "Office"); } }
public void verifyLegalNameOnEmailOnCorpMerchant() { string[] username = null; string[] password = null; string[] username1 = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username1 = oXMLData.getData("settings/Credentials", "username_office"); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corp_MerchantHelper = new Corp_MerchantHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var officeActivities_EmailsHelper = new OfficeActivities_EmailsHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(111, 999999); var email = DBA + "@yopmail.com"; // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Login to office portal with valid username and password"); Login(username1[0], password[0]); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to Create Merchant page"); VisitOffice("clients/create"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter DBA name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Select the client status"); office_ClientsHelper.SelectByText("Status", "New"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "select the responsibility"); office_ClientsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on save btn"); office_ClientsHelper.ClickElement("Save"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Go to Company Details tab"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter Legal Name"); office_ClientsHelper.TypeText("ClientLegalName", DBA); //office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Save button"); office_ClientsHelper.ClickElement("CDSave"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Send Email button"); office_ClientsHelper.ClickElement("CDSendEmailBtn"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter email in To"); officeActivities_EmailsHelper.TypeText("To", email); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Send button"); officeActivities_EmailsHelper.ClickElement("Send"); officeActivities_EmailsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Logout from office portal"); VisitOffice("logout"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Login to corp portal with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to All Merchant page"); VisitCorp("merchants"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to Create Merchant page"); corp_MerchantHelper.TypeText("EnterClinentToSearch", DBA); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Open created merchant"); corp_MerchantHelper.ClickElement("OpenMerchant"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Open sent email"); corp_MerchantHelper.ClickElement("ClickOnActivityAny"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Verify Legal Name"); corp_MerchantHelper.VerifyText("LegalName", DBA); Console.WriteLine("Legal Name is appearing on View Email page"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Logout from the corp portal"); VisitCorp("logout"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Login with valid username and password"); Login(username1[0], password[0]); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Search the company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on check box"); office_ClientsHelper.ClickElement("ClickOnCheckBox"); executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Delete the client"); office_ClientsHelper.ClickJS("DeleteClient"); office_ClientsHelper.AcceptAlert(); office_ClientsHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyLegalNameOnEmailOnCorpMerchant"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Legal Name On Email On Corp Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Legal Name On Email On Corp Merchant", "Bug", "Medium", "Corp Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Legal Name On Email On Corp Merchant"); TakeScreenshot("VerifyLegalNameOnEmailOnCorpMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyLegalNameOnEmailOnCorpMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyLegalNameOnEmailOnCorpMerchant"); string id = loginHelper.getIssueID("Verify Legal Name On Email On Corp Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyLegalNameOnEmailOnCorpMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Legal Name On Email On Corp Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Legal Name On Email On Corp Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyLegalNameOnEmailOnCorpMerchant"); executionLog.WriteInExcel("Verify Legal Name On Email On Corp Merchant", Status, JIRA, "Corp Merchant"); } }
public void clientProductSaveIsue() { 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 executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable var data = "Product" + RandomNumber(444, 999); String JIRA = ""; String Status = "Pass"; // try // { executionLog.Log("ClientProductSaveIsue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientProductSaveIsue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientProductSaveIsue", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("ClientProductSaveIsue", "Verify page title as clients."); VerifyTitle("Clients"); executionLog.Log("ClientProductSaveIsue", "Click on any client."); office_ClientsHelper.ClickElement("Client1"); executionLog.Log("ClientProductSaveIsue", "Click on products tab."); office_ClientsHelper.ClickElement("Products"); executionLog.Log("ClientProductSaveIsue", "Select first product to edit."); office_ClientsHelper.ClickElement("Product1Chk"); executionLog.Log("ClientProductSaveIsue", "Wait for locator to present."); office_ClientsHelper.WaitForElementPresent("ProductText", 10); executionLog.Log("ClientProductSaveIsue", "Enter data in first product."); office_ClientsHelper.TypeText("ProductText", data); executionLog.Log("ClientProductSaveIsue", "Select second product to edit."); office_ClientsHelper.ClickElement("Product2Chk"); executionLog.Log("ClientProductSaveIsue", "Enter a valid email in second product."); office_ClientsHelper.TypeText("ProductText2", "*****@*****.**"); executionLog.Log("ClientProductSaveIsue", "Click on save button."); office_ClientsHelper.ClickElement("SaveButtonByTitle"); executionLog.Log("ClientProductSaveIsue", "Wait for success text."); office_ClientsHelper.WaitForText("Client data updated successfully. ", 10); executionLog.Log("ClientProductSaveIsue", "verify saved data not removed."); office_ClientsHelper.ProductData(data); }
public void verifyClientDBACityStateCountryPopulate() { 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_MerchantHelper = new Office_ClientsHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 5000); var ticketname = "Testticket" + RandomNumber(1, 500); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Redirect to Create merchant page"); VisitOffice("clients"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Click on client"); office_MerchantHelper.ClickElement("Client1"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Go to Company Details tab"); office_MerchantHelper.ClickElement("CompanyDetailsTab"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Mailing Address"); office_MerchantHelper.TypeText("MailZipCode", "15001"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Poulate"); office_MerchantHelper.VerifyTextBoxValue("MailCity", "Aliquippa"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Poulate"); office_MerchantHelper.VerifyTextBoxValue("MailCounty", "Beaver"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Poulate"); office_MerchantHelper.verifyselectedOptn("MailCountry", "United States"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Poulate"); office_MerchantHelper.verifyselectedOptn("MailState", "PA"); Console.WriteLine("City, County, Country and State populated successfully"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Address Line 1 of Location Addess"); office_MerchantHelper.TypeText("LocAddLine1", "Add Line 1"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Address Line 2 of Location Addess"); office_MerchantHelper.TypeText("LocAddLine2", "Add Line 2"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Location Address"); office_MerchantHelper.TypeText("LocZipCode", "20001"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Select Same as Location Address check box"); office_MerchantHelper.ClickElement("SameAsLocChkBox"); office_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Address Line 1 Copied"); office_MerchantHelper.VerifyTextBoxValue("MailAddLine1", "Add Line 1"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Address Line 2 Copied"); office_MerchantHelper.VerifyTextBoxValue("MailAddLine2", "Add Line 2"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Copied"); office_MerchantHelper.VerifyTextBoxValue("MailCity", "Washington"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Copied"); office_MerchantHelper.VerifyTextBoxValue("MailCounty", "District of Columbia"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Copied"); office_MerchantHelper.verifyselectedOptn("MailCountry", "United States"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Copied"); office_MerchantHelper.verifyselectedOptn("MailState", "DC"); Console.WriteLine("City, County, Country and State copied successfully"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Go to Owners tab"); office_MerchantHelper.ClickElement("OwnerTab"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Title"); office_MerchantHelper.TypeText("TitleOwner", "Title"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Address"); office_MerchantHelper.TypeText("Owner1Zip1", "15001"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Poulate"); office_MerchantHelper.VerifyTextBoxValue("Owner1City1", "Aliquippa"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Poulate"); office_MerchantHelper.VerifyTextBoxValue("Owner1County1", "Beaver"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Poulate"); office_MerchantHelper.verifyselectedOptn("Owner1Country1", "United States"); executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Poulate"); office_MerchantHelper.verifyselectedOptn("Owner1State1", "PA"); Console.WriteLine("Owner's City, County, Country and State populated successfully"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyClientDBACityStateCountryPopulate"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Client DBA City State Country Populate"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Client DBA City State Country Populate", "Bug", "Medium", "Office Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Client DBA City State Country Populate"); TakeScreenshot("VerifyClientDBACityStateCountryPopulate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientDBACityStateCountryPopulate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyClientDBACityStateCountryPopulate"); string id = loginHelper.getIssueID("Verify Client DBA City State Country Populate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientDBACityStateCountryPopulate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Client DBA City State Country Populate"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Client DBA City State Country Populate"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyClientDBACityStateCountryPopulate"); executionLog.WriteInExcel("Verify Client DBA City State Country Populate", Status, JIRA, "Office Merchant"); } }
public void clientEmailUrlChange() { 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()); var officeActivities_EmailHelper = new OfficeActivities_EmailsHelper(GetWebDriver()); // Variable var SendTo = "Test" + GetRandomNumber() + "@yopmail.com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientEmailUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientEmailUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientEmailUrlChange", "Goto User Agent >> Client"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Click On Any Client"); office_ClientsHelper.ClickElement("ClickOnAnyClient"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Click On Send Email button"); office_ClientsHelper.ClickElement("AddEmail"); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("ClientEmailUrlChange", "Enter Email Id"); officeActivities_EmailHelper.TypeText("To", SendTo); var EmailName = "Email Subj Test" + GetRandomNumber(); executionLog.Log("ClientEmailUrlChange", "Enter Subject"); officeActivities_EmailHelper.TypeText("EmailName", EmailName); //officeActivities_EmailHelper.WaitForWorkAround(4000); executionLog.Log("ClientEmailUrlChange", "Click on Send button"); officeActivities_EmailHelper.ClickElement("SendEmailActivity"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Select Activity >> Email"); officeActivities_EmailHelper.Select("SelectActivityType", "E-Mails"); executionLog.Log("ClientEmailUrlChange", "Click on Email in Activity"); officeActivities_EmailHelper.ClickJS("ClickEmail1"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Change the url with the url number of another office"); VisitOffice("mails/view/ "); //officeActivities_EmailHelper.WaitForWorkAround(4000); executionLog.Log("ClientEmailUrlChange", "Verify Validation"); officeActivities_EmailHelper.WaitForText("You don't have privileges to view this E-Mail.", 05); executionLog.Log("SendEmailFromActivity", "Redirect to URL"); VisitOffice("mails/sent"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "Verify page title"); VerifyTitle("Sent"); executionLog.Log("SendEmailFromActivity", "Enter Send to in search "); officeActivities_EmailHelper.TypeText("SearchMailInput", SendTo); executionLog.Log("SendEmailFromActivity", "Click on search btn"); officeActivities_EmailHelper.ClickElement("SearchBtn"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "Select searched email."); officeActivities_EmailHelper.ClickJS("CheckBox1"); executionLog.Log("SendEmailFromActivity", "Click on delete btn"); officeActivities_EmailHelper.ClickElement("Delete"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "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("ClientEmailUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Email Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Email Url Change", "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 Email Url Change"); TakeScreenshot("ClientEmailUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientEmailUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientEmailUrlChange"); string id = loginHelper.getIssueID("Client Email Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientEmailUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Email Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Email Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientEmailUrlChange"); executionLog.WriteInExcel("Client Email Url Change", Status, JIRA, "Client management"); } }
public void verifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br() { 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 pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var pdffilesHelper = new PDFfilesHelper(GetWebDriver()); // Variable var name = "Test" + GetRandomNumber(); var name2 = "Testlist" + GetRandomNumber(); var Id = "12345" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Go to PDF templates page"); VisitOffice("pdf_templates"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Search for required pdf"); pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "Clone of CoCardEnhancedBillback2105_ia_Final co-br"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Click on PDF Halo Edit"); pDFTemplate_PDFTemplateHelper.ClickElement("PDFHaloEdit"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); pDFTemplate_PDFTemplateHelper.ClickElement("SelectVisualMap"); pDFTemplate_PDFTemplateHelper.ClickElement("SubmitMapOptn"); pDFTemplate_PDFTemplateHelper.WaitForElementPresent("//input[@name='visaPartialAuth']", 20); executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Check mapping"); pdffilesHelper.ClickElement("VisaCredit_DiscRate"); pdffilesHelper.WaitForWorkAround(3000); string tab1 = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[1]/div/button"); string section1 = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[2]/div/button"); string field1 = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[4]/div/button"); GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/view/200866"); pdffilesHelper.WaitForWorkAround(2000); if (tab1 == "Rates & Fees") { office_ClientsHelper.ClickElement("RatesAndFee"); } else { } //Boolean test = Assert.IsTrue(pDFTemplate_PDFTemplateHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']")); if (office_ClientsHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']") == true) { office_ClientsHelper.TypeText("Amexp", "61"); office_ClientsHelper.ClickElement("RandFSave"); office_ClientsHelper.WaitForWorkAround(2000); } else { } GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/pdfs/200866/html/602450"); office_ClientsHelper.WaitForWorkAround(4000); string value = pDFTemplate_PDFTemplateHelper.getInputText("//*[@id='qualRate']"); Assert.AreEqual("61", value); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CustomColumnsLead"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Custom Columns Lead"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Custom Columns Lead", "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("Custom Columns Lead"); TakeScreenshot("CustomColumnsLead"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CustomColumnsLead.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CustomColumnsLead"); string id = loginHelper.getIssueID("Custom Columns Lead"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CustomColumnsLead.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Custom Columns Lead"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Custom Columns Lead"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CustomColumnsLead"); executionLog.WriteInExcel("Custom Columns Lead", Status, JIRA, "List Management"); } }
public void setFormatToEmail() { string[] username = null; string[] password = null; DateTime date = new DateTime(); 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 email = new AdminSetFormatFieldsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); //Random Variable String JIRA = ""; String Status = "Pass"; var DBAName = "DBA@Company" + RandomNumber(1, 999); try { //executionLog.Log("AdminSetFormatEmail", "WaitForWorkAround"); //email.WaitForWorkAround(2000); //Logging in executionLog.Log("AdminSetFormatEmail", "Login"); Login(username[0], password[0]); //executionLog.Log("AdminSetFormatEmail", "WaitForWorkAround"); //email.WaitForWorkAround(4000); executionLog.Log("AdminSetFormatEmail", "Verify Title"); VerifyTitle("Dashboard"); //email.WaitForWorkAround(3000); // Going to admin office //executionLog.Log("AdminSetFormatEmail", "Visit office"); //VisitOffice("admin"); // Accessing field in field dictionary VisitOffice("fields"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select module as clients"); email.SelectByText("Module", "Clients"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Processor as First Data North"); email.SelectByText("Processor", "First Data North"); //email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Tab as Contacts"); email.SelectByText("Tab", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Section as Contacts"); email.SelectByText("Section", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click Search"); email.ClickElement("Search"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Type Text"); email.TypeText("filter", "Title"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click TitleField"); email.ClickElement("ContactTitle"); email.WaitForWorkAround(4000); executionLog.Log("AdminSetFormatEmail", "Click FieldFormat"); email.checkAndClick("ProcFieldFormat"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatPhone", "Select data type as phone."); email.SelectByText("ProcFieldContntType", "Email"); //email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click SaveFieldManager"); email.ClickElement("SaveFieldManager"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Redirect at Create Client"); VisitOffice("clients/create"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select Processor"); office_ClientsHelper.SelectByText("CreateProc", "First Data North"); executionLog.Log("AdminSetFormatEmail", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBAName); executionLog.Log("AdminSetFormatEmail", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("AdminSetFormatEmail", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("AdminSetFormatEmail", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("AdminSetFormatEmail", "Click On Contact Tab Clinet"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter the text"); email.TypeText("Title", "Tester01"); email.ClickForce("Save"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Verify the Email Format Validation"); email.VerifyText("FieldFormatEmailError", "Please enter a valid email address."); executionLog.Log("AdminSetFormatEmail", "Redirect To clients page. "); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("AdminSetFormatEmail", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetFormatEmail", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("AdminSetFormatEmail", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("AdminSetFormatEmail", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetFormatEmail", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); // Accessing field in field dictionary VisitOffice("fields"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select module as clients"); email.SelectByText("Module", "Clients"); email.WaitForWorkAround(1000); executionLog.Log("AdminSetFormatEmail", "Select Processor as First Data North"); email.SelectByText("Processor", "First Data North"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Tab as Contacts"); email.SelectByText("Tab", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Section as Contacts"); email.SelectByText("Section", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click Search"); email.ClickElement("Search"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Type text"); email.TypeText("filter", "Title"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Click TitleField"); email.ClickElement("ContactTitle"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Click FieldFormat"); email.ClickElement("ProcFieldFormat"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click SaveFieldManager"); email.ClickElement("SaveFieldManager"); email.WaitForWorkAround(3000); } catch (Exception e) { Console.WriteLine(date.TimeOfDay.Duration()); executionLog.Log("Error", e.StackTrace); Status = "Fail"; Console.WriteLine(date.TimeOfDay.Duration()); String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminSetFormatEmail"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } Console.WriteLine(date.TimeOfDay.Duration()); bool result = loginHelper.CheckExstingIssue("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Set Format Email Helper", "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("Admin Set Format Email"); TakeScreenshot("AdminSetFormatEmail"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetFormatEmail.png"; loginHelper.AddAttachment(location, id); } Console.WriteLine(date.TimeOfDay.Duration()); } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminSetFormatEmail"); string id = loginHelper.getIssueID("Admin Set Format Email"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetFormatEmail.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Set Format Email"), "This issue is still occurring"); } Console.WriteLine(date.TimeOfDay.Duration()); } JIRA = loginHelper.getIssueID("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); //executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); executionLog.WriteInExcel("Admin Set Format Email", Status, JIRA, "Partner Portal"); } }
public void clientDocumentUrlChange() { 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()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientDocumentUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientDocumentUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientDocumentUrlChange", "Goto User Agent >> Clients"); VisitOffice("clients"); executionLog.Log("ClientDocumentUrlChange", "Click On Any Client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientDocumentUrlChange", "Click On Add Document"); office_ClientsHelper.ClickElement("AddDoc"); var DocName = "Document Test" + GetRandomNumber(); executionLog.Log("ClientDocumentUrlChange", "Enter Document Name"); office_ClientsHelper.TypeText("DocName", DocName); var File = GetPathToFile() + "index.jpg"; executionLog.Log("ClientDocumentUrlChange", "Upload File"); office_ClientsHelper.Upload("BrowseFile", File); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ClientDocumentUrlChange", "Click Save"); office_ClientsHelper.ClickElement("SaveDoc"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ClientDocumentUrlChange", "Click On Document "); office_ClientsHelper.PressEnter("ClientDoc1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientDocumentUrlChange", "Change the url with the url number of another office"); VisitOffice("documents/view/41"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ClientDocumentUrlChange", "Verify Validation"); office_ClientsHelper.VerifyPageText("You don't have privilege."); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientDocumentUrlChange", "Redirect to Clients Page"); VisitOffice("clients"); executionLog.Log("ClientDocumentUrlChange", "Click On Any Client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientDocumentUrlChange", "Click On Document "); office_ClientsHelper.PressEnter("ClientDoc1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientDocumentUrlChange", "Click OnDelete icon"); office_ClientsHelper.ClickElement("DeleteDoc"); executionLog.Log("ClientDocumentUrlChange", "Accept alert message"); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientDocumentUrlChange", "Wait for delete message"); office_ClientsHelper.WaitForText("Document deleted successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientDocumentUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Document Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Document Url Change", "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 Document Url Change"); TakeScreenshot("ClientDocumentUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientDocumentUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientDocumentUrlChange"); string id = loginHelper.getIssueID("Client Document Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientDocumentUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Document Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Document Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientDocumentUrlChange"); executionLog.WriteInExcel("Client Document Url Change", Status, JIRA, "Client Management"); } }
public void websiteFilter() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); String JIRA = ""; String Status = "Pass"; // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); try { executionLog.Log("WebsiteFilter", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("WebsiteFilter", "Verify page title."); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("WebsiteFilter", "Go to client page"); VisitOffice("clients"); executionLog.Log("WebsiteFilter", "Verify title"); VerifyTitle(); executionLog.Log("WebsiteFilter", "Click on Advance filter"); office_ClientsHelper.ClickElement("Advance"); executionLog.Log("WebsiteFilter", "Veirfy website is available under the filter"); office_ClientsHelper.verifyElementPresent("Website"); executionLog.Log("WebsiteFilter", "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("WebsiteFilter"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Website Filter"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Website Filter", "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("Website Filter"); TakeScreenshot("WebsiteFilter"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\WebsiteFilter.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("WebsiteFilter"); string id = loginHelper.getIssueID("Website Filter"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\WebsiteFilter.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Website Filter"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Website Filter"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("WebsiteFilter"); executionLog.WriteInExcel("Website Filter", Status, JIRA, "Client Management"); } }
public void leadAndClientManagement() { 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 office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(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("LeadAndClientManagement", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("LeadAndClientManagement", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadAndClientManagement", "Visit Lead"); VisitOffice("leads/create"); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); executionLog.Log("LeadAndClientManagement", "Select Responsibities"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadAndClientManagement", "Click on Save"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); executionLog.Log("LeadAndClientManagement", "Wait for Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickOnConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click Save on Pop Up"); office_LeadsHelper.ClickOnDisplayed("ClickonPopUpSave"); executionLog.Log("LeadAndClientManagement", "Verify confirmation"); office_LeadsHelper.WaitForText("Lead is converted and moved to recyclebin.", 10); executionLog.Log("LeadAndClientManagement", "Visit Lead"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(4000); executionLog.Log("LeadAndClientManagement", "Click Export"); office_LeadsHelper.ClickElement("ClickOnExport"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click Export As CSV"); office_LeadsHelper.ClickElement("ExportAsCSVlEAD"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Goto Lead"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Export"); office_LeadsHelper.ClickElement("ClickOnExport"); executionLog.Log("LeadAndClientManagement", "Click on Export as excel"); office_LeadsHelper.ClickElement("ExportAsExcelLead"); office_LeadsHelper.WaitForWorkAround(5000); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Select the responsibility"); office_LeadsHelper.SelectByText("SelectResponsibiltiy", "Howard Tang"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickJS("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Wait for success message."); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Goto Client"); VisitOffice("clients"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Export"); office_ClientsHelper.ClickForce("ClickOnExport"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click export AS Excel"); office_ClientsHelper.ClickElement("ExportAsExcelLead"); executionLog.Log("LeadAndClientManagement", "Go to create a Lead"); VisitOffice("leads/create"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA Name"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Responsibilities"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click Save Button"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); executionLog.Log("LeadAndClientManagement", "Wait for Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickJS("CancelConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on No"); office_LeadsHelper.ClickDisplayed("//*[@id='LeadConversionDelete0']"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Save"); office_LeadsHelper.ClickOnDisplayed("ClickonPopUpSave"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Confirmation"); office_LeadsHelper.VerifyPageText("Lead is converted successfully."); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Go to create a Lead"); VisitOffice("leads/create"); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA Name"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); executionLog.Log("LeadAndClientManagement", "Select Responsibility"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadAndClientManagement", "Click onSave Button"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Create duplicate lead"); office_LeadsHelper.ClickElement("CreateDuplicate"); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Go to Lead"); VisitOffice("leads"); executionLog.Log("LeadAndClientManagement", "Click on First Lead To check"); office_LeadsHelper.ClickElement("CheckDocToDel"); executionLog.Log("LeadAndClientManagement", "Click on Delete button."); office_LeadsHelper.ClickElement("ClickDelLeadbutton"); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Goto leads/recyclebin "); VisitOffice("leads/recyclebin"); executionLog.Log("LeadAndClientManagement", "Click Restore"); office_LeadsHelper.ClickElement("ClickOnRestoreLeadIcon"); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("Lead Restored Successfully.", 10); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickElement("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Wait for success message."); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickElement("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "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("LeadAndClientManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("LeadAndClientManagement"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("LeadAndClientManagement", "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("LeadAndClientManagement"); TakeScreenshot("LeadAndClientManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadAndClientManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadAndClientManagement"); string id = loginHelper.getIssueID("LeadAndClientManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadAndClientManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("LeadAndClientManagement"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("LeadAndClientManagement"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadAndClientManagement"); executionLog.WriteInExcel("LeadAndClientManagement", Status, JIRA, "Lead Management"); } }
public void clientMerchantIssue1() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var DBA = "Clients" + RandomNumber(333, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientMerchantIssue1", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("ClientMerchantIssue1", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ClientMerchantIssue1", "Go to create a client page"); VisitOffice("clients/create"); executionLog.Log("ClientMerchantIssue1", "Verify title"); VerifyTitle("Create a Client"); executionLog.Log("ClientMerchantIssue1", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("ClientMerchantIssue1", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientMerchantIssue1", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientMerchantIssue1", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientMerchantIssue1", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("ClientMerchantIssue1", "Click on 'Merchant number' tab"); office_ClientsHelper.ClickElement("MerchantNumber"); executionLog.Log("ClientMerchantIssue1", "Verify Merchant number tab is present"); office_ClientsHelper.verifyElementPresent("MerchantNumberHighlighted"); office_ClientsHelper.WaitForWorkAround(6000); executionLog.Log("ClientMerchantIssue1", "Verify Customer relationship is not present on page."); office_ClientsHelper.verifyElementNotPresent("CustomerRelationHighlighted"); office_ClientsHelper.WaitForWorkAround(6000); executionLog.Log("ClientMerchantIssue1", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("ClientMerchantIssue1", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(6000); executionLog.Log("ClientMerchantIssue1", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientMerchantIssue1", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("ClientMerchantIssue1", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientMerchantIssue1", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("ClientMerchantIssue1", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); executionLog.Log("ClientMerchantIssue1", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientMerchantIssue1", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("ClientMerchantIssue1", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientMerchantIssue1", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); executionLog.Log("ClientMerchantIssue1", "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("ClientMerchantIssue1"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Merchant Issue 1"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Merchant Issue 1", "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("Client Merchant Issue 1"); TakeScreenshot("ClientMerchantIssue1"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientMerchantIssue1.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientMerchantIssue1"); string id = loginHelper.getIssueID("Client Merchant Issue 1"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientMerchantIssue1.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Merchant Issue 1"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Merchant Issue 1"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientMerchantIssue1"); executionLog.WriteInExcel("Client Merchant Issue 1", Status, JIRA, "Client Management"); } }
public void bulkUpdateSalesManagerForClient() { 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()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("BulkUpdateSalesManagerForClient", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("BulkUpdateSalesManagerForClient", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("BulkUpdateSalesManagerForClient", "Go to clients page."); VisitOffice("clients"); executionLog.Log("BulkUpdateSalesManagerForClient", "Verify page title."); VerifyTitle(); executionLog.Log("BulkUpdateSalesManagerForClient", "Click On first Check Box"); Office_ClientsHelper.ClickElement("ClickOnCheckBox"); executionLog.Log("BulkUpdateSalesManagerForClient", "Click On Bulk Update"); Office_ClientsHelper.ClickElement("ClickOnBulkUpdateClient"); executionLog.Log("BulkUpdateSalesManagerForClient", " Click on Change Sale Manager"); Office_ClientsHelper.ClickElement("BlukUpdateChangeSaleManager"); executionLog.Log("BulkUpdateSalesManagerForClient", "Select Sales MANAGER"); Office_ClientsHelper.SelectByText("SelectSaleManager", "Howard Tang"); executionLog.Log("BulkUpdateSalesManagerForClient", "Click on Update button"); Office_ClientsHelper.ClickDisplayed("//button[text()='Update']"); executionLog.Log("BulkUpdateSalesManagerForClient", "Accept alert message."); Office_ClientsHelper.AcceptAlert(); Office_ClientsHelper.WaitForText("records updated successfully", 30); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); Console.WriteLine("Counter value is " + counter); String Description = executionLog.GetAllTextFile("BulkUpdateSalesManagerForClient"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Bulk Update Sales Manager For Client"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Bulk Update Sales Manager For Client", "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("Bulk Update Sales Manager For Client"); TakeScreenshot("BulkUpdateSalesManagerForClient"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\BulkUpdateSalesManagerForClient.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("BulkUpdateSalesManagerForClient"); string id = loginHelper.getIssueID("Bulk Update Sales Manager For Client"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\BulkUpdateSalesManagerForClient.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Bulk Update Sales Manager For Client"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Bulk Update Sales Manager For Client"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("BulkUpdateSalesManagerForClient"); executionLog.WriteInExcel("Bulk Update Sales Manager For Client", Status, JIRA, "Client Management"); } }
public void businessBankingAccountAddAnotherIssue() { 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()); // Variable var DBA = "Client" + RandomNumber(1222, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("BusinessBankingAccountAddAnotherIssue", " Reditect at Create Client page."); VisitOffice("clients/create"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify page title"); VerifyTitleMerchantClient(); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify label for merchant number text box."); office_ClientsHelper.IsElementPresent("LabelMerchantNumber"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify presence of merchant number text box."); office_ClientsHelper.IsElementVisible("//*[@id='ClientDetailMerchID']"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Click on business details tab."); office_ClientsHelper.ClickElement("BusinessDetailsTab"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify added contact name for bussiness banking not present on the page."); office_ClientsHelper.IsElementNotPresent("AddedContNAme"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify added contact phone for bussiness banking not present on the page."); office_ClientsHelper.IsElementNotPresent("AddedContPhone"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify added bank name for bussiness banking not present on the page."); office_ClientsHelper.IsElementNotPresent("AddedBankName"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify added routing no. for bussiness banking not present on the page."); office_ClientsHelper.IsElementNotPresent("AddedRoutingNo"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verify added account number for bussiness banking not present on the page."); office_ClientsHelper.IsElementNotPresent("AddedAccounNo"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Wait for element to be present."); office_ClientsHelper.WaitForElementPresent("AddAnother", 3); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Click on Add another button to add second bankin details."); office_ClientsHelper.scrollToElement("AddAnother"); office_ClientsHelper.ClickElement("AddAnother"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verifies added banking details cont. name present on the page."); office_ClientsHelper.VerifyElementDisplayed("AddedContNAme"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verifies added banking details cont. phone present on the page."); office_ClientsHelper.VerifyElementDisplayed("AddedContPhone"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verifies added banking details bank name present on the page."); office_ClientsHelper.VerifyElementDisplayed("AddedBankName"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verifies added banking details routing number present on the page."); office_ClientsHelper.VerifyElementDisplayed("AddedRoutingNo."); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Verifies added banking details Account number present on the page."); office_ClientsHelper.VerifyElementDisplayed("AddedAccounNo"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); //office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); office_ClientsHelper.selectOwner("//*[@id='gs_first_name']"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("BusinessBankingAccountAddAnotherIssue", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("BusinessBankingAccountAddAnotherIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Business Banking Account Add Another Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Business Banking Account Add Another Issue", "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("Business Banking Account Add Another Issue"); TakeScreenshot("BusinessBankingAccountAddAnotherIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\BusinessBankingAccountAddAnotherIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("BusinessBankingAccountAddAnotherIssue"); string id = loginHelper.getIssueID("Business Banking Account Add Another Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\BusinessBankingAccountAddAnotherIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Business Banking Account Add Another Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Business Banking Account Add Another Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("BusinessBankingAccountAddAnotherIssue"); executionLog.WriteInExcel("Business Banking Account Add Another Issue", Status, JIRA, "Client Management"); } }
public void tSYSBusinessIdentificationType() { 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 all_ProcessorsHelper = new All_ProcessorsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 500); var Code = "" + RandomNumber(1, 999); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("TSYSBusinessIdentificationType", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("TSYSBusinessIdentificationType", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("TSYSBusinessIdentificationType", "Go to All Processors"); VisitOffice("processor_types"); all_ProcessorsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Enter Processor Name In Search field"); all_ProcessorsHelper.TypeText("SearchProcName", "TSYS"); all_ProcessorsHelper.WaitForWorkAround(3000); var loc = "//table[@id='list1']/tbody[1]/tr[2]/td[@title='TSYS']"; if (all_ProcessorsHelper.IsElementPresent(loc)) { Console.WriteLine("TSYS Processor found"); executionLog.Log("TSYSBusinessIdentificationType", "Go to All Merchants"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Click on First Client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Go to Company Details Tab"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Select TSYS Processor"); office_ClientsHelper.Select("Processor", "TSYS"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Go to Owners Tab"); office_ClientsHelper.ClickElement("OwnerTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Click on Owner Identification drop down"); office_ClientsHelper.ClickElement("BusinessIdentificationType"); executionLog.Log("TSYSBusinessIdentificationType", "Verify options under drop down"); office_ClientsHelper.IsElementVisible("//option[@value='Govt. Issued Business License']"); Console.WriteLine("Govt. Issued Business License option present"); office_ClientsHelper.IsElementVisible("//option[@value='Tax Return']"); Console.WriteLine("Tax Return option present"); office_ClientsHelper.IsElementVisible("//option[@value='Entity Articles']"); Console.WriteLine("Entity Articles option present"); office_ClientsHelper.IsElementVisible("//option[@value='Business Financial Statement']"); Console.WriteLine("Business Financial Statement option present"); office_ClientsHelper.IsElementVisible("//option[@value='Government Entity']"); Console.WriteLine("Government Entity option present"); } else { Console.WriteLine("TSYS Processor not found. Hence creating one"); executionLog.Log("TSYSBusinessIdentificationType", "Click on Create button"); all_ProcessorsHelper.ClickElement("Create"); all_ProcessorsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Enter Processor Name"); all_ProcessorsHelper.TypeText("ProcName", "TSYS"); executionLog.Log("TSYSBusinessIdentificationType", "Select Processor to fetch field from"); all_ProcessorsHelper.Select("FetchField", "TSYS"); executionLog.Log("TSYSBusinessIdentificationType", "Enter Processor Code"); all_ProcessorsHelper.TypeText("ProcCode", Code); executionLog.Log("TSYSBusinessIdentificationType", "Click on Create button"); all_ProcessorsHelper.ClickElement("SaveBtn"); all_ProcessorsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Go to All Merchants"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Click on First Client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Go to Company Details Tab"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("TSYSBusinessIdentificationType", "Select TSYS Processor"); office_ClientsHelper.Select("Processor", "TSYS"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Go to Owners Tab"); office_ClientsHelper.ClickElement("OwnerTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("TSYSBusinessIdentificationType", "Click on Owner Identification drop down"); office_ClientsHelper.ClickElement("BusinessIdentificationType"); executionLog.Log("TSYSBusinessIdentificationType", "Verify options under drop down"); office_ClientsHelper.IsElementVisible("//option[@value='Govt. Issued Business License']"); Console.WriteLine("Govt. Issued Business License option present"); office_ClientsHelper.IsElementVisible("//option[@value='Tax Return']"); Console.WriteLine("Tax Return option present"); office_ClientsHelper.IsElementVisible("//option[@value='Entity Articles']"); Console.WriteLine("Entity Articles option present"); office_ClientsHelper.IsElementVisible("//option[@value='Business Financial Statement']"); Console.WriteLine("Business Financial Statement option present"); office_ClientsHelper.IsElementVisible("//option[@value='Government Entity']"); Console.WriteLine("Government Entity option present"); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TSYSBusinessIdentificationType"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("TSYS Business Identification Type"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("TSYS Business Identification Type", "Bug", "Medium", "Office Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("TSYS Business Identification Type"); TakeScreenshot("TSYSBusinessIdentificationType"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TSYSBusinessIdentificationType.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TSYSBusinessIdentificationType"); string id = loginHelper.getIssueID("TSYS Business Identification Type"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TSYSBusinessIdentificationType.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("TSYS Business Identification Type"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("TSYS Business Identification Type"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TSYSBusinessIdentificationType"); executionLog.WriteInExcel("TSYS Business Identification Type", Status, JIRA, "Office Merchant"); } }
public void verifyProcessorInCustomFields() { 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 office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(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 DBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyProcessorInCustomFields", "Login with valid credentials"); Login(username[0], password[0]); executionLog.Log("VerifyProcessorInCustomFields", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyProcessorInCustomFields", "Redirect at All Clients page"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyProcessorInCustomFields", "Open a merchant"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyProcessorInCustomFields", "Go to Company Details tab"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyProcessorInCustomFields", "Click on Pencil icon of Processor for custom field."); office_ClientsHelper.ClickElement("ProcessorPencilIcon"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyProcessorInCustomFields", "Click on Add button"); office_ClientsHelper.ClickElement("AddCustomBtn"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyProcessorInCustomFields", "Verify Processor section present"); office_ClientsHelper.verifyElementPresent("ProcSection"); office_ClientsHelper.WaitForWorkAround(1000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyProcessorInCustomFields"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Processor In Custom Fields"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Processor In Custom Fields", "Bug", "Medium", "Create Vendor page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Processor In Custom Fields"); TakeScreenshot("VerifyProcessorInCustomFields"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyProcessorInCustomFields.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyProcessorInCustomFields"); string id = loginHelper.getIssueID("Verify Processor In Custom Fields"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyProcessorInCustomFields.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Processor In Custom Fields"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Processor In Custom Fields"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyProcessorInCustomFields"); executionLog.WriteInExcel("Verify Processor In Custom Fields", Status, JIRA, "Vendor page"); } }
public void activitiesDocumentManagement() { 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() + "leadslist.csv"; String InvalidFile = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesDocumentManagement", " Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesDocumentManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesDocumentManagement", "Click On Admin"); VisitOffice("admin"); executionLog.Log("ActivitiesDocumentManagement", "Redirect to create document page"); VisitOffice("documents/create"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "verify title"); VerifyTitle("Create a New Document"); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Verify validation message for name."); officeActivities_DocumentsHelper.VerifyText("NameError", "This field is required."); executionLog.Log("ActivitiesDocumentManagement", "Verify validation message for attachment."); officeActivities_DocumentsHelper.VerifyText("AttachmentError", "This field is required."); executionLog.Log("ActivitiesDocumentManagement", "Enter Document name"); officeActivities_DocumentsHelper.TypeText("Name", name); executionLog.Log("ActivitiesDocumentManagement", "Click on document version"); officeActivities_DocumentsHelper.ClickElement("DocumentVersion"); executionLog.Log("ActivitiesDocumentManagement", "Upload an invalid File "); officeActivities_DocumentsHelper.Upload("BrowseAttachment", InvalidFile); executionLog.Log("ActivitiesDocumentManagement", "Verify alert message for invalid file."); officeActivities_DocumentsHelper.VerifyAlertText("please select a valid file!"); officeActivities_DocumentsHelper.AcceptAlert(); executionLog.Log("ActivitiesDocumentManagement", "Upload a valid File."); officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile); executionLog.Log("ActivitiesDocumentManagement", "Select Assign owner"); officeActivities_DocumentsHelper.SelectByText("AssignOwner", "Howard Tang"); executionLog.Log("ActivitiesDocumentManagement", "Select status"); officeActivities_DocumentsHelper.SelectByText("Status", "Active"); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document saved successfully.", 10); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); executionLog.Log("ActivitiesDocumentManagement", "Select document parent/related to."); officeActivities_DocumentsHelper.SelectByText("ReletedTo", "Client"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on any client."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement", "Redirect at clients page."); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on any client."); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select actitivity type as documents."); office_ClientsHelper.SelectByText("SelectActivityType", "Documents"); executionLog.Log("ActivitiesDocumentManagement", "Enter document name to be search."); office_ClientsHelper.TypeText("ActivitySubject", name); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select All in created by field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Verify created document present on client page."); office_ClientsHelper.IsElementPresent("OpenFirstActivity"); executionLog.Log("ActivitiesDocumentManagement", "Redirect to document page"); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); executionLog.Log("ActivitiesDocumentManagement", "Select document related to."); officeActivities_DocumentsHelper.Select("ReletedTo", "14"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on any lead."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement", "Redirect at leads page."); VisitOffice("leads"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click On any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select actitivity type as documents."); office_LeadsHelper.SelectByText("SelectActivityType", "Documents"); executionLog.Log("ActivitiesDocumentManagement", "Enter document name to be search."); office_LeadsHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Verify created document present on leads page."); office_LeadsHelper.IsElementPresent("ClickNotes1"); executionLog.Log("ActivitiesDocumentManagement", "Redirect to document page"); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); executionLog.Log("ActivitiesDocumentManagement", "Select document parent/related to."); officeActivities_DocumentsHelper.Select("ReletedTo", "15"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on any opportunity."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement", "Redirect at opportunities page."); VisitOffice("opportunities"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click On any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select actitivity type as documents"); office_LeadsHelper.Select("SelectActivityType", "Documents"); executionLog.Log("ActivitiesDocumentManagement", "Enter documents name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Verify created document present on opportunity page"); office_OpportunitiesHelper.IsElementPresent("OpenOpportunity"); executionLog.Log("ActivitiesDocumentManagement", "Redirect to document page"); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on edit icon."); officeActivities_DocumentsHelper.ClickElement("EditDoc"); executionLog.Log("ActivitiesDocumentManagement", "Select document related to."); officeActivities_DocumentsHelper.Select("ReletedTo", "36"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on find list icon."); officeActivities_DocumentsHelper.ClickElement("Assign"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on any ticket."); officeActivities_DocumentsHelper.ClickElement("AssignUser"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on Save button"); officeActivities_DocumentsHelper.ClickElement("Save"); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10); executionLog.Log("ActivitiesDocumentManagement", "Redirect at tickets page."); VisitOffice("tickets"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click On any ticket."); ticket_CreateATicketHelper.ClickElement("Ticket1"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Select actitivity type as documents"); office_LeadsHelper.Select("SelectActivityType", "Documents"); executionLog.Log("ActivitiesDocumentManagement", "Enter document name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Verify created document present on ticket page."); ticket_CreateATicketHelper.IsElementPresent("OpenTicket"); executionLog.Log("ActivitiesDocumentManagement", "Redirect to document page"); VisitOffice("documents"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Search document by name."); officeActivities_DocumentsHelper.TypeText("SearchDocumet", name); officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Select All in owner field"); officeActivities_DocumentsHelper.SelectByText("OwnerField", "All"); officeActivities_DocumentsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Click on Checkbox"); officeActivities_DocumentsHelper.ClickElement("CheckDocToDel"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Click on Delete button"); officeActivities_DocumentsHelper.ClickElement("DeleteDoc"); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Acccept alert to delete doc."); officeActivities_DocumentsHelper.AcceptAlert(); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message."); officeActivities_DocumentsHelper.WaitForText("Document deleted successfully.", 10); executionLog.Log("ActivitiesDocumentManagement", "Redirect at recyclebin page."); VisitOffice("documents/recyclebin"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesDocumentManagement", "Verify page title."); VerifyTitle("Recycled Document"); executionLog.Log("ActivitiesDocumentManagement", "Click on delete icon."); officeActivities_DocumentsHelper.ClickElement("DeleteRecycle"); officeActivities_DocumentsHelper.AcceptAlert(); //officeActivities_DocumentsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesDocumentManagement", "Wait for success message.."); officeActivities_DocumentsHelper.WaitForText("Document Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesDocumentManagement"); 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("ActivitiesDocumentManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesDocumentManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesDocumentManagement"); string id = loginHelper.getIssueID("Activities Document Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesDocumentManagement.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("ActivitiesDocumentManagement"); executionLog.WriteInExcel("Activities Document Management", Status, JIRA, "Office Activities"); } }
public void verifyClientsAdvanceFilerColumnOrder() { 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()); // Variable Random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify page title."); VerifyTitle(); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of company name column."); office_ClientsHelper.IsElementPresent("HeadCompany"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of contact column."); office_ClientsHelper.IsElementPresent("HeadContact"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of phone column."); office_ClientsHelper.IsElementPresent("HeadPhone"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of email column."); office_ClientsHelper.IsElementPresent("HeadEmail"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click on advance filter."); office_ClientsHelper.ClickElement("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select company in displayed columns."); office_ClientsHelper.SelectByText("DisplayedCols", "Company"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols."); office_ClientsHelper.ClickElement("RemoveCols"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select contact in displayed columns."); office_ClientsHelper.SelectByText("DisplayedCols", "Contact Name"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ClientsHelper.ClickElement("RemoveCols"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select phone in displayed columns."); office_ClientsHelper.SelectByText("DisplayedCols", "Phone"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ClientsHelper.ClickElement("RemoveCols"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select email in displayed columns."); office_ClientsHelper.SelectByText("DisplayedCols", "E-Mail"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ClientsHelper.ClickElement("RemoveCols"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click on apply button."); office_ClientsHelper.ClickElement("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify company name not present on page."); office_ClientsHelper.IsElementNotPresent("HeadCompany"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify contact name not present on page."); office_ClientsHelper.IsElementNotPresent("HeadContact"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify phone not present on page."); office_ClientsHelper.IsElementNotPresent("HeadPhone"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify email not present on page."); office_ClientsHelper.IsElementNotPresent("HeadEmail"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of phone column."); office_ClientsHelper.IsElementPresent("HeadPhone4"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify default position of email column."); office_ClientsHelper.IsElementPresent("HeadEmail5"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Redirect at merchants page."); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click on advance filter."); office_ClientsHelper.ClickElement("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select phone in displayed column."); office_ClientsHelper.SelectByText("DisplayedCols", "Phone"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Move phone 1 step up."); office_ClientsHelper.ClickElement("MoveUp"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Move phone 1 step up."); office_ClientsHelper.ClickElement("MoveUp"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Select email in displayed column."); office_ClientsHelper.SelectByText("DisplayedCols", "E-Mail"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Move email 1 step down."); office_ClientsHelper.ClickElement("MoveDown"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Click on apply button."); office_ClientsHelper.ClickElement("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify changed position of phone column."); office_ClientsHelper.IsElementPresent("HeadPhone2"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "Verify changed position of email column."); office_ClientsHelper.IsElementPresent("HeadEmail5"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyClientsAdvanceFilerColumnOrder", "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("VerifyClientsAdvanceFilerColumnOrder"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Clients Advance Filer Column Order"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Clients Advance Filer Column Order", "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 Clients Advance Filer Column Order"); TakeScreenshot("VerifyClientsAdvanceFilerColumnOrder"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientsAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyClientsAdvanceFilerColumnOrder"); string id = loginHelper.getIssueID("Verify Clients Advance Filer Column Order"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyClientsAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Clients Advance Filer Column Order"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Clients Advance Filer Column Order"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyClientsAdvanceFilerColumnOrder"); executionLog.WriteInExcel("Verify Clients Advance Filer Column Order", Status, JIRA, "Opportunities Management"); } }
public void clientMeetingUrlChange() { 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()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var Subject = "Meeting" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientMeetingUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientMeetingUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientMeetingUrlChange", "Go to All Clients"); VisitOffice("clients"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ClientMeetingUrlChange", "Click On Any Client"); office_ClientsHelper.ClickElement("ClickOnAnyClient"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Click On New Meeting"); office_ClientsHelper.ClickElement("AddMeeting"); executionLog.Log("ClientMeetingUrlChange", "Enter Meeting Subject"); officeActivities_MeetingHelper.TypeText("Subject", Subject); executionLog.Log("ClientMeetingUrlChange", "Enter Start Date"); officeActivities_MeetingHelper.TypeText("StartDate", "06/06/2019"); executionLog.Log("ClientMeetingUrlChange", "Enter Start Date"); officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2019"); executionLog.Log("ClientMeetingUrlChange", "Click Save"); officeActivities_MeetingHelper.ClickDisplayed("//button[@title='Save']"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ClientMeetingUrlChange", "Select Activity >> Meeting"); officeActivities_MeetingHelper.Select("SelectActivityType", "Meetings"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Select All in created by"); officeActivities_MeetingHelper.SelectByText("CreatedByfield", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Click on Meeting to open"); officeActivities_MeetingHelper.PressEnter("OpenMeetingClient"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Change the url with the url number of another office"); VisitOffice("meetings/view/1"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ClientMeetingUrlChange", "Verify Validation"); officeActivities_MeetingHelper.VerifyPageText("You don't have privileges to view this Meeting."); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ClientMeetingUrlChange", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "select All in owner"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Click On Cance meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ClientMeetingUrlChange", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ClientMeetingUrlChange", "Verify page title"); VerifyTitle("Recycled Meetings"); executionLog.Log("ClientMeetingUrlChange", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "select All in owner"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ClientMeetingUrlChange", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("ClientMeetingUrlChange", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("ClientMeetingUrlChange", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ClientMeetingUrlChange", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientMeetingUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Meeting Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Meeting Url Change", "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 Meeting Url Change"); TakeScreenshot("ClientMeetingUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientMeetingUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientMeetingUrlChange"); string id = loginHelper.getIssueID("Client Meeting Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientMeetingUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Meeting Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Meeting Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientMeetingUrlChange"); executionLog.WriteInExcel("Client Meeting Url Change", Status, JIRA, "Client Management"); } }