public void adminEquipmentShippingCarrierURLChange() { 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 equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Goto User Equipments >> Shipping Carrier "); VisitOffice("shipping_carriers"); executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Click On any Shipping carrier"); equipment_ShippingCarrierHelper.ClickElement("OpenAnyShiping"); equipment_ShippingCarrierHelper.WaitForWorkAround(2000); executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Change the url with the url number of another office"); VisitOffice("manage_shipping_carriers/61"); equipment_ShippingCarrierHelper.WaitForWorkAround(1000); executionLog.Log("AdminEquipmentShippingCarrierURLChange", "Verify Validation"); equipment_ShippingCarrierHelper.VerifyPageText("The shipping carrier is does not exists."); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminEquipmentShippingCarrierURLChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Equipment Shipping Carrier URL Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Equipment Shipping Carrier URL Change", "Bug", "Medium", "Equipment Page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Equipment Shipping Carrier URL Change"); TakeScreenshot("AdminEquipmentShippingCarrierURLChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminEquipmentShippingCarrierURLChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminEquipmentShippingCarrierURLChange"); string id = loginHelper.getIssueID("Admin Equipment Shipping Carrier URL Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminEquipmentShippingCarrierURLChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Equipment Shipping Carrier URL Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Equipment Shipping Carrier URL Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminEquipmentShippingCarrierURLChange"); executionLog.WriteInExcel("Admin Equipment Shipping Carrier URL Change", Status, JIRA, "Office Equipment"); } }
public void verifyUserRedirectToShippingOnCancel() { 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"); String JIRA = ""; String Status = "Pass"; // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); // Variable String name = "Test" + RandomNumber(1, 99); String Id = "12345" + RandomNumber(1, 99); try { executionLog.Log("VerifyUserRedirectToShippingOnCancel", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyUserRedirectToShippingOnCancel", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyUserRedirectToShippingOnCancel", "Redirect at Admin page."); VisitOffice("admin"); executionLog.Log("VerifyUserRedirectToShippingOnCancel", "Redirect to manage shipping careers page."); VisitOffice("manage_shipping_carriers"); executionLog.Log("VerifyUserRedirectToShippingOnCancel", " Click On Cancel"); equipment_ShippingCarrierHelper.ClickElement("ClickCancelBtn"); equipment_ShippingCarrierHelper.WaitForWorkAround(3000); executionLog.Log("VerifyUserRedirectToShippingOnCancel", "Verify heading"); equipment_ShippingCarrierHelper.VerifyText("VerifyTextHedaing", "Shipping Carriers"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyUserRedirectToShippingOnCancel"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify User Redirect To Shipping On Cancel"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify User Redirect To Shipping On Cancel", "Bug", "Medium", "Shipping carriers page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify User Redirect To Shipping On Cancel"); TakeScreenshot("VerifyUserRedirectToShippingOnCancel"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyUserRedirectToShippingOnCancel.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyUserRedirectToShippingOnCancel"); string id = loginHelper.getIssueID("Verify User Redirect To Shipping On Cancel"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyUserRedirectToShippingOnCancel.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify User Redirect To Shipping On Cancel"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify User Redirect To Shipping On Cancel"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyUserRedirectToShippingOnCancel"); executionLog.WriteInExcel("Verify User Redirect To Shipping On Cancel", Status, JIRA, "Equipment Management"); } }
public void shippingFilterError() { string[] username = null; string[] password = null; string[] log = null; String JIRA = ""; String Status = "Pass"; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); // Initializing the event var Name = "TestShipping" + RandomNumber(10, 300); var Website = "https://www.shipping" + RandomNumber(10, 100) + ".com"; var Url = "https://www.shippingtrack" + RandomNumber(10, 100) + ".com"; try { executionLog.Log("ShippingFilterError", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ShippingFilterError", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ShippingFilterError", "Visit to create vendor page"); VisitOffice("shipping_carriers"); equipment_ShippingCarrierHelper.WaitForWorkAround(3000); executionLog.Log("ShippingFilterError", "Verify title"); VerifyTitle("Shipping Carriers"); var loc = "//table[@id='list1']/tbody/tr[2]/td[2]"; if (equipment_ShippingCarrierHelper.IsElementPresent(loc)) { equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("ShippingFilterError", "Verify filter is reset successfully"); equipment_ShippingCarrierHelper.verifyElementPresent("NonFilter"); } else { executionLog.Log("ShippingFilterError", "Click on create"); equipment_ShippingCarrierHelper.ClickElement("Create"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("ShippingFilterError", "Enter the name"); equipment_ShippingCarrierHelper.TypeText("Name", Name); executionLog.Log("ShippingFilterError", "Enter the website url"); equipment_ShippingCarrierHelper.TypeText("Website", Website); executionLog.Log("ShippingFilterError", "Enter the tracking url"); equipment_ShippingCarrierHelper.TypeText("TrackingURL", Url); executionLog.Log("ShippingFilterError", "Click on save button"); equipment_ShippingCarrierHelper.ClickElement("Save"); equipment_ShippingCarrierHelper.WaitForWorkAround(6000); executionLog.Log("ShippingFilterError", "verify title"); VerifyTitle("Shipping Carriers"); executionLog.Log("ShippingFilterError", "Verify filter is reset successfully"); equipment_ShippingCarrierHelper.verifyElementPresent("NonFilter"); executionLog.Log("ShippingFilterError", "Log out from the application"); VisitOffice("logout"); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ShippingFilterError"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Shipping Filter Error"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Shipping Filter Error", "Bug", "Medium", "Equipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Shipping Filter Error"); TakeScreenshot("ShippingFilterError"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ShippingFilterError.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ShippingFilterError"); string id = loginHelper.getIssueID("Shipping Filter Error"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ShippingFilterError.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Shipping Filter Error"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Shipping Filter Error"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ShippingFilterError"); executionLog.WriteInExcel("Shipping Filter Error", Status, JIRA, "Equipment Management"); } }
public void equipmentShippingValidationDublicate() { 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 equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); // Variable String name = "Test" + GetRandomNumber(); String Id = "12345" + GetRandomNumber(); 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("EquipmentShippingValidationDublicate", "Visit office Admin"); VisitOffice("admin"); equipment_ShippingCarrierHelper.WaitForWorkAround(2000); executionLog.Log("EquipmentShippingValidationDublicate", "Redirect To shipping carrier page"); VisitOffice("shipping_carriers"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Verify title"); VerifyTitle("Shipping Carriers"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Search shipping carrier."); equipment_ShippingCarrierHelper.TypeText("SearchName", "Shipping Validation"); equipment_ShippingCarrierHelper.WaitForWorkAround(3000); executionLog.Log("EquipmentShippingValidationDublicate", "Wait for element to present."); equipment_ShippingCarrierHelper.WaitForElementPresent("ClickOnShippingCarriersLink", 10); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); var Loc = "//table[@id='list1']/tbody/tr[2]/td[3]/a[text()='Shipping Validation']"; if (equipment_ShippingCarrierHelper.IsElementPresent(Loc)) { executionLog.Log("EquipmentShippingValidationDublicate", "Click On Create Shipping"); equipment_ShippingCarrierHelper.ClickElement("ClickOnCreateShipping"); equipment_ShippingCarrierHelper.WaitForWorkAround(1000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Shipping Carrier Name"); equipment_ShippingCarrierHelper.TypeText("Name", "Shipping Validation"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Tracking URL"); equipment_ShippingCarrierHelper.TypeText("TrackingURL", "https://www.mypegasuscrm.com"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Click On Save Btn Shiping"); equipment_ShippingCarrierHelper.ClickElement("Save"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Wait for validation message."); equipment_ShippingCarrierHelper.WaitForText("The shipping carrier is already exists.", 30); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); } else { executionLog.Log("EquipmentShippingValidationDublicate", "Click On Create Shipping"); equipment_ShippingCarrierHelper.ClickElement("ClickOnCreateShipping"); equipment_ShippingCarrierHelper.WaitForWorkAround(3000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Shipping Carrier Name"); equipment_ShippingCarrierHelper.TypeText("Name", "Shipping Validation"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Tracking URL"); equipment_ShippingCarrierHelper.TypeText("TrackingURL", "https://www.mypegasuscrm.com"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Click On Save Btn Shiping"); equipment_ShippingCarrierHelper.ClickElement("Save"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Wait for success message."); equipment_ShippingCarrierHelper.WaitForText("The shipping carrier is successfully created", 30); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Click On Create Shipping"); equipment_ShippingCarrierHelper.ClickElement("ClickOnCreateShipping"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Shipping Carrier Name"); equipment_ShippingCarrierHelper.TypeText("Name", "Shipping Validation"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Enter Tracking URL"); equipment_ShippingCarrierHelper.TypeText("EnterTrackingURL", "https://www.mypegasuscrm.com"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Click On Save Btn Shiping"); equipment_ShippingCarrierHelper.ClickElement("Save"); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EquipmentShippingValidationDublicate", "Wait for validation message."); equipment_ShippingCarrierHelper.WaitForText("The shipping carrier is already exists.", 30); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EquipmentShippingValidationDublicate"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Equipment Shipping Validation Dublicate"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Equipment Shipping Validation Dublicate", "Bug", "Medium", "Equipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Equipment Shipping Validation Dublicate"); TakeScreenshot("EquipmentShippingValidationDublicate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EquipmentShippingValidationDublicate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EquipmentShippingValidationDublicate"); string id = loginHelper.getIssueID("Equipment Shipping Validation Dublicate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EquipmentShippingValidationDublicate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Equipment Shipping Validation Dublicate"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Equipment Shipping Validation Dublicate"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EquipmentShippingValidationDublicate"); executionLog.WriteInExcel("Equipment Shipping Validation Dublicate", Status, JIRA, "Admin Equipments"); } }
public void editShippingCarriers() { 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 equipment_ShippingCarrierHelper = new Equipment_ShippingCarrierHelper(GetWebDriver()); // Variable var name = "Test" + GetRandomNumber(); var URL = "https://www.Test" + GetRandomNumber() + ".com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditShippingCarriers", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditShippingCarriers", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditShippingCarriers", "Click On Admin"); VisitOffice("admin"); executionLog.Log("EditShippingCarriers", "Redirect To Shipping page"); VisitOffice("shipping_carriers"); executionLog.Log("EditShippingCarriers", "Verify title"); VerifyTitle("Shipping Carriers"); executionLog.Log("EditShippingCarriers", " Click On Create"); equipment_ShippingCarrierHelper.ClickElement("Create"); executionLog.Log("EditShippingCarriers", "Verify title"); VerifyTitle("Manage Shipping Carrier"); executionLog.Log("EditShippingCarriers", "Enter Name"); equipment_ShippingCarrierHelper.TypeText("Name", name); executionLog.Log("EditShippingCarriers", "Enter Type"); equipment_ShippingCarrierHelper.TypeText("Website", "http://www.test.com"); executionLog.Log("EditShippingCarriers", "Enter EquipmentId"); equipment_ShippingCarrierHelper.TypeText("TrackingURL", URL); executionLog.Log("EditShippingCarriers", " Click on Save button "); equipment_ShippingCarrierHelper.ClickElement("Save"); executionLog.Log("EditShippingCarriers", "wait for text"); equipment_ShippingCarrierHelper.WaitForText("The shipping carrier is successfully created", 30); executionLog.Log("EditShippingCarriers", "Redirect To URL"); VisitOffice("shipping_carriers"); executionLog.Log("EditShippingCarriers", "Verify title"); VerifyTitle("Shipping Carriers"); executionLog.Log("EditShippingCarriers", "Enter Shipping Carrier name in search field"); equipment_ShippingCarrierHelper.TypeText("SearchName", name); equipment_ShippingCarrierHelper.WaitForWorkAround(4000); executionLog.Log("EditShippingCarriers", "Click on Edit "); equipment_ShippingCarrierHelper.ClickElement("Edit"); executionLog.Log("EditShippingCarriers", "Verify title"); VerifyTitle("Manage Shipping Carrier"); executionLog.Log("EditShippingCarriers", "Enter Name"); equipment_ShippingCarrierHelper.TypeText("Name", name + "1"); executionLog.Log("EditShippingCarriers", "Enter Type"); equipment_ShippingCarrierHelper.TypeText("Website", "http://www.test.com"); executionLog.Log("EditShippingCarriers", "Enter EquipmentId"); equipment_ShippingCarrierHelper.TypeText("TrackingURL", URL); executionLog.Log("EditShippingCarriers", " Click on Save button "); equipment_ShippingCarrierHelper.ClickElement("Save"); executionLog.Log("EditShippingCarriers", "wait for text"); equipment_ShippingCarrierHelper.WaitForText("The shipping carrier is successfully updated", 30); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditShippingCarriers"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Shipping Carriers"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Shipping Carriers", "Bug", "Medium", "Shipping page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Edit Shipping Carriers"); TakeScreenshot("EditShippingCarriers"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditShippingCarriers.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditShippingCarriers"); string id = loginHelper.getIssueID("Edit Shipping Carriers"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditShippingCarriers.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Shipping Carriers"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Shipping Carriers"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditShippingCarriers"); executionLog.WriteInExcel("Edit Shipping Carriers", Status, JIRA, "Equipment Management"); } }