public void emailNoteForward() { 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()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EmailNoteForward", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EmailNoteForward", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EmailNoteForward", "Redirect to Notes create page"); VisitOffice("notes/create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteForward", "Verify page title"); VerifyTitle("Create a New Note"); executionLog.Log("EmailNoteForward", "Enter Subject "); officeActivities_NotesHelper.TypeText("Subject", "Email This Note"); executionLog.Log("EmailNoteForward", "Click on Save"); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("EmailNoteForward", "Verify Confirmation"); officeActivities_NotesHelper.WaitForText("Note saved successfully.", 10); executionLog.Log("EmailNoteForward", "Search Note"); officeActivities_NotesHelper.TypeText("EnterSubject", "Email This Note"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteForward", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteForward", "Click on Note"); officeActivities_NotesHelper.ClickElement("ClickOnNote"); executionLog.Log("EmailNoteForward", "Wait for locator to be present."); officeActivities_NotesHelper.WaitForElementPresent("ClickOnEmail", 10); executionLog.Log("EmailNoteForward", "Click On Email This NOte"); officeActivities_NotesHelper.ClickElement("ClickOnEmail"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteForward", "Verify Page title."); VerifyTitle("Compose"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteForward", "Enter Sender name"); officeActivities_NotesHelper.TypeText("EnterToFiled", "*****@*****.**"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteForward", "Click send Button"); officeActivities_NotesHelper.ClickElement("ClickSendBtn"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteForward", "Verify Email sent successfully"); officeActivities_NotesHelper.WaitForText("E-Mail Sent Successfully.", 20); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EmailNoteForward"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Email Note Forward"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Email Note Forward", "Bug", "Medium", "Note page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Email Note Forward"); TakeScreenshot("EmailNoteForward"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteForward.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EmailNoteForward"); string id = loginHelper.getIssueID("Email Note Forward"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteForward.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Email Note Forward"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Email Note Forward"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EmailNoteForward"); executionLog.WriteInExcel("Email Note Forward", 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 verifyValidationForMsgFile() { 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 officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable var file = GetPathToFile() + "test.msg"; var Subject = "Subject" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyValidationForMsgFile", " Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyValidationForMsgFile", " Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyValidationForMsgFile", " Click On Admin"); VisitOffice("admin"); executionLog.Log("VerifyValidationForMsgFile", " Goto create notes page."); VisitOffice("notes/create"); executionLog.Log("VerifyValidationForMsgFile", " verify title"); VerifyTitle("Create a New Note"); executionLog.Log("VerifyValidationForMsgFile", " Enter Subject"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyValidationForMsgFile", "Click status"); officeActivities_NotesHelper.Select("Status", "Active"); executionLog.Log("VerifyValidationForMsgFile", " Click on Save "); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("VerifyValidationForMsgFile", " Click on Save "); officeActivities_NotesHelper.WaitForText("Note saved successfully.", 10); executionLog.Log("VerifyValidationForMsgFile", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("VerifyValidationForMsgFile", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", Subject); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyValidationForMsgFile", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("VerifyValidationForMsgFile", "Click on add attachment."); officeActivities_NotesHelper.ClickElement("AddAttEdit"); executionLog.Log("VerifyValidationForMsgFile", "Wait for locator to be present."); officeActivities_NotesHelper.WaitForElementPresent("SubjectAttachment", 10); executionLog.Log("VerifyValidationForMsgFile", "Enter attachment subject."); officeActivities_NotesHelper.TypeText("SubjectAttachment", "test"); executionLog.Log("VerifyValidationForMsgFile", "Upload a file with extension .msg"); officeActivities_NotesHelper.Upload("BrowseAttachment", file); executionLog.Log("VerifyValidationForMsgFile", "Click on save button."); officeActivities_NotesHelper.ClickElement("SaveAttach"); executionLog.Log("VerifyValidationForMsgFile", "Wait for invalid file text."); officeActivities_NotesHelper.WaitForText("Please upload a valid file.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyValidationForMsgFile"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Validation For Msg File"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Validation For Msg File", "Bug", "Medium", "Note page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Validation For Msg File"); TakeScreenshot("VerifyValidationForMsgFile"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyValidationForMsgFile.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyValidationForMsgFile"); string id = loginHelper.getIssueID("Verify Validation For Msg File"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyValidationForMsgFile.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Validation For Msg File"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Validation For Msg File"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyValidationForMsgFile"); executionLog.WriteInExcel("Verify Validation For Msg File", Status, JIRA, "Office Activities"); } }
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 editNoteChangeHistory() { 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()); // Random Variable var editname = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditNoteChangeHistory", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditNoteChangeHistory", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditNoteChangeHistory", "Redirect to URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("EditNoteChangeHistory", "Verify title"); VerifyTitle("Notes"); executionLog.Log("EditNoteChangeHistory", "Wait for element to present"); officeActivities_NotesHelper.WaitForElementPresent("Edit", 10); executionLog.Log("EditNoteChangeClient", " Click On Edit Icon"); officeActivities_NotesHelper.ClickElement("Edit"); executionLog.Log("EditNoteChangeHistory", "Verify title"); VerifyTitle("Edit Note"); executionLog.Log("EditNoteChangeClient", "Enter note subj new"); officeActivities_NotesHelper.TypeText("Subject", editname); executionLog.Log("EditNoteChangeClient", "Select Module"); officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client"); executionLog.Log("EditNoteChangeClient", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); //executionLog.Log("EditNoteChangeHistory", "Wait for element to present"); //officeActivities_NotesHelper.WaitForElementPresent("ClickOnClient2", 10); executionLog.Log("EditNoteChangeClient", " Click client to select."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EditNoteChangeHistory", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(3000); //executionLog.Log("EditNoteChangeHistory", "Wait for success message."); //officeActivities_NotesHelper.WaitForText("Note Updated Success.", 20); //executionLog.Log("EditNoteChangeHistory", "Wait for element to present"); //officeActivities_NotesHelper.WaitForElementPresent("EnterSubject", 03); executionLog.Log("EditNoteChangeHistory", "Search note by Subject"); officeActivities_NotesHelper.TypeText("EnterSubject", editname); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EditNoteChangeHistory", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); ////executionLog.Log("EditNoteChangeHistory", "Wait for element to present"); ////officeActivities_NotesHelper.WaitForElementPresent("ClickOnNote", 08); //executionLog.Log("EditNoteChangeHistory", "Verify edited name"); //officeActivities_NotesHelper.VerifyText("ClickOnNote", editname); //Console.WriteLine("Note edited"); executionLog.Log("EditNoteChangeHistory", "Click on edited note"); officeActivities_NotesHelper.ClickElement("ClickOnNote"); executionLog.Log("EditNoteChangeHistory", "Wait for element to present"); officeActivities_NotesHelper.WaitForElementPresent(editname, 04); executionLog.Log("EditNoteChangeHistory", "verify "); officeActivities_NotesHelper.VerifyNoteEdited(editname); //officeActivities_NotesHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditNoteChangeHistory"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Note Change History"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Note Change History", "Bug", "Medium", "Note page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Edit Note Change History"); TakeScreenshot("EditNoteChangeHistory"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNoteChangeHistory.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditNoteChangeHistory"); string id = loginHelper.getIssueID("Edit Note Change History"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNoteChangeHistory.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Note Change History"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Note Change History"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditNoteChangeHistory"); executionLog.WriteInExcel("Edit Note Change History", Status, JIRA, "Office Activities"); } }