public void adminTicketsMDataTopicsCancel() { 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 tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AdminTicketsMDataTopicsCancel", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("AdminTicketsMDataTopicsCancel", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("AdminTicketsMDataTopicsCancel", "Redirect To Admin"); VisitOffice("admin"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("AdminTicketsMDataTopicsCancel", "Goto Resolution page"); VisitOffice("tickets/masterdata/resolution"); executionLog.Log("AdminTicketsMDataTopicsCancel", "Click On any resolution"); tickets_MasterDataHelper.ClickElement("ClicKOnIssueResolved"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("AdminTicketsMDataTopicsCancel", "Click Cancel button"); tickets_MasterDataHelper.ClickElement("Cancel"); tickets_MasterDataHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminTicketsMDataTopicsCancel"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Tickets MData Topics Cancel"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Tickets MData Topics Cancel", "Bug", "Medium", "Admin tickets", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Tickets MData Topics Cancel"); TakeScreenshot("AdminTicketsMDataTopicsCancel"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminTicketsMDataTopicsCancel.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminTicketsMDataTopicsCancel"); string id = loginHelper.getIssueID("Admin Tickets MData Topics Cancel"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminTicketsMDataTopicsCancel.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Tickets MData Topics Cancel"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Tickets MData Topics Cancel"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminTicketsMDataTopicsCancel"); executionLog.WriteInExcel("Admin Tickets MData Topics Cancel", Status, JIRA, "Admin tickets"); } }
public void createTopicTickets() { 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 tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Variable var name = "Topic" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("CreateTopicTickets", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CreateTopicTickets", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("CreateTopicTickets", "Redirect To Ticket"); VisitOffice("tickets/masterdata/topic"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateTopicTickets", "Verify title"); VerifyTitle("Master Data"); executionLog.Log("CreateTopicTickets", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateTopicTickets", "Verify title"); VerifyTitle("Create"); executionLog.Log("CreateTopicTickets", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", name); executionLog.Log("CreateTopicTickets", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("CreateTopicTickets", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("CreateTopicTickets", "Click on delete item."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("CreateTopicTickets", "Click on category to be deleted"); tickets_MasterDataHelper.DeleteCategory(name); //tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateTopicTickets", "Select value to be replace with"); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Other"); executionLog.Log("CreateTopicTickets", "Confirm delete by clicking save."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CreateTopicTickets"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Create Topic Tickets"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Create Topic Tickets", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Topic Tickets"); TakeScreenshot("CreateTopicTickets"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateTopicTickets.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CreateTopicTickets"); string id = loginHelper.getIssueID("Create Topic Tickets"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateTopicTickets.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Create Topic Tickets"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Create Topic Tickets"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CreateTopicTickets"); executionLog.WriteInExcel("Create Topic Tickets", Status, JIRA, "Ticket Admin"); } }
public void adminTicketStatusURLChange() { 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 tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AdminTicketStatusURLChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("AdminTicketStatusURLChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("AdminTicketStatusURLChange", "Goto Ticket >> Status"); VisitOffice("tickets/masterdata/topic"); executionLog.Log("AdminTicketStatusURLChange", "Click On any Ticket >> Master Data Status"); tickets_MasterDataHelper.ClickElement("ClickOnAyTicketCategory"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("AdminTicketStatusURLChange", "Change the url with the url number of another office"); VisitOffice("tickets/masterdata/edit/status/218"); tickets_MasterDataHelper.WaitForWorkAround(1000); executionLog.Log("AdminTicketStatusURLChange", "Verify Validation"); tickets_MasterDataHelper.WaitForText("You don't have privilege.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminTicketStatusURLChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Ticket Status URL Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Ticket Status URL Change", "Bug", "Medium", "Ticket status page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Ticket Status URL Change"); TakeScreenshot("AdminTicketStatusURLChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminTicketStatusURLChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminTicketStatusURLChange"); string id = loginHelper.getIssueID("Admin Ticket Status URL Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminTicketStatusURLChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Ticket Status URL Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Ticket Status URL Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminTicketStatusURLChange"); executionLog.WriteInExcel("Admin Ticket Status URL Change", Status, JIRA, "Admin Tickets"); } }
public void ticketTopicHeadingChangedToCreateIssue() { 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 tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Random Variables String JIRA = ""; String Status = "Pass"; try { executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/topic"); var loc = "//ul[@id='sortable']/li[1]/div[2]/a[text()='Topic98']"; if (tickets_MasterDataHelper.IsElementPresent(loc)) { executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Click on any ticket topic."); tickets_MasterDataHelper.ClickElement("OpenTicket2"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Enter topic name."); tickets_MasterDataHelper.TypeText("Name", "Topic98"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Click on save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Verify text for exisiting topic."); tickets_MasterDataHelper.VerifyText("TicketAlready_Validation", "Name Already Exists"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Verify text on page."); tickets_MasterDataHelper.VerifyPageText("Edit"); tickets_MasterDataHelper.WaitForWorkAround(2000); } else { executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Click on any ticket topic."); tickets_MasterDataHelper.ClickElement("OpenTicket"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Enter topic name."); tickets_MasterDataHelper.TypeText("Name", "Topic98"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Click on save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Verify text for exisiting topic."); tickets_MasterDataHelper.VerifyText("TicketAlready_Validation", "Name Already Exists"); executionLog.Log("TicketTopicHeadingChangedToCreateIssue", "Verify text on page."); tickets_MasterDataHelper.VerifyPageText("Edit"); tickets_MasterDataHelper.WaitForWorkAround(2000); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TicketTopicHeadingChangedToCreateIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Ticket Topic Heading Changed To Create Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Ticket Topic Heading Changed To Create Issue", "Bug", "Medium", "Ticket Topic page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Ticket Topic Heading Changed To Create Issue"); TakeScreenshot("TicketTopicHeadingChangedToCreateIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketTopicHeadingChangedToCreateIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TicketTopicHeadingChangedToCreateIssue"); string id = loginHelper.getIssueID("Ticket Topic Heading Changed To Create Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketTopicHeadingChangedToCreateIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Ticket Topic Heading Changed To Create Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Ticket Topic Heading Changed To Create Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TicketTopicHeadingChangedToCreateIssue"); executionLog.WriteInExcel("Ticket Topic Heading Changed To Create Issue", Status, JIRA, "Admin Tickets"); } }
public void verifyAdminTicketMasterDeleteConfirmation() { 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 tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Random variables var Ticket = "Ticket" + RandomNumber(111, 9999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/category"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on create button"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Enter topic name"); tickets_MasterDataHelper.TypeText("Name", Ticket); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for creation success text."); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on delete item button."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Select topic to be deleted."); tickets_MasterDataHelper.SelectByText("Select", Ticket); //tickets_MasterDataHelper.WaitForWorkAround(4000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "select value to be replaced."); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Billing"); //tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on save button and accept alert."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for item deletion text."); tickets_MasterDataHelper.VerifyPageText("Category deleted successfully."); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/topic"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on create button"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Enter topic name"); tickets_MasterDataHelper.TypeText("Name", Ticket); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for creation success text."); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on delete item button."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Select topic to be deleted."); tickets_MasterDataHelper.SelectByText("Select", Ticket); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "select value to be replaced."); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Test"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on save button and accept alert."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for itm deletion text."); tickets_MasterDataHelper.WaitForText("Topic deleted successfully.", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/status"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on create button"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Enter topic name"); tickets_MasterDataHelper.TypeText("Name", Ticket); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for creation success text."); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on delete item button."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Select topic to be deleted."); tickets_MasterDataHelper.SelectByText("Select", Ticket); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "select value to be replaced."); tickets_MasterDataHelper.SelectByText("ReplaceWith", "New"); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on save button and accept alert."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for itm deletion text."); tickets_MasterDataHelper.WaitForText("Status deleted successfully.", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/priority"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on create button"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Enter topic name"); tickets_MasterDataHelper.TypeText("Name", Ticket); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for creation success text."); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on delete item button."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Select topic to be deleted."); tickets_MasterDataHelper.SelectByText("Select", Ticket); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "select value to be replaced."); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Medium"); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on save button and accept alert."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for itm deletion text."); tickets_MasterDataHelper.WaitForText("Priority deleted successfully.", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Redirect at ticket topic page."); VisitOffice("tickets/masterdata/resolution"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on create button"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Enter topic name"); tickets_MasterDataHelper.TypeText("Name", Ticket); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Save button."); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for creation success text."); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on delete item button."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Select topic to be deleted."); tickets_MasterDataHelper.SelectByText("Select", Ticket); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "select value to be replaced."); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Resolved"); //tickets_MasterDataHelper.WaitForWorkAround(2000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on save button and accept alert."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Wait for itm deletion text."); tickets_MasterDataHelper.WaitForText("Resolution deleted successfully.", 10); executionLog.Log("VerifyAdminTicketMasterDeleteConfirmation", "Click on Cancel button."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyAdminTicketMasterDeleteConfirmation"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Admin Ticket Master Delete Confirmation"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Admin Ticket Master Delete Confirmation", "Bug", "Medium", "Ticket Admin page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); TakeScreenshot("VerifyAdminTicketMasterDeleteConfirmation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyAdminTicketMasterDeleteConfirmation.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyAdminTicketMasterDeleteConfirmation"); string id = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyAdminTicketMasterDeleteConfirmation.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyAdminTicketMasterDeleteConfirmation"); executionLog.WriteInExcel("Verify Admin Ticket Master Delete Confirmation", Status, JIRA, "Admin Tickets"); } }