public void verifyNotesModifiedUpdated() { 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()); // Variable var name = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyNotesModifiedUpdated", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyNotesModifiedUpdated", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyNotesModifiedUpdated", "Go to notes page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("VerifyNotesModifiedUpdated", " Click On Create"); officeActivities_NotesHelper.ClickElement("Create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify page title"); VerifyTitle("Create a New Note"); executionLog.Log("VerifyNotesModifiedUpdated", "Click on Save "); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify validation text for subject."); officeActivities_NotesHelper.VerifyText("SubjectError", "This field is required."); executionLog.Log("VerifyNotesModifiedUpdated", "Enter note subject."); officeActivities_NotesHelper.TypeText("Subject", name); executionLog.Log("VerifyNotesModifiedUpdated", "Click on save."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("VerifyNotesModifiedUpdated", "Wait for success text"); officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10); executionLog.Log("VerifyNotesModifiedUpdated", "Redirect at notes page."); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("VerifyNotesModifiedUpdated", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesModifiedUpdated", "Click on searched notes."); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify notes created by credits"); officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyNotesModifiedUpdated", "Verify notes Modified by credits"); officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyNotesModifiedUpdated", "Click on Edit"); officeActivities_NotesHelper.ClickElement("EditLink"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Select note parent"); officeActivities_NotesHelper.Select("NoteParent", "20"); executionLog.Log("VerifyNotesModifiedUpdated", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesModifiedUpdated", " Click On any client."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("VerifyNotesModifiedUpdated", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("VerifyNotesModifiedUpdated", "Verify notes created by credits"); officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyNotesModifiedUpdated", "Verify notes Modified by credits"); officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyNotesModifiedUpdated", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesModifiedUpdated", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("VerifyNotesModifiedUpdated", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesModifiedUpdated", "Select First Note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesModifiedUpdated", "Click Delete btn "); officeActivities_NotesHelper.ClickElement("DeleteNote"); executionLog.Log("VerifyNotesModifiedUpdated", "Accept alert message. "); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("VerifyNotesModifiedUpdated", "Wait for delete message. "); officeActivities_NotesHelper.WaitForText("Note deleted successfully", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyNotesModifiedUpdated"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Notes Modified Updated"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Notes Modified Updated", "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("Verify Notes Modified Updated"); TakeScreenshot("VerifyNotesModifiedUpdated"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesModifiedUpdated.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyNotesModifiedUpdated"); string id = loginHelper.getIssueID("Verify Notes Modified Updated"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesModifiedUpdated.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Notes Modified Updated"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Notes Modified Updated"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyNotesModifiedUpdated"); executionLog.WriteInExcel("Verify Notes Modified Updated", Status, JIRA, "Office Activities"); } }
public void emailNoteWithRelatedTo() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable random var Subject = "Subject" + RandomNumber(1, 999); String Status = "Pass"; String JIRA = ""; try { executionLog.Log("EmailNoteWithRelatedTo", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EmailNoteWithRelatedTo", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("EmailNoteWithRelatedTo", "Redirect To notes"); VisitOffice("notes"); executionLog.Log("EmailNoteWithRelatedTo", "Click on Create "); officeActivities_NotesHelper.ClickElement("Create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteWithRelatedTo", "Enter Note Subject"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("EmailNoteWithRelatedTo", "Select Client"); officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client"); executionLog.Log("EmailNoteWithRelatedTo", "ClickIconToSelectClient"); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteWithRelatedTo", "Click On Client"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Click on Save button"); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(6000); executionLog.Log("EmailNoteWithRelatedTo", "Click On Notes"); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Click on Email Note"); officeActivities_NotesHelper.ClickElement("EmailNote"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Verify selected client."); officeActivities_NotesHelper.VerifyText("VerifySelectedClient", "Client"); executionLog.Log("AddNotesAdmin", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("AddNotesAdmin", "Redirect at notes page."); officeActivities_NotesHelper.WaitForElementPresent("EnterSubject", 10); executionLog.Log("AddNotesAdmin", "Search subject by note"); officeActivities_NotesHelper.TypeText("EnterSubject", Subject); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Search subject by note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Click on delete note."); officeActivities_NotesHelper.ClickElement("DeleteNote"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Accept alert message."); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("AddNotesAdmin", "Wait for delete text"); officeActivities_NotesHelper.WaitForText("Note deleted successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EmailNoteWithRelatedTo"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Email Note With Related To"); Console.WriteLine("Stepp 2 after existing"); if (!result) { if (Int16.Parse(counter) < 15) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssueTest("Email Note With Related To", "Bug", "Medium", "Email note page", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Email Note With Related To"); TakeScreenshot("EmailNoteWithRelatedTo"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteWithRelatedTo.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 15) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EmailNoteWithRelatedTo"); string id = loginHelper.getIssueID("Email Note With Related To"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteWithRelatedTo.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Email Note With Related To"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Email Note With Related To"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EmailNoteWithRelatedTo"); executionLog.WriteInExcel("Email Note With Related To", Status, JIRA, "Email Actitvities"); } }
public void verifyNotesCreditsIssue() { 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()); // Variable var name = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyNotesCreditsIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyNotesCreditsIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyNotesCreditsIssue", "Redirect at admin page."); VisitOffice("admin"); executionLog.Log("VerifyNotesCreditsIssue", "Go to notes page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesCreditsIssue", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("VerifyNotesCreditsIssue", "Click on any notes."); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); executionLog.Log("VerifyNotesCreditsIssue", "Wait for locator to be present."); officeActivities_NotesHelper.WaitForElementPresent("CreatedBy", 10); executionLog.Log("VerifyNotesCreditsIssue", "Verify notes created by credits"); officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyNotesCreditsIssue", "Verify notes Modified by credits"); officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyNotesCreditsIssue", "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("VerifyNotesCreditsIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Notes Credits Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Notes Credits Issue", "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("Verify Notes Credits Issue"); TakeScreenshot("VerifyNotesCreditsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesCreditsIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyNotesCreditsIssue"); string id = loginHelper.getIssueID("Verify Notes Credits Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesCreditsIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Notes Credits Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Notes Credits Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyNotesCreditsIssue"); executionLog.WriteInExcel("Verify Notes Credits Issue", Status, JIRA, "Office Activities"); } }
public void verifyNoteWithExeForMeetingNotAdded() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Random Variables var DocName = "Notes Meeting Exe" + GetRandomNumber(); var ExeFile = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EquipmentShippingValidationDublicate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EquipmentShippingValidationDublicate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click to open client inf"); VisitOffice("meetings"); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click On Meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click On Add Document Btn"); officeActivities_MeetingHelper.ClickElement("ClickOnNoteMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Enter Doc Name"); officeActivities_MeetingHelper.TypeText("EnterSubNote", DocName); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Uplaod exe file"); officeActivities_MeetingHelper.Upload("DocumentFileNotesMeet", ExeFile); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click Save Of Doc Pop Up"); officeActivities_MeetingHelper.ClickElement("SaveNoteMeeting"); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Verify Confirmation"); officeActivities_MeetingHelper.WaitForText("Note successfully Created.", 10); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Redirect To Notes Activities"); VisitOffice("notes"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Search Document"); officeActivities_NotesHelper.TypeText("EnterSubject", DocName); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); officeActivities_NotesHelper.ClickElement("ClickOnNote"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Verify Added Document not Present"); officeActivities_NotesHelper.VerifyText("VerifyNoAttachment", "No Data Available."); officeActivities_NotesHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyNoteWithExeForMeetingNotAdded"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Note With Exe For Meeting Not Added"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyNoteWithExeForMeetingNotAdded", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Note With Exe For Meeting Not Added"); TakeScreenshot("VerifyNoteWithExeForMeetingNotAdded"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNoteWithExeForMeetingNotAdded.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyNoteWithExeForMeetingNotAdded"); string id = loginHelper.getIssueID("Verify Note With Exe For Meeting Not Added"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNoteWithExeForMeetingNotAdded.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Note With Exe For Meeting Not Added"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Note With Exe For Meeting Not Added"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyNoteWithExeForMeetingNotAdded"); executionLog.WriteInExcel("Verify Note With Exe For Meeting Not Added", Status, JIRA, "Office Activities"); } }
public void notesAdvanceFilterRelatedTo() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("NotesAdvanceFilterRelatedTo", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); // Verify notes with clients. executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click notes with activity type."); officeActivities_NotesHelper.ClickForce("NoteWithClient"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to clients"); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Merchants"); //Verify notes with contacts. executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Selct notes related to contacts"); officeActivities_NotesHelper.ClickForce("NoteWithCOntacts"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to contacts."); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Contacts"); //Verify notes with Leads. executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click on note with activity type."); officeActivities_NotesHelper.ClickForce("NoteWithLeads"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to leads."); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Leads"); // Verify notes with meetings . executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click on note with meetings."); officeActivities_NotesHelper.ClickForce("NoteWithMeetings"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to meetings."); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Meetings"); // Verify notes with Opportunities . executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click on notes with opportunities."); officeActivities_NotesHelper.ClickForce("NoteWithOppo"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to opportunities."); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Opportunities"); // Verify notes with tasks . executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click on note with tasks."); officeActivities_NotesHelper.ClickForce("NoteWithTask"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note present is related to tasks."); officeActivities_NotesHelper.VerifyText("NoteRelatedTo", "Tasks"); // Verify notes with Attachments . executionLog.Log("NotesAdvanceFilterRelatedTo", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(5000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on advance filter."); officeActivities_NotesHelper.ClickForce("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "click note with attachment."); officeActivities_NotesHelper.ClickForce("NoteWithAttach"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on apply button."); officeActivities_NotesHelper.ClickForce("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Click on any note."); officeActivities_NotesHelper.ClickForce("ClickOnNote"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterRelatedTo", "Verify note contains documents."); officeActivities_NotesHelper.IsElementPresent("AttachmentNotes"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("NotesAdvanceFilterRelatedTo"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Notes Advance Filter RelatedTo"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Notes Advance Filter RelatedTo", "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("Notes Advance Filter RelatedTo"); TakeScreenshot("NotesAdvanceFilterRelatedTo"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NotesAdvanceFilterRelatedTo.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("NotesAdvanceFilterRelatedTo"); string id = loginHelper.getIssueID("Notes Advance Filter RelatedTo"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NotesAdvanceFilterRelatedTo.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Notes Advance Filter RelatedTo"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Notes Advance Filter RelatedTo"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("NotesAdvanceFilterRelatedTo"); executionLog.WriteInExcel("Notes Advance Filter RelatedTo", Status, JIRA, "Opportunities Management"); } }
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"); } }