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 editNoteChangeClient() { 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 Variables var editname = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditNoteChangeClient", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditNoteChangeClient", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditNoteChangeClient", "Redirect to URL Notes"); VisitOffice("notes"); executionLog.Log("EditNoteChangeClient", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("EditNoteChangeClient", " Click On Edit Icon"); officeActivities_NotesHelper.ClickElement("Edit"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EditNoteChangeClient", "Verify page title"); VerifyTitle("Edit Note"); executionLog.Log("EditNoteChangeClient", "Enter note subj new"); officeActivities_NotesHelper.TypeText("Subject", editname); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("EditNoteChangeClient", "Select Module"); officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("EditNoteChangeClient", "Click on ClientSelectIcon"); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EditNoteChangeClient", " Click On Client2"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EditNoteChangeClient", "Edit Note Save Btn"); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("EditNoteChangeClient", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 20); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditNoteChangeClient"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Note Change Client"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Note Change Client", "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 Client"); TakeScreenshot("EditNoteChangeClient"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNoteChangeClient.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditNoteChangeClient"); string id = loginHelper.getIssueID("Edit Note Change Client"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNoteChangeClient.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Note Change Client"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Note Change Client"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditNoteChangeClient"); executionLog.WriteInExcel("Edit Note Change Client", Status, JIRA, "Office Activities"); } }
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 verifyRelatedToTicketsPopupInNotes() { 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()); // Random Variables var FilerExe = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Redirect at Create Note page"); VisitOffice("notes/create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Select Related To >> Tickets"); officeActivities_NotesHelper.SelectByText("NoteParent", "Ticket"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Click 'Select' button"); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Verify Ticket popup opened"); officeActivities_NotesHelper.VerifyTextAvailable("Select Ticket"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyRelatedToTicketsPopupInNotes"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Related To Tickets Popup In Notes"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Related To Tickets Popup In Notes", "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 Related To Tickets Popup In Notes"); TakeScreenshot("VerifyRelatedToTicketsPopupInNotes"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyRelatedToTicketsPopupInNotes.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyRelatedToTicketsPopupInNotes"); string id = loginHelper.getIssueID("Verify Related To Tickets Popup In Notes"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyRelatedToTicketsPopupInNotes.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Related To Tickets Popup In Notes"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Related To Tickets Popup In Notes"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyRelatedToTicketsPopupInNotes"); executionLog.WriteInExcel("Verify Related To Tickets Popup In Notes", Status, JIRA, "Office Activities"); } }
public void activitiesBulkUpdateNotes() { 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 name = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesBulkUpdateNotes", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesBulkUpdateNotes", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesBulkUpdateNotes", "Redirect at admin page."); VisitOffice("admin"); executionLog.Log("ActivitiesBulkUpdateNotes", "Go to notes page"); VisitOffice("notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on Bulk Update"); officeActivities_NotesHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on Change Status"); officeActivities_NotesHelper.ClickElement("ChangeStatus"); executionLog.Log("ActivitiesBulkUpdateNotes", "Verify alert text for selecting note."); officeActivities_NotesHelper.VerifyAlertText("Please select atleast one record to proceed."); executionLog.Log("ActivitiesBulkUpdateNotes", "Accept alert message by clickin ok."); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first note."); officeActivities_NotesHelper.ClickElement("SelectNote1"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second note."); officeActivities_NotesHelper.ClickElement("SelectNote2"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update."); officeActivities_NotesHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change status."); officeActivities_NotesHelper.ClickElement("ChangeStatus"); executionLog.Log("ActivitiesBulkUpdateNotes", "Select status to be updated."); officeActivities_NotesHelper.SelectByText("SelectStatus", "Inactive"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button."); officeActivities_NotesHelper.ClickElement("UpdateStatus"); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text."); officeActivities_NotesHelper.WaitForText("Note status updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateNotes", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Verify Page title as notes."); VerifyTitle("Notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first notes."); officeActivities_NotesHelper.ClickElement("SelectNote1"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second notes."); officeActivities_NotesHelper.ClickElement("SelectNote2"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update."); officeActivities_NotesHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change owner."); officeActivities_NotesHelper.ClickElement("ChangeOwner"); executionLog.Log("ActivitiesBulkUpdateNotes", "Select owner to be updated."); officeActivities_NotesHelper.SelectByText("SelectOwner", "Ikuta Toma"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button."); officeActivities_NotesHelper.ClickElement("UpdateOwner"); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text."); officeActivities_NotesHelper.WaitForText("Note owner updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateNotes", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Verify Page title as notes."); VerifyTitle("Notes"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first note."); officeActivities_NotesHelper.ClickElement("SelectNote1"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second note."); officeActivities_NotesHelper.ClickElement("SelectNote2"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update."); officeActivities_NotesHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change user group."); officeActivities_NotesHelper.ClickElement("ChangeGroup"); executionLog.Log("ActivitiesBulkUpdateNotes", "Select user group to be updated."); officeActivities_NotesHelper.Select("SelectGroup", "169"); executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button."); officeActivities_NotesHelper.ClickElement("UpdateGroup"); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text."); officeActivities_NotesHelper.WaitForText("Note user group updated successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesBulkUpdateNotes"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Bulk Update Notes"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Bulk Update Notes", "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 Bulk Update Notes"); TakeScreenshot("ActivitiesBulkUpdateNotes"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesBulkUpdateNotes.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesBulkUpdateNotes"); string id = loginHelper.getIssueID("Activities Bulk Update Notes"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesBulkUpdateNotes.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Bulk Update Notes"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Bulk Update Notes"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesBulkUpdateNotes"); executionLog.WriteInExcel("Activities Bulk Update Notes", Status, JIRA, "Office Activities"); } }
public void opportunitiesnNotesUrlChange() { 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_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable var Subject = "Subject" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("OpportunitiesnNotesUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("OpportunitiesnNotesUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("OpportunitiesnNotesUrlChange", "Goto Opportunities"); VisitOffice("opportunities"); executionLog.Log("OpportunitiesnNotesUrlChange", "Click On Any Opportunities tab"); office_OpportunitiesHelper.ClickElement("OpenOpportunity"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Click Add Note button"); office_OpportunitiesHelper.ClickElement("AddNote"); office_OpportunitiesHelper.WaitForWorkAround(10000); executionLog.Log("OpportunitiesnNotesUrlChange", "Enter Note Subject"); officeActivities_NotesHelper.TypeText("Subject", Subject); office_OpportunitiesHelper.WaitForWorkAround(10000); executionLog.Log("OpportunitiesnNotesUrlChange", "Click Save"); officeActivities_NotesHelper.ClickElement("SaveNoteoppo"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Select Activity >> Notes"); officeActivities_NotesHelper.Select("SelectActivityType", "Notes"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Click On Notes "); officeActivities_NotesHelper.ClickForce("ClickNotes1"); officeActivities_NotesHelper.WaitForWorkAround(4000); executionLog.Log("OpportunitiesnNotesUrlChange", "Change the url with the url number of another office"); VisitOffice("notes/view/16"); executionLog.Log("OpportunitiesnNotesUrlChange", "Verify Validation"); officeActivities_NotesHelper.WaitForText("You don't have privileges to view this note.", 10); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("OpportunitiesnNotesUrlChange", "Search subject by note"); officeActivities_NotesHelper.TypeText("EnterSubject", Subject); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesnNotesUrlChange", "Search subject by note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); executionLog.Log("OpportunitiesnNotesUrlChange", "Click on delete note."); officeActivities_NotesHelper.ClickElement("DeleteNote"); executionLog.Log("OpportunitiesnNotesUrlChange", "Accept alert message."); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("OpportunitiesnNotesUrlChange", "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("OpportunitiesnNotesUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Opportunities Notes Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities Notes Url Change", "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("Opportunities Notes Url Change"); TakeScreenshot("OpportunitiesnNotesUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesnNotesUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OpportunitiesnNotesUrlChange"); string id = loginHelper.getIssueID("Opportunities Notes Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesnNotesUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Opportunities Notes Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Opportunities Notes Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OpportunitiesnNotesUrlChange"); executionLog.WriteInExcel("Opportunities Notes Url Change", Status, JIRA, "Office opportunities"); } }
public void adminCorpNotesURLChange() { 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 FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AdminCorpNotesURLChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("AdminCorpNotesURLChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("AdminCorpNotesURLChange", "Goto User "); VisitOffice("mycorp"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("AdminCorpNotesURLChange", "Select Activity >> Notes"); officeActivities_NotesHelper.Select("SelectActivityType", "Notes"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AdminCorpNotesURLChange", "Click On Notes "); officeActivities_NotesHelper.ClickElement("OpenNotes"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AdminCorpNotesURLChange", "Change the url with the url number of another office"); VisitOffice("viewactivity/note/16"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("AdminCorpNotesURLChange", "Verify Validation"); officeActivities_NotesHelper.WaitForText("You don't have privileges to view this office activity.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminCorpNotesURLChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Corp Notes URL Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Corp Notes URL Change", "Bug", "Medium", "Corporate page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Corp Notes URL Change"); TakeScreenshot("AdminCorpNotesURLChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminCorpNotesURLChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminCorpNotesURLChange"); string id = loginHelper.getIssueID("Admin Corp Notes URL Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminCorpNotesURLChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Corp Notes URL Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Corp Notes URL Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminCorpNotesURLChange"); executionLog.WriteInExcel("Admin Corp Notes URL Change", Status, JIRA, "My Corp"); } }
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 verifyNotesAdvanceFilerColumnOrder() { 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 String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify subject column is visible on the page.."); officeActivities_NotesHelper.IsElementPresent("HeadSubject"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify related to column is visible on the page."); officeActivities_NotesHelper.IsElementPresent("HeadRelatedTo"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify created column is visible on the page."); officeActivities_NotesHelper.IsElementPresent("HeadCreated"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select subject in displayed columns."); officeActivities_NotesHelper.SelectByText("DisplayedCols", "Subject"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols."); officeActivities_NotesHelper.ClickElement("RemoveCols"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select related to in displayed columns."); officeActivities_NotesHelper.SelectByText("DisplayedCols", "Related To"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); officeActivities_NotesHelper.ClickElement("RemoveCols"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select created in displayed columns."); officeActivities_NotesHelper.SelectByText("DisplayedCols", "Created"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); officeActivities_NotesHelper.ClickElement("RemoveCols"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify subject not present on page."); officeActivities_NotesHelper.IsElementNotPresent("HeadSubject"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify related to not present on page."); officeActivities_NotesHelper.IsElementNotPresent("HeadRelatedTo"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify created not present on page."); officeActivities_NotesHelper.IsElementNotPresent("HeadCreated"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect at leads page."); VisitOffice("leads"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify page title as leads."); VerifyTitle("Leads"); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect at tasks page."); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify page title as notes"); VerifyTitle("Notes"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify default position of related to column."); officeActivities_NotesHelper.IsElementPresent("HeadRelatedTO2"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify default position of created by column."); officeActivities_NotesHelper.IsElementPresent("HeadCreatedBy3"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect at tasks page."); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select related to in displayed column."); officeActivities_NotesHelper.SelectByText("DisplayedCols", "Related To"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Move related to 1 step up."); officeActivities_NotesHelper.ClickElement("MoveUp"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select created by in displayed column."); officeActivities_NotesHelper.SelectByText("DisplayedCols", "Created By"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Move created by 1 step down."); officeActivities_NotesHelper.ClickElement("MoveDown"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify changed position of related to column."); officeActivities_NotesHelper.IsElementPresent("HeadRelatedTO1"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify changed position of created by column."); officeActivities_NotesHelper.IsElementPresent("HeadCreatedBy4"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "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("VerifyNotesAdvanceFilerColumnOrder"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Tasks Advance Filer Column Order"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Tasks Advance Filer Column Order", "Bug", "Medium", "Activities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Tasks Advance Filer Column Order"); TakeScreenshot("VerifyNotesAdvanceFilerColumnOrder"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyNotesAdvanceFilerColumnOrder"); string id = loginHelper.getIssueID("Verify Tasks Advance Filer Column Order"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Tasks Advance Filer Column Order"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Tasks Advance Filer Column Order"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyNotesAdvanceFilerColumnOrder"); executionLog.WriteInExcel("Verify Tasks Advance Filer Column Order", Status, JIRA, "Notes Management"); } }
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 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"); } }
public void verifyCreatorNameOfTaskAndNoteInMerchant() { string[] username1 = null; string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_corp"); username1 = 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 corp_MerchantHelper = new Corp_MerchantHelper(GetWebDriver()); var office_clientsHelper = new Office_ClientsHelper(GetWebDriver()); var myprofilepagehelper = new MyProfilePageHelper(GetWebDriver()); var officeActivities_Taskshelper = new OfficeActivities_TasksHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // variables String JIRA = ""; String Status = "Pass"; var subject = "TestTask" + RandomNumber(1, 999999); var subject1 = "TestNote" + RandomNumber(1, 999999); try { executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Login to office portal with valid username and password"); Login(username1[0], password[0]); Console.WriteLine("Logged in as: " + username1[0] + " / " + password[0]); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Redirect at My Profile page."); VisitOffice("myprofile"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Edit profile Button."); myprofilepagehelper.ClickElement("EditProfileBtn"); myprofilepagehelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Get First Name of User"); var name = myprofilepagehelper.GetValue("//input[@id='EmployeeFirstName']"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Redirect at merchants page."); VisitOffice("clients"); office_clientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on a client"); var clientname = office_clientsHelper.GetText("//table[@id='list1']/tbody/tr[2]/td[15]/a"); office_clientsHelper.ClickElement("Client1"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on New Task"); office_clientsHelper.ClickElement("AddTask"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter Subject"); officeActivities_Taskshelper.TypeText("Subject", subject); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter Start Date"); officeActivities_Taskshelper.TypeText("StartDate", "27/11/2017"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter Due Date"); officeActivities_Taskshelper.TypeText("DueDate", "28/11/2017"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Save button"); officeActivities_Taskshelper.ClickElement("Save"); officeActivities_Taskshelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Add Note button"); office_clientsHelper.ClickElement("AddNotes"); office_clientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Change to current window"); office_clientsHelper.SwitchToWindow(); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter Subject"); officeActivities_NotesHelper.TypeText("Subject", subject1); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Add Note button"); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Change to current window"); office_clientsHelper.SwitchToWindow(); //executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Logout"); //Logout(); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Profile Icon"); office_clientsHelper.ClickElement("ProfileIcon"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Logout"); office_clientsHelper.ClickElement("Logout"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Login Screen"); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Login to corporate portal with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Redirect at merchants page."); VisitCorp("merchants"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter client name in search box"); corp_MerchantHelper.TypeText("EnterClinentToSearch", clientname); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Merchant"); corp_MerchantHelper.ClickElement("ClickOnMerchant"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Select Activity Type to Tasks"); corp_MerchantHelper.Select("SelectActivityType", "Tasks"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter task subject name"); corp_MerchantHelper.TypeText("SearchActivityName", subject); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on task"); corp_MerchantHelper.ClickElement("ClickOnActivityAny"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Verify Created By name is appearing"); corp_MerchantHelper.VerifyText("CreatedOnText", name); Console.WriteLine("Creator Name of Task is " + name); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Redirect at merchants page."); VisitCorp("merchants"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter client name in search box"); corp_MerchantHelper.TypeText("EnterClinentToSearch", clientname); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on Merchant"); corp_MerchantHelper.ClickElement("ClickOnMerchant"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Select Activity Type to Notes"); corp_MerchantHelper.Select("SelectActivityType", "Notes"); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Enter note subject name"); corp_MerchantHelper.TypeText("SearchActivityName", subject1); corp_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Click on note"); corp_MerchantHelper.ClickElement("ClickOnActivityAny"); corp_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCreatorNameOfTaskAndNoteInMerchant", "Verify Created By name is appearing"); corp_MerchantHelper.VerifyText("CreatedOnText", name); Console.WriteLine("Creator Name of Task is " + name); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyCreatorNameOfTaskAndNoteInMerchant"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Creator Name Of Task And Note In Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Creator Name Of Task And Note In Merchant", "Bug", "Medium", "Merchant corp", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Creator Name Of Task And Note In Merchant"); TakeScreenshot("VerifyCreatorNameOfTaskAndNoteInMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCreatorNameOfTaskAndNoteInMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyCreatorNameOfTaskAndNoteInMerchant"); string id = loginHelper.getIssueID("Verify Creator Name Of Task And Note In Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCreatorNameOfTaskAndNoteInMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Creator Name Of Task And Note In Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Creator Name Of Task And Note In Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyCreatorNameOfTaskAndNoteInMerchant"); executionLog.WriteInExcel("Verify Creator Name Of Task And Note In Merchant", Status, JIRA, "Corp Merchant"); } }
public void verifyStartAndDueTimeOfTaskUnderLeadAndMerchant() { 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_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var officeActivities_TasksHelper = new OfficeActivities_TasksHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Subject = "Testtask" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Login with valid credentials"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Go to All leads page"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify page title."); VerifyTitle("Leads"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on a lead"); office_LeadsHelper.ClickElement("FirstLead"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Add Note button"); office_LeadsHelper.ClickElement("AddNote"); office_LeadsHelper.WaitForWorkAround(3000); office_LeadsHelper.SwitchToWindow(); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Subject of note"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Add Task check box"); officeActivities_NotesHelper.ClickElement("AddTaskChkBox"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Start Date of task"); officeActivities_TasksHelper.TypeText("StartDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter End Date of task"); officeActivities_TasksHelper.TypeText("DueDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Save button"); officeActivities_NotesHelper.ClickForce("Save"); //officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); office_LeadsHelper.WaitForText("Note successfully Created.", 05); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Activity Type >> Tasks"); office_LeadsHelper.WaitForWorkAround(3000); office_LeadsHelper.SelectByText("SelectActivityType", "Tasks"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Search Task by name"); office_LeadsHelper.TypeText("ActivitySubject", Subject); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Open task"); office_LeadsHelper.ClickForce("ClickNotes1"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Edit button"); officeActivities_TasksHelper.ClickElement("EditBtn"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Start Time"); officeActivities_TasksHelper.VerifySelectdOptn("StartHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("StartMin", "00"); officeActivities_TasksHelper.VerifySelectdOptn("StartAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Due Time"); officeActivities_TasksHelper.VerifySelectdOptn("DueHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("DueMin", "15"); officeActivities_TasksHelper.VerifySelectdOptn("DueAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Go to All merchants page"); VisitOffice("clients"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on a merchant"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Add Note button"); office_ClientsHelper.ClickElement("AddNotes"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.SwitchToWindow(); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Subject of note"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Add Task check box"); officeActivities_NotesHelper.ClickElement("AddTaskChkBox"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Start Date of task"); officeActivities_TasksHelper.TypeText("StartDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter End Date of task"); officeActivities_TasksHelper.TypeText("DueDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Save button"); officeActivities_NotesHelper.ClickForce("Save"); //officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); office_ClientsHelper.WaitForText("Note successfully Created.", 05); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Activity Type >> Tasks"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.SelectByText("ActivityType", "Tasks"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Search Task by name"); office_ClientsHelper.TypeText("SearchActivity", Subject); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Open task"); office_ClientsHelper.ClickForce("Activity1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Edit button"); officeActivities_TasksHelper.ClickElement("EditBtn"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Start Time"); officeActivities_TasksHelper.VerifySelectdOptn("StartHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("StartMin", "00"); officeActivities_TasksHelper.VerifySelectdOptn("StartAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Due Time"); officeActivities_TasksHelper.VerifySelectdOptn("DueHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("DueMin", "15"); officeActivities_TasksHelper.VerifySelectdOptn("DueAMPM", "AM"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Start And Due Time Of Task Under Lead And Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Start And Due Time Of Task Under Lead And Merchant", "Bug", "Medium", "Leads and Merchants page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); TakeScreenshot("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); string id = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); executionLog.WriteInExcel("Verify Start And Due Time Of Task Under Lead And Merchant", Status, JIRA, "Office Leads And Merchants"); } }
public void noteAttachmentInvlidFileValidation() { 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()); // Random Variables var FilerExe = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("NoteAttachmentInvlidFileValidation", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("NoteAttachmentInvlidFileValidation", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("NoteAttachmentInvlidFileValidation", "Click on Activities >> Notes"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NoteAttachmentInvlidFileValidation", "Click on any Note"); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); executionLog.Log("NoteAttachmentInvlidFileValidation", "Click on add attachment"); officeActivities_NotesHelper.ClickElement("AddAttachment"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NoteAttachmentInvlidFileValidation", "Upload a invalid file"); officeActivities_NotesHelper.UploadFile("//*[@id='DocumentViewForm']/div[2]//input[@id='DocumentFile']", FilerExe); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NoteAttachmentInvlidFileValidation", "Verify alert for invalid file."); officeActivities_NotesHelper.VerifyAlertText("Please select a valid file"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("NoteAttachmentInvlidFileValidation"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Note Attachment Invlid File Validation"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Note Attachment Invlid File Validation", "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("Note Attachment Invlid File Validation"); TakeScreenshot("NoteAttachmentInvlidFileValidation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NoteAttachmentInvlidFileValidation.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("NoteAttachmentInvlidFileValidation"); string id = loginHelper.getIssueID("Note Attachment Invlid File Validation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NoteAttachmentInvlidFileValidation.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Note Attachment Invlid File Validation"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Note Attachment Invlid File Validation"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("NoteAttachmentInvlidFileValidation"); executionLog.WriteInExcel("Note Attachment Invlid File Validation", Status, JIRA, "Office Activities"); } }
public void notesAdvanceFilterResultsPP() { 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("NotesAdvanceFilterResultsPP", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("NotesAdvanceFilterResultsPP", "Redirect To URL"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("NotesAdvanceFilterResultsPP", "Select number of records to 10."); officeActivities_NotesHelper.SelectByText("ResultsPerPage", "10"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify number of records displayed."); officeActivities_NotesHelper.ShowResult(10); // officeActivities_NotesHelper.VerifyText("No.ofResults", "Showing 1 - 10 of"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("NotesAdvanceFilterResultsPP", "Select number of records to 20."); officeActivities_NotesHelper.SelectByText("ResultsPerPage", "20"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify number of records displayed."); officeActivities_NotesHelper.ShowResult(20); // officeActivities_NotesHelper.VerifyText("No.ofResults", "Showing 1 - 20 of"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("NotesAdvanceFilterResultsPP", "Select number of records to 50."); officeActivities_NotesHelper.SelectByText("ResultsPerPage", "50"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify number of records displayed."); officeActivities_NotesHelper.ShowResult(50); // officeActivities_NotesHelper.VerifyText("No.ofResults", "Showing 1 - 50 of"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on advance filter."); officeActivities_NotesHelper.ClickElement("AdvanceFilter"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("NotesAdvanceFilterResultsPP", "Select number of records to 100."); officeActivities_NotesHelper.SelectByText("ResultsPerPage", "100"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button."); officeActivities_NotesHelper.ClickElement("Apply"); officeActivities_NotesHelper.WaitForWorkAround(3000); //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("NotesAdvanceFilterResultsPP", "Verify number of records displayed."); officeActivities_NotesHelper.ShowResult(100); //officeActivities_NotesHelper.VerifyText("No.ofResults", "Showing 1 - 100 of"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("NotesAdvanceFilterResultsPP", "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("NotesAdvanceFilterResultsPP"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Notes Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Notes Advance Filter ResultsPP", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Notes Advance Filter ResultsPP"); TakeScreenshot("NotesAdvanceFilterResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NotesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("NotesAdvanceFilterResultsPP"); string id = loginHelper.getIssueID("Notes Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\NotesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Notes Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Notes Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("NotesAdvanceFilterResultsPP"); executionLog.WriteInExcel("Notes Advance Filter ResultsPP", Status, JIRA, "Opportunities Management"); } }