public void activitiesMeetingsManagement() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(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()); // Random Variables. var Subject = "Meeting" + GetRandomNumber(); var file = GetPathToFile() + "2.pdf"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesMeetingsManagement", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesMeetingsManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesMeetingsManagement", "Go to create meetings page"); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Verify page title."); VerifyTitle("Create a Meeting"); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("NameError", "This field is required."); executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required."); executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required."); executionLog.Log("ActivitiesMeetingsManagement", "Enter Subject for the meeting"); officeActivities_MeetingHelper.TypeText("Subject", Subject); executionLog.Log("ActivitiesMeetingsManagement", "Enter location of meeting."); officeActivities_MeetingHelper.TypeText("Location", "Test Location"); executionLog.Log("ActivitiesMeetingsManagement", "Enter start date."); officeActivities_MeetingHelper.TypeText("StartDate", "12/30/2016"); executionLog.Log("ActivitiesMeetingsManagement", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "12/22/2016"); executionLog.Log("ActivitiesMeetingsManagement", "Select Related To"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on client for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time."); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesMeetingsManagement", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "12/22/2016"); executionLog.Log("ActivitiesMeetingsManagement", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "12/30/2016"); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "verify page text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at clients page."); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click on any client."); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings."); office_ClientsHelper.Select("SelectActivityType", "Meetings"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Enter ticket name to be search."); office_ClientsHelper.TypeText("ActivitySubject", Subject); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Verify created meeting present on client page."); office_ClientsHelper.IsElementPresent("OpenFirstActivity"); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page."); VisitOffice("meetings"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "select all in owner fiedld"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Verify page title."); VerifyTitle("Edit Meeting"); executionLog.Log("ActivitiesMeetingsManagement", "Select meeting parent as lead"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Lead"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on lead for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Edit end Date"); officeActivities_MeetingHelper.TypeText("EndDate", "1/1/2017"); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "Wait for updation success."); officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at leads page."); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click On any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings."); office_LeadsHelper.Select("SelectActivityType", "Meetings"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Enter meeting name to be search."); office_LeadsHelper.TypeText("ActivitySubject", Subject); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Verify created meeting present on leads page."); office_LeadsHelper.IsElementPresent("ClickNotes1"); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "select all in owner fiedld"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Verify page title."); VerifyTitle("Edit Meeting"); executionLog.Log("ActivitiesMeetingsManagement", "Select parent type to opportunity"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Opportunity"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click on opportunity for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "Wait for updation success message."); officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at opportunities page."); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click On any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings"); office_LeadsHelper.Select("SelectActivityType", "Meetings"); office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Enter meeting name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", Subject); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Verify created opportunity present on opportunity page"); office_OpportunitiesHelper.IsElementPresent("OpenOpportunity"); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "select all in owner fiedld"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Verify page title."); VerifyTitle("Edit Meeting"); executionLog.Log("ActivitiesMeetingsManagement", "Select parent type for meeting."); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Ticket"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click on ticket for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesMeetingsManagement", "Wait for success message."); officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at tickets page."); VisitOffice("tickets"); executionLog.Log("ActivitiesMeetingsManagement", "Click On any ticket."); ticket_CreateATicketHelper.ClickElement("Ticket1"); executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings"); office_LeadsHelper.Select("SelectActivityType", "Meetings"); executionLog.Log("ActivitiesMeetingsManagement", "Enter ticket name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", Subject); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Click on ticket to view details"); ticket_CreateATicketHelper.IsElementPresent("OpenTicket"); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page."); VisitOffice("meetings"); executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "select all in owner fiedld"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesMeetingsManagement", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); executionLog.Log("ActivitiesMeetingsManagement", "Click On Cance meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesMeetingsManagement", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); executionLog.Log("ActivitiesMeetingsManagement", "Verify page title"); VerifyTitle("Recycled Meeting"); executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "select all in owner fiedld"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesMeetingsManagement", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("ActivitiesMeetingsManagement", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("ActivitiesMeetingsManagement", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesMeetingsManagement", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesMeetingsManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Meetings Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Meetings Management", "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("Activities Meetings Management"); TakeScreenshot("ActivitiesMeetingsManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesMeetingsManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesMeetingsManagement"); string id = loginHelper.getIssueID("Activities Meetings Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesMeetingsManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Meetings Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Meetings Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesMeetingsManagement"); executionLog.WriteInExcel("Activities Meetings Management", Status, JIRA, "Office Activities"); } }
public void taskAndMeeting() { 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 officeActivities_TasksHelper = new OfficeActivities_TasksHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Task = "New" + RandomNumber(99, 99999); var Meeting = "Meeting" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("TaskAndMeeting", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("TaskAndMeeting", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("TaskAndMeeting", "Redirect at create task page."); VisitOffice("tasks/create"); officeActivities_TasksHelper.WaitForWorkAround(3000); //executionLog.Log("TaskAndMeeting", "Wait for locator to present."); //officeActivities_MeetingHelper.WaitForElementPresent("Save", 10); executionLog.Log("TaskAndMeeting", "Click on Save"); officeActivities_TasksHelper.ClickElement("Save"); //officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Verify Validation"); officeActivities_TasksHelper.VerifyText("ValdatiponForSujectField", "This field is required."); executionLog.Log("TaskAndMeeting", "Enter Sucject"); officeActivities_TasksHelper.TypeText("Subjuct1", Task); executionLog.Log("TaskAndMeeting", " Click Save"); officeActivities_TasksHelper.ClickElement("Save"); //officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Verify Validation"); officeActivities_TasksHelper.VerifyText("Valdationforstartdate", "This field is required."); executionLog.Log("TaskAndMeeting", "Enter Start date"); officeActivities_TasksHelper.TypeText("StartDate", "05/05/2018"); executionLog.Log("TaskAndMeeting", "Enter Due date"); officeActivities_TasksHelper.TypeText("DueDate", "06/06/2018"); executionLog.Log("TaskAndMeeting", "Click Save"); officeActivities_TasksHelper.ClickElement("Save"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Verify Confrmation"); officeActivities_TasksHelper.WaitForText("Task saved successfully.", 05); executionLog.Log("TaskAndMeeting", "Rediret to task"); VisitOffice("tasks"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Search Task"); officeActivities_TasksHelper.TypeText("EnterSubject", Task); officeActivities_TasksHelper.WaitForWorkAround(2000); officeActivities_MeetingHelper.selectOwner("//*[@id='gs_user_name']"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Edit Task"); officeActivities_TasksHelper.ClickElement("Edit"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Save"); officeActivities_TasksHelper.ClickElement("Save"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Verify Confrmation"); officeActivities_TasksHelper.WaitForText("Task Updated Success.", 10); executionLog.Log("TaskAndMeeting", "Rediected to Meetings page "); VisitOffice("meetings/create"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", Meeting); executionLog.Log("TaskAndMeeting", "Start date"); officeActivities_MeetingHelper.TypeText("StartDate", "06/06/2018"); executionLog.Log("TaskAndMeeting", "End date"); officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2018"); executionLog.Log("TaskAndMeeting", "Select Client"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); officeActivities_TasksHelper.WaitForWorkAround(1000); executionLog.Log("TaskAndMeeting", "Click Assigned To"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Click Assigned To"); officeActivities_MeetingHelper.ClickElement("SelectedClient"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Click Save"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Wait for confirmation."); officeActivities_TasksHelper.WaitForText("Meeting saved successfully. ", 10); executionLog.Log("TaskAndMeeting", "Redirect to meeting"); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Search Task"); officeActivities_MeetingHelper.TypeText("SearchSubject", Meeting); officeActivities_TasksHelper.WaitForWorkAround(2000); officeActivities_MeetingHelper.selectOwner("//select[@id='gs_owner']"); officeActivities_TasksHelper.WaitForWorkAround(2000); executionLog.Log("TaskAndMeeting", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Click on Save"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("TaskAndMeeting", "Wait for success message."); officeActivities_TasksHelper.WaitForText("Meeting updated successfully", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TaskAndMeeting"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("TaskAndMeeting"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("TaskAndMeeting", "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("TaskAndMeeting"); TakeScreenshot("TaskAndMeeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TaskAndMeeting.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TaskAndMeeting"); string id = loginHelper.getIssueID("TaskAndMeeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TaskAndMeeting.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("TaskAndMeeting"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("TaskAndMeeting"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TaskAndMeeting"); executionLog.WriteInExcel("TaskAndMeeting", Status, JIRA, "Office Activities."); } }
public void editMeetingdeleteFileSave() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var Filename = GetPathToFile() + "index.jpg"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditMeetingdeleteFileSave", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditMeetingdeleteFileSave", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditMeetingdeleteFileSave", "Click On Admin"); VisitOffice("admin"); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(5000); executionLog.Log("EditMeetingdeleteFileSave", "Verify title"); VerifyTitle("Meetings"); executionLog.Log("EditMeetingdeleteFileSave", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeActivities_MeetingHelper.WaitForWorkAround(5000); executionLog.Log("EditMeetingdeleteFileSave", "Verify page title."); VerifyTitle("Edit Meeting"); executionLog.Log("EditMeetingdeleteFileSave", "Click on add attachment"); officeActivities_MeetingHelper.ClickElement("AddAttachment"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditMeetingdeleteFileSave", "Upload File "); officeActivities_MeetingHelper.Upload("File_Upload", Filename); executionLog.Log("EditMeetingdeleteFileSave", "Enter attachment name."); officeActivities_MeetingHelper.TypeText("AttachName", "New Subject"); executionLog.Log("EditMeetingdeleteFileSave", "Remove the uploaded file."); officeActivities_MeetingHelper.ClickElement("RemoveAttach"); executionLog.Log("EditMeetingdeleteFileSave", "Click on save button."); officeActivities_MeetingHelper.ClickElement("SaveAttachment"); officeActivities_MeetingHelper.WaitForWorkAround(5000); executionLog.Log("EditMeetingdeleteFileSave", "Verify validation text."); officeActivities_MeetingHelper.VerifyText("Attachmenterror", "This field is required."); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditMeetingdeleteFileSave"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Meeting delete File Save"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Meeting delete File Save", "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("Edit Meeting delete File Save"); TakeScreenshot("EditMeetingdeleteFileSave"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMeetingdeleteFileSave.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditMeetingdeleteFileSave"); string id = loginHelper.getIssueID("Edit Meeting delete File Save"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMeetingdeleteFileSave.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Meeting delete File Save"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Meeting delete File Save"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditMeetingdeleteFileSave"); executionLog.WriteInExcel("Edit Meeting delete File Save", Status, JIRA, "Office Activities"); } }
public void verifyMeetingDelete() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var name = "Subject" + RandomNumber(1, 9999); // var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; //try //{ executionLog.Log("VerifyMeetingDelete", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyMeetingDelete", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyMeetingDelete", " Go to create meeting page."); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingDelete", "Verify title"); VerifyTitle("Create a Meeting"); executionLog.Log("VerifyMeetingDelete", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", name); executionLog.Log("EditMeetingValiationForAlphabet", "Enter Meeting location"); officeActivities_MeetingHelper.TypeText("Location", "Test Meeting"); executionLog.Log("EditMeetingValiationForAlphabet", "Select Priority"); officeActivities_MeetingHelper.Select("Priority", "Low"); executionLog.Log("EditMeetingValiationForAlphabet", "select Module"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); executionLog.Log("EditMeetingValiationForAlphabet", "Click on find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Select a client"); officeActivities_MeetingHelper.ClickElement("SelectClient"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditMeetingValiationForAlphabet", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Enter an alphabet in end date"); officeActivities_MeetingHelper.TypeText("EndDate", "09/09/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Click on Save"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Search created meeting by Subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Select check box of created meeting"); officeActivities_MeetingHelper.ClickElement("SelectCheckbox"); executionLog.Log("EditMeetingValiationForAlphabet", "Click on Delete button"); officeActivities_MeetingHelper.ClickElement("DeleteBtn"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("EditMeetingValiationForAlphabet", "Wait for successfully meeting delete"); officeActivities_MeetingHelper.WaitForText("Meeting deleted successfully.", 5); Console.WriteLine("Meeting deleted successfully."); //} //catch (Exception e) //{ //} }
public void deleteMeetingFromRecycleBin() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); //Random Variables var name = "Meeting" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("DeleteMeetingFromRecycleBin", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("DeleteMeetingFromRecycleBin", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("DeleteMeetingFromRecycleBin", "Click to open client info"); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DeleteMeetingFromRecycleBin", "Verify page title"); VerifyTitle("Create a Meeting"); executionLog.Log("DeleteMeetingFromRecycleBin", "Enter Subject meeting"); officeActivities_MeetingHelper.TypeText("Subject", name); executionLog.Log("DeleteMeetingFromRecycleBin", "Enter location of rhe meeting."); officeActivities_MeetingHelper.TypeText("Location", "Location"); executionLog.Log("DeleteMeetingFromRecycleBin", "Enter start date meeting."); officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018"); executionLog.Log("DeleteMeetingFromRecycleBin", "Enter end date meeting."); officeActivities_MeetingHelper.TypeText("EndDate", "09/09/2018"); executionLog.Log("DeleteMeetingFromRecycleBin", "Select Related To"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); executionLog.Log("DeleteMeetingFromRecycleBin", "Click On Assigned To"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DeleteMeetingFromRecycleBin", "Clcik on Client You Want To select"); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); executionLog.Log("DeleteMeetingFromRecycleBin", "Wait for element to be present."); officeActivities_MeetingHelper.WaitForElementPresent("Save", 10); executionLog.Log("DeleteMeetingFromRecycleBin", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("DeleteMeetingFromRecycleBin", "verify page text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); executionLog.Log("DeleteMeetingFromRecycleBin", "Redirect To Meeting"); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DeleteMeetingFromRecycleBin", "Search Meeting"); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DeleteMeetingFromRecycleBin", "Select All in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DeleteMeetingFromRecycleBin", "Click On Meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DeleteMeetingFromRecycleBin", "Cancel Meeting"); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); executionLog.Log("DeleteMeetingFromRecycleBin", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("DeleteMeetingFromRecycleBin", "Wait for success message."); officeActivities_MeetingHelper.WaitForText("Meeting successfully deleted.", 10); executionLog.Log("DeleteMeetingFromRecycleBin", "Go to Recycle bin"); VisitOffice("meetings/recyclebin"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DeleteMeetingFromRecycleBin", "Search Meeting By Subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DeleteMeetingFromRecycleBin", "Select All in owner field"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DeleteMeetingFromRecycleBin", "Click On Delete Icon"); officeActivities_MeetingHelper.ClickElement("ClickOnDeleteIcon"); executionLog.Log("DeleteMeetingFromRecycleBin", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("DeleteMeetingFromRecycleBin", "Wait for success message."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("DeleteMeetingFromRecycleBin"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Delete Meeting From Recycle Bin"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("DeleteMeetingFromRecycleBin", "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("Delete Meeting From Recycle Bin"); TakeScreenshot("DeleteMeetingFromRecycleBin"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DeleteMeetingFromRecycleBin.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("DeleteMeetingFromRecycleBin"); string id = loginHelper.getIssueID("Delete Meeting From Recycle Bin"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DeleteMeetingFromRecycleBin.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Delete Meeting From Recycle Bin"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Delete Meeting From Recycle Bin"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("DeleteMeetingFromRecycleBin"); executionLog.WriteInExcel("Delete Meeting From Recycle Bin", Status, JIRA, "Office Activities"); } }
public void editMeetingValiationForAlphabet() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var name = "Subject" + RandomNumber(1, 9999); var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditMeetingValiationForAlphabet", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditMeetingValiationForAlphabet", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditMeetingValiationForAlphabet", " Go to create meeting page."); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Verify title"); VerifyTitle("Create a Meeting"); executionLog.Log("EditMeetingValiationForAlphabet", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", name); executionLog.Log("EditMeetingValiationForAlphabet", "Enter Meeting location"); officeActivities_MeetingHelper.TypeText("Location", "Test Meeting"); executionLog.Log("EditMeetingValiationForAlphabet", "Select Priority"); officeActivities_MeetingHelper.Select("Priority", "Low"); executionLog.Log("EditMeetingValiationForAlphabet", "select Module"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); executionLog.Log("EditMeetingValiationForAlphabet", "Click on find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Select a client"); officeActivities_MeetingHelper.ClickElement("SelectedClient"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditMeetingValiationForAlphabet", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Enter an alphabet in end date"); officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditMeetingValiationForAlphabet", "Click on Save "); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("EditMeetingValiationForAlphabet", "Verify alert message for valid date."); //GetWebDriver().SwitchTo().Alert(); string poptxt = GetWebDriver().SwitchTo().Alert().Text; Assert.AreEqual("Start Date & Time should lesser than or equal to Due Date & Time.", poptxt); //executionLog.Log("EditMeetingValiationForAlphabet", "Verify the field validation"); //officeActivities_MeetingHelper.VerifyPageText("Enter a valid end date"); executionLog.Log("EditMeetingValiationForAlphabet", "Verify 500 error not occured."); officeActivities_MeetingHelper.VerifyTextNotPresent("500 Internal server error."); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditMeetingValiationForAlphabet"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Meeting Valiation For Alphabet"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Meeting Valiation For Alphabet", "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("Edit Meeting Valiation For Alphabet"); TakeScreenshot("EditMeetingValiationForAlphabet"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMeetingValiationForAlphabet.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditMeetingValiationForAlphabet"); string id = loginHelper.getIssueID("Edit Meeting Valiation For Alphabet"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMeetingValiationForAlphabet.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Meeting Valiation For Alphabet"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Meeting Valiation For Alphabet"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditMeetingValiationForAlphabet"); executionLog.WriteInExcel("Edit Meeting Valiation For Alphabet", Status, JIRA, "Office Activities"); } }
public void verifyMeetingsCreditsIssue() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); var Name = "Meeting" + RandomNumber(1, 500); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyMeetingsCreditsIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyMeetingsCreditsIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyMeetingsCreditsIssue", "Goto User Activities >> Meeting"); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Create button"); officeActivities_MeetingHelper.ClickElement("CreateMeetingBtn"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the subjecr Name"); officeActivities_MeetingHelper.TypeText("Subject", Name); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the Start Date"); officeActivities_MeetingHelper.TypeText("StartDate", "06/06/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the End Date"); officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2018"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Select related to"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); officeActivities_MeetingHelper.WaitForWorkAround(2000); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Select button"); officeActivities_MeetingHelper.ClickElement("SelectBtn"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyMeetingsCreditsIssue", "Select the client"); officeActivities_MeetingHelper.ClickElement("SelectClient"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Save button"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyMeetingsCreditsIssue", "Search the meeting"); officeActivities_MeetingHelper.TypeText("SearchSubject", Name); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyMeetingsCreditsIssue", "Click On any Meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Verify meeting created by credits"); officeActivities_MeetingHelper.VerifyText("CreatedBy", "Howard Tang"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Verify Meeting Modified by credits"); officeActivities_MeetingHelper.VerifyText("ModifiedBy", "Howard Tang"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Cancel button"); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); officeActivities_MeetingHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyMeetingsCreditsIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Meetings Credits Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Meetings Credits Issue", "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 Meetings Credits Issue"); TakeScreenshot("VerifyMeetingsCreditsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyMeetingsCreditsIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyMeetingsCreditsIssue"); string id = loginHelper.getIssueID("Verify Meetings Credits Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyMeetingsCreditsIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Meetings Credits Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Meetings Credits Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyMeetingsCreditsIssue"); executionLog.WriteInExcel("Verify Meetings Credits Issue", Status, JIRA, "Office Activities"); } }
public void saleAgent2() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects5 var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); var officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver()); var officeActivities_TasksHelper = new OfficeActivities_TasksHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "usernameSale"); password = oXMLData.getData("settings/Credentials", "PasswordSale"); // Variable var Meeting = "Meeting" + RandomNumber(1, 99999); var Task = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("SaleAgent2", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("SaleAgent2", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("SaleAgent2", "Goto Ticket"); VisitOffice("tickets"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Verify Ticket"); officeTickets_CreateTicketsHelper.VerifyText("ViewHeadingTicket", "Tickets"); executionLog.Log("SaleAgent2", "Goto create Ticket"); VisitOffice("tickets/create"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Enter Ticket Subject"); officeTickets_CreateTicketsHelper.TypeText("TicketName", "Test Ticket"); executionLog.Log("SaleAgent2", "Click Assigned Icon"); officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Select Client Ticket"); officeTickets_CreateTicketsHelper.ClickElement("Client"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Click on Save"); officeTickets_CreateTicketsHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Verify Confirmation"); officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 10); executionLog.Log("SaleAgent2", "Click Edit Ticket Button"); officeTickets_CreateTicketsHelper.ClickElement("ClickEditTicketBtn"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click on Save"); officeTickets_CreateTicketsHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Redirect at Create Task"); VisitOffice("tasks/create"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click on Save"); officeActivities_TasksHelper.ClickElement("Save"); //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Verify Validation text on page."); officeActivities_TasksHelper.VerifyText("ValdatiponForSujectField", "This field is required."); executionLog.Log("SaleAgent2", "Enter Subject"); officeActivities_TasksHelper.TypeText("Subjuct1", Task); executionLog.Log("SaleAgent2", " Click Save"); officeActivities_TasksHelper.ClickElement("Save"); //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Verify Validation for date."); officeActivities_TasksHelper.VerifyText("Valdationforstartdate", "This field is required."); executionLog.Log("SaleAgent2", "Enter Start date"); officeActivities_TasksHelper.TypeText("StartDate", "08/08/2017"); executionLog.Log("SaleAgent2", "Enter End date"); officeActivities_TasksHelper.TypeText("DueDate", "09/09/2017"); executionLog.Log("SaleAgent2", "Select Related TO"); officeActivities_TasksHelper.SelectByText("SelectRelatedTo", "Client"); executionLog.Log("SaleAgent2", "Click on Assigned To"); officeActivities_TasksHelper.ClickElement("SelectAssignedTo"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Select Client"); officeActivities_TasksHelper.ClickElement("ClickToSelectClient"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Click on save."); officeActivities_TasksHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Wait for Confrmation"); officeActivities_TasksHelper.WaitForText("Task saved successfully.", 10); executionLog.Log("SaleAgent2", "Rediret to task"); VisitOffice("tasks"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Search Task"); officeActivities_TasksHelper.TypeText("EnterSubject", Task); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Edit Task"); officeActivities_TasksHelper.ClickElement("Edit"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Save"); officeActivities_TasksHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Verify Confrmation"); officeActivities_TasksHelper.WaitForText("Task Updated Success.", 10); executionLog.Log("SaleAgent2", "Rediected to task "); VisitOffice("meetings/create"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", Meeting); executionLog.Log("SaleAgent2", "Enter Start date"); officeActivities_MeetingHelper.TypeText("StartDate", "07/07/2017"); //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Enter End date"); officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2017"); executionLog.Log("SaleAgent2", "Select Client"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click Assigned To"); officeActivities_MeetingHelper.ClickElement("AssignedOwner"); //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click on find list icon."); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Click on client"); officeActivities_MeetingHelper.ClickElement("SelectClient"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click on Save"); officeActivities_MeetingHelper.Click("//button[@title='Save']"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Verify"); officeTickets_CreateTicketsHelper.WaitForText("Meeting saved successfully. ", 10); executionLog.Log("SaleAgent2", "Redirect to meeting"); VisitOffice("meetings"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Search Meeting"); officeActivities_MeetingHelper.TypeText("SearchSubject", Meeting); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Click Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("SaleAgent2", "Click Save"); officeActivities_MeetingHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("SaleAgent2", "Wait for success message."); officeActivities_MeetingHelper.WaitForText("Meeting updated successfully", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("SaleAgent2"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("SaleAgent2"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("SaleAgent2", "Bug", "Medium", "SaleA gent1", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("SaleAgent2"); TakeScreenshot("SaleAgent2"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Iframe.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("SaleAgent2"); string id = loginHelper.getIssueID("SaleAgent2"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\SaleAgent2.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("SaleAgent2"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("SaleAgent2"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("SaleAgent2"); executionLog.WriteInExcel("SaleAgent2", Status, JIRA, "Sale Agent Activities"); } }
public void documentForMeetingReplaceInvalidFile() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); var officeActivities_DocumentHelper = new OfficeActivities_DocumentHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("DocumentUpdateVersion", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("DocumentUpdateVersion", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Go to meetings page"); VisitOffice("meetings"); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click On Meeting In Activity"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click On Add Document Btn"); officeActivities_MeetingHelper.ClickElement("ClickOnAddDocumentBtn"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Enter Doc Name"); var DocName = "Test Valid Doc" + GetRandomNumber(); officeActivities_MeetingHelper.TypeText("EnterDocumentName", DocName); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Upload Invalid file(exe)"); var InvalidFile = GetPathToFile() + "chrome.exe"; officeActivities_MeetingHelper.Upload("BrowseDoc", InvalidFile); officeActivities_MeetingHelper.WaitForWorkAround(5000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Replace with valid file(jpg)"); var ValidFile = GetPathToFile() + "Up.jpg"; officeActivities_MeetingHelper.Upload("BrowserDoc1", ValidFile); officeActivities_MeetingHelper.WaitForWorkAround(5000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click Save Of Doc Pop Up"); officeActivities_MeetingHelper.ClickElement("ClickSaveOfDocPopUp"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Verify Confirmation"); officeActivities_MeetingHelper.WaitForText("Documents successfully Added.", 10); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Redirect To Document Section Activities"); VisitOffice("documents"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Search Document"); officeActivities_MeetingHelper.TypeText("SearchSubject", DocName); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Select All in owner field"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Verify Added Document Present"); officeActivities_MeetingHelper.VerifyText("DoucumentFirstInList", DocName); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Search Document"); officeActivities_DocumentHelper.TypeText("SearchDocumet", DocName); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Select document"); officeActivities_DocumentHelper.ClickElement("CheckDocToDel"); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click on delete."); officeActivities_DocumentHelper.ClickElement("ClickOndelete"); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Accept alert message."); officeActivities_DocumentHelper.AcceptAlert(); executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Wait for success message."); officeActivities_DocumentHelper.WaitForText("Document deleted successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("DocumentForMeetingReplaceInvalidFile"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Document For Meeting Replace InvalidFile"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("DocumentForMeetingReplaceInvalidFile", "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("Document For Meeting Replace InvalidFile"); TakeScreenshot("DocumentForMeetingReplaceInvalidFile"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DocumentForMeetingReplaceInvalidFile.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("DocumentForMeetingReplaceInvalidFile"); string id = loginHelper.getIssueID("Document For Meeting Replace InvalidFile"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DocumentForMeetingReplaceInvalidFile.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Document For Meeting Replace InvalidFile"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Document For Meeting Replace InvalidFile"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("DocumentForMeetingReplaceInvalidFile"); executionLog.WriteInExcel("Document For Meeting Replace InvalidFile", Status, JIRA, "Office Activities"); } }
public void verifyQuickLookLabelsForMeetings() { 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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var name = "Meeting" + RandomNumber(99, 9999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyQuickLookLabelsForMeetings", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify Page title"); VerifyTitle("Dashboard"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Go to create meetings page"); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify page title."); VerifyTitle("Create a Meeting"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("NameError", "This field is required."); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required."); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required."); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter Subject for the meeting"); officeActivities_MeetingHelper.TypeText("Subject", name); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter location of meeting."); officeActivities_MeetingHelper.TypeText("Location", "Test Location"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter start date."); officeActivities_MeetingHelper.TypeText("StartDate", "09/09/2016"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2016"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select Related To"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on client for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button"); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time."); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "07/07/2016"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2016"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for success text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter meeting name to search."); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on any meeting ."); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting status."); officeActivities_MeetingHelper.VerifyText("VerifyStatus", "Held"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting priority."); officeActivities_MeetingHelper.VerifyText("VerifyPriority", "Medium"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting category."); officeActivities_MeetingHelper.VerifyText("VerifyCategory", "Select Category"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting responsibility."); officeActivities_MeetingHelper.VerifyText("VerifyResponsibility", "Howard Tang"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on edit button."); officeActivities_MeetingHelper.ClickElement("EditLink"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact type."); officeActivities_MeetingHelper.SelectByText("Status", "New"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact Status."); officeActivities_MeetingHelper.SelectByText("Priority", "High"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact source."); officeActivities_MeetingHelper.SelectByText("SelectCategory", "Personal"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact category."); officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on save button."); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter meeting name to search."); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on any meeting ."); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting status."); officeActivities_MeetingHelper.VerifyText("VerifyStatus", "New"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting priority."); officeActivities_MeetingHelper.VerifyText("VerifyPriority", "High"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting category."); officeActivities_MeetingHelper.VerifyText("VerifyCategory", "Personal"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting responsibility."); officeActivities_MeetingHelper.VerifyText("VerifyResponsibility", "Howard Tang"); //officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Cance meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify page title"); VerifyTitle("Recycled Meeting"); //officeActivities_MeetingHelper.WaitForWorkAround(4000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); //executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for delete icon to be present."); //officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); // officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyQuickLookLabelsForMeetings"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyQuickLookLabelsForMeetings"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyQuickLookLabelsForMeetings", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings"); TakeScreenshot("VerifyQuickLookLabelsForMeetings"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyQuickLookLabelsForMeetings"); string id = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyQuickLookLabelsForMeetings"); executionLog.WriteInExcel("VerifyQuickLookLabelsForMeetings", Status, JIRA, "Activities Management"); } }
public void meetingValidationForGreaterStartDate() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("MeetingValidationForGreaterStartDate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MeetingValidationForGreaterStartDate", "Click on Activities >> Meetings"); VisitOffice("meetings/create"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("Subject", "Test Subject"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("StartDate", "2015-12-25"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("EndDate", "2015-12-09"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("SelectClient"); executionLog.Log("OpportunityGroupWithBlankName", "Wait for locator to be present."); officeActivities_MeetingHelper.WaitForElementPresent("Save", 10); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MeetingValidationForGreaterStartDate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Meeting Validation For Greater Start Date"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Meeting Validation For Greater Start Date", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); TakeScreenshot("MeetingValidationForGreaterStartDate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingValidationForGreaterStartDate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MeetingValidationForGreaterStartDate"); string id = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingValidationForGreaterStartDate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Meeting Validation For Greater Start Date"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MeetingValidationForGreaterStartDate"); executionLog.WriteInExcel("Meeting Validation For Greater Start Date", Status, JIRA, "Office Activities"); } }
public void editNewMeeting() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var name = "Subject" + RandomNumber(1, 9999); var EditName = "EditSubject" + RandomNumber(1, 500); var email = "Test" + GetRandomNumber() + "@gmail.com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditNewMeeting", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditNewMeeting", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditNewMeeting", " Go to meeting"); VisitOffice("meetings/create"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Verify title"); VerifyTitle("Create a Meeting"); executionLog.Log("EditNewMeeting", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", name); Console.WriteLine("name is " + name); executionLog.Log("EditNewMeeting", "Enter Meeting location"); officeActivities_MeetingHelper.TypeText("Location", "Test Meeting"); executionLog.Log("EditNewMeeting", "Select Priority"); officeActivities_MeetingHelper.Select("Priority", "Low"); executionLog.Log("EditNewMeeting", "select Module"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); executionLog.Log("EditNewMeeting", "Click on Assing"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Select a client"); officeActivities_MeetingHelper.ClickElement("SelectedClient"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "07/07/2018"); executionLog.Log("EditNewMeeting", "Enter Due date"); officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2018"); executionLog.Log("EditNewMeeting", "cLICK on Save "); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Wait for text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); executionLog.Log("EditNewMeeting", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Verify title"); VerifyTitle("Meetings"); executionLog.Log("EditNewMeeting", "Enter Subject in Search field"); officeActivities_MeetingHelper.TypeText("SearchSubject", name); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Select all in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Click on Edit"); officeActivities_MeetingHelper.ClickElement("Edit"); VerifyTitle("Edit Meeting"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Enter Subject"); officeActivities_MeetingHelper.TypeText("Subject", EditName); executionLog.Log("EditNewMeeting", "Edit Start Date"); officeActivities_MeetingHelper.TypeText("EndDate", "09/09/2018"); executionLog.Log("EditNewMeeting", "Click On Save Btn"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", EditName); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Select all in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Click On Cancel meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("EditNewMeeting", "Verify page title"); VerifyTitle("Recycled Meeting"); executionLog.Log("EditNewMeeting", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", EditName); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Select all in owner field"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("EditNewMeeting", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("EditNewMeeting", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("EditNewMeeting", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("EditNewMeeting", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditNewMeeting"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit New Meeting"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit New Meeting", "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("Edit New Meeting"); TakeScreenshot("EditNewMeeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNewMeeting.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditNewMeeting"); string id = loginHelper.getIssueID("Edit New Meeting"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditNewMeeting.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit New Meeting"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit New Meeting"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditNewMeeting"); executionLog.WriteInExcel("Edit New Meeting", Status, JIRA, "Tasks and Meetings"); } }
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 meetingDateValidation() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("MeetingDateValidation", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MeetingDateValidation", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MeetingDateValidation", "Click to open client info"); VisitOffice("meetings/create"); executionLog.Log("MeetingDateValidation", "Verify page title."); VerifyTitle("Create a Meeting"); executionLog.Log("MeetingDateValidation", "Enter Subject for the meeting"); officeActivities_MeetingHelper.TypeText("Subject", "TESTING MEETING SUBJECT"); executionLog.Log("MeetingDateValidation", "Enter location for the meeting"); officeActivities_MeetingHelper.TypeText("Location", "TESTING MEETING LOCATION"); executionLog.Log("MeetingDateValidation", "Enter start date in the date field"); officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-28"); executionLog.Log("MeetingDateValidation", "Enter End Date"); officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-10"); executionLog.Log("MeetingDateValidation", "Select Related To"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("MeetingDateValidation", "Click On Assigned To"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("MeetingDateValidation", "Click on Client You Want To Invite"); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("MeetingDateValidation", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("MeetingDateValidation", "verify validation message."); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time"); officeActivities_MeetingHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MeetingDateValidation"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Meeting Date Validation"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("MeetingDateValidation", "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("Meeting Date Validation"); TakeScreenshot("MeetingDateValidation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingDateValidation.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MeetingDateValidation"); string id = loginHelper.getIssueID("Meeting Date Validation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingDateValidation.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Meeting Date Validation"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Meeting Date Validation"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MeetingDateValidation"); executionLog.WriteInExcel("Meeting Date Validation", Status, JIRA, "Office Activities"); } }
public void activitiesBulkUpdateMeetings() { 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_MeetingHelper = new OfficeActivities_MeetingHelper(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()); // Random Variables. var Subject1 = "Meeting2" + RandomNumber(1, 99); var Subject = "Meeting" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesBulkUpdateMeetings", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to create meetings page"); VisitOffice("meetings/create"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Create a Meeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("NameError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter Subject for the meeting"); officeActivities_MeetingHelper.TypeText("Subject", Subject); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter location of meeting."); officeActivities_MeetingHelper.TypeText("Location", "Test Location"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date."); officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-28"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Related To"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on client for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting status"); officeActivities_MeetingHelper.Select("Status", "Planned"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting priority."); officeActivities_MeetingHelper.Select("Priority", "Low"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned owner for meeting."); officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned user group for meeting."); officeActivities_MeetingHelper.Select("AssignedUserGroup", "81"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for dates."); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert by clicking ok."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-24"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "verify page text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to create meetings page"); VisitOffice("meetings/create"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Create a Meeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("NameError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness."); officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter Subject for the meeting"); officeActivities_MeetingHelper.TypeText("Subject", Subject1); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter location of meeting."); officeActivities_MeetingHelper.TypeText("Location", "Test Location"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date."); officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-28"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Related To"); officeActivities_MeetingHelper.Select("RelatedTo", "20"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On find list icon"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on client for which meeting is created."); officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(1000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select status as planned."); officeActivities_MeetingHelper.Select("Status", "Planned"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting priority."); officeActivities_MeetingHelper.Select("Priority", "Low"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned owner for meeting."); officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned user group for meeting."); officeActivities_MeetingHelper.Select("AssignedUserGroup", "81"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify alert text for dates."); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time."); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert by clicking ok."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date"); officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-24"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date."); officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text"); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page"); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Bulk Update."); officeActivities_MeetingHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On status"); officeActivities_MeetingHelper.ClickElement("UpDateStatus"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify alert for selecting records."); officeActivities_MeetingHelper.VerifyAlertText("Please select atleast one record to proceed"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting."); officeActivities_MeetingHelper.ClickElement("SelectCheckbox"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting."); officeActivities_MeetingHelper.ClickElement("SelectCheckbox2"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update."); officeActivities_MeetingHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on status."); officeActivities_MeetingHelper.ClickElement("UpDateStatus"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select status to be updated."); officeActivities_MeetingHelper.Select("ChangeStatus", "Held"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button."); officeActivities_MeetingHelper.ClickElement("UpdateButton"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting status updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page"); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting"); officeActivities_MeetingHelper.ClickElement("SelectCheckbox"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting."); officeActivities_MeetingHelper.ClickElement("SelectCheckbox2"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update."); officeActivities_MeetingHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on Owner."); officeActivities_MeetingHelper.ClickElement("ChangeOwner"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Owner to be updated."); officeActivities_MeetingHelper.SelectByText("ChangeResponsibility", "Brian Sales Agent"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button."); officeActivities_MeetingHelper.ClickElement("UpdateOwner"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting owner updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page"); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting"); officeActivities_MeetingHelper.ClickElement("SelectCheckbox"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting."); officeActivities_MeetingHelper.ClickElement("SelectCheckbox2"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update."); officeActivities_MeetingHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on User group."); officeActivities_MeetingHelper.ClickElement("ChangeUserGroup"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select user group to be updated."); officeActivities_MeetingHelper.Select("SelectUserGroup", "169"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button."); officeActivities_MeetingHelper.ClickElement("UpdateGroup"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting user group updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page"); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title."); VerifyTitle("Meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting"); officeActivities_MeetingHelper.ClickElement("SelectCheckbox"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting."); officeActivities_MeetingHelper.ClickElement("SelectCheckbox2"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update."); officeActivities_MeetingHelper.ClickElement("BulkUpdate"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on priority."); officeActivities_MeetingHelper.ClickElement("ChangePriority"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Select priority to be updated."); officeActivities_MeetingHelper.Select("SelectPriority", "High"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button."); officeActivities_MeetingHelper.ClickElement("UpdatePriority"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting priority updated successfully.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at meetings page."); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Cancel meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title"); VerifyTitle("Recycled Meeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at meetings page."); VisitOffice("meetings"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject1); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Cancel meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title"); VerifyTitle("Recycled Meeting"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject1); executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesBulkUpdateMeetings"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Bulk Update Meetings"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Bulk Update Meetings", "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("Activities Bulk Update Meetings"); TakeScreenshot("ActivitiesBulkUpdateMeetings"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesBulkUpdateMeetings.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesBulkUpdateMeetings"); string id = loginHelper.getIssueID("Activities Bulk Update Meetings"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesBulkUpdateMeetings.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Bulk Update Meetings"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Bulk Update Meetings"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesBulkUpdateMeetings"); executionLog.WriteInExcel("Activities Bulk Update Meetings", Status, JIRA, "Office Activities"); } }
public void leadsMeetingUrlChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); // Variable var Subject = "Meeting" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadsMeetingUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadsMeetingUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadsMeetingUrlChange", "Go to all Leads"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Click On Any Lead"); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsMeetingUrlChange", "Click On New Meeting"); office_LeadsHelper.ClickElement("AddMeeting"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Enter Meeting Subject"); officeActivities_MeetingHelper.TypeText("Subject", Subject); executionLog.Log("LeadsMeetingUrlChange", "Enter Start Date"); officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018"); executionLog.Log("LeadsMeetingUrlChange", "Enter Start Date"); officeActivities_MeetingHelper.TypeText("EndDate", "09/09/2018"); executionLog.Log("LeadsMeetingUrlChange", "Click Save"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("LeadsMeetingUrlChange", "Wait for success text."); officeActivities_MeetingHelper.WaitForText("Meeting saved successfully. ", 10); executionLog.Log("LeadsMeetingUrlChange", "Select Activity >> Meetings"); officeActivities_MeetingHelper.Select("SelectActivityType", "Meetings"); executionLog.Log("LeadsMeetingUrlChange", "Click On Document "); officeActivities_MeetingHelper.PressEnter("ClickMeeting1"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Change the url with the url number of another office"); VisitOffice("meetings/view/1"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Verify Validation"); officeActivities_MeetingHelper.WaitForText("You don't have privileges to view this Meeting.", 10); executionLog.Log("LeadsMeetingUrlChange", "Redirect at meetings page."); VisitOffice("meetings"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Search meeting by subject"); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Select All in owner field"); officeActivities_MeetingHelper.SelectByText("Owner", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("LeadsMeetingUrlChange", "Click on the meeting"); officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("LeadsMeetingUrlChange", "Click On Cance meeting."); officeActivities_MeetingHelper.ClickElement("CancelMeeting"); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("LeadsMeetingUrlChange", "Redirect at recycle bin."); VisitOffice("meetings/recyclebin"); officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Verify page title"); VerifyTitle("Recycled Meeting"); //officeActivities_MeetingHelper.WaitForWorkAround(3000); executionLog.Log("LeadsMeetingUrlChange", "Search meeting by name."); officeActivities_MeetingHelper.TypeText("SearchSubject", Subject); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("LeadsMeetingUrlChange", "Select All in owner field"); officeActivities_MeetingHelper.SelectByText("OwnerField", "All"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("LeadsMeetingUrlChange", "Wait for delete icon to be present."); officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10); executionLog.Log("LeadsMeetingUrlChange", "Click On delete icon"); officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently"); executionLog.Log("LeadsMeetingUrlChange", "Accept alert message."); officeActivities_MeetingHelper.AcceptAlert(); executionLog.Log("LeadsMeetingUrlChange", "Verify text."); officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadsMeetingUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Leads Meeting Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Leads Meeting Url Change", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Leads Meeting Url Change"); TakeScreenshot("LeadsMeetingUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsMeetingUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadsMeetingUrlChange"); string id = loginHelper.getIssueID("Leads Meeting Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsMeetingUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Leads Meeting Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Leads Meeting Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadsMeetingUrlChange"); executionLog.WriteInExcel("Leads Meeting Url Change", Status, JIRA, "Leads Meeting"); } }