public void opportunityPostalCodeIssue() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Oppname = "Test" + RandomNumber(99, 99999); var CDBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("OpportunityPostalCodeIssue", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("OpportunityPostalCodeIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("OpportunityPostalCodeIssue", "Create Opportunities"); VisitOffice("opportunities/create"); executionLog.Log("OpportunityPostalCodeIssue", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunityPostalCodeIssue", "Verify text on page."); office_OpportunitiesHelper.VerifyText("RequiredFieldsOpp", "This field is required."); executionLog.Log("OpportunityPostalCodeIssue", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Oppname); executionLog.Log("OpportunityPostalCodeIssue", "Enter Company DBA Name"); office_OpportunitiesHelper.TypeText("CompanyName", CDBA); executionLog.Log("OpportunityPostalCodeIssue", "Select Opp Status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("OpportunityPostalCodeIssue", "Select Opp Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("OpportunityPostalCodeIssue", "ENter Zip Code"); office_OpportunitiesHelper.TypeText("ZipCode", "60601"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunityPostalCodeIssue", "Enter address line1"); office_OpportunitiesHelper.TypeText("AddressLine1Opp", "Test"); executionLog.Log("OpportunityPostalCodeIssue", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunityPostalCodeIssue", "Wait for success message"); office_OpportunitiesHelper.WaitForText("Opportunity saved successfully.", 10); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunityPostalCodeIssue", "Wait for success message"); office_OpportunitiesHelper.VerifyPageText("60601"); office_OpportunitiesHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("OpportunityPostalCodeIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("OpportunityPostalCodeIssue"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities", "Bug", "Medium", "Opportunity page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("OpportunityPostalCodeIssue"); TakeScreenshot("OpportunityPostalCodeIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunityPostalCodeIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OpportunityPostalCodeIssue"); string id = loginHelper.getIssueID("OpportunityPostalCodeIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunityPostalCodeIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("OpportunityPostalCodeIssue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("OpportunityPostalCodeIssue"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OpportunityPostalCodeIssue"); executionLog.WriteInExcel("OpportunityPostalCodeIssue", Status, JIRA, "Opportunity management"); } }
public void profileViewOfClientLeadAndOpportunities() { 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_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); // VARIABLE var name = "TestEmployee" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Clients"); VisitOffice("clients"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any client."); office_ClientsHelper.ClickElement("ClickOnAnyClient"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify View text on page"); office_ClientsHelper.VerifyPageText("View"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Leads"); VisitOffice("leads"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify view text on page"); office_LeadsHelper.VerifyPageText("View"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", " Redirect To Opportunities page."); VisitOffice("opportunities"); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Click on any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ProfileViewOfClientLeadAndOpportunities", "Verify view text present on page."); office_OpportunitiesHelper.VerifyPageText("View"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ProfileViewOfClientLeadAndOpportunities"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Profile View Of Client Lead And Opportunities"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Profile View Of Client Lead And Opportunities", "Bug", "Medium", "CLient/Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); TakeScreenshot("ProfileViewOfClientLeadAndOpportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProfileViewOfClientLeadAndOpportunities.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ProfileViewOfClientLeadAndOpportunities"); string id = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ProfileViewOfClientLeadAndOpportunities.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Profile View Of Client Lead And Opportunities"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ProfileViewOfClientLeadAndOpportunities"); executionLog.WriteInExcel("Profile View Of Client Lead And Opportunities", Status, JIRA, "Leads/Client Management"); } }
public void verifyIconAndLabelForOpportunities() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyIconAndLabelForOpportunities", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Visit opportunities page."); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title."); VerifyTitle("Opportunities"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify delete icon available."); office_OpportunitiesHelper.IsElementPresent("DeleteIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify delete label available."); office_OpportunitiesHelper.IsElementPresent("DeleteLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on delete button."); office_OpportunitiesHelper.ClickElement("DeleteLabel"); office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Decline alert message."); office_OpportunitiesHelper.DeclineAlert(); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify bulk update icon."); office_OpportunitiesHelper.IsElementPresent("BUlkUpdateIcon"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify bulk update label."); office_OpportunitiesHelper.IsElementPresent("BulkUpdateLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on bulk update button."); office_OpportunitiesHelper.clickJS("BUlkUpdateIcon"); office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on sales manager."); office_OpportunitiesHelper.ClickElement("ChangeSaleManager"); office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify alert text on the page."); office_OpportunitiesHelper.VerifyAlertText("Please select atleast one record to proceed."); executionLog.Log("VerifyIconAndLabelForOpportunities", "Accept alert message."); office_OpportunitiesHelper.AcceptAlert(); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify advance filter icon."); office_OpportunitiesHelper.IsElementPresent("AdvanceFilIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify advanced filter label."); office_OpportunitiesHelper.IsElementPresent("AdvancefiltLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page text."); office_OpportunitiesHelper.VerifyPageText("Tracking Fields"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify create opportunity icon."); office_OpportunitiesHelper.IsElementPresent("CreateIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify create opportunity label."); office_OpportunitiesHelper.IsElementPresent("CreateLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on create button."); office_OpportunitiesHelper.ClickElement("CreateLabel"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title as create opportunity."); VerifyTitle("Create an Opportunity"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Visit opportunitities page."); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title"); VerifyTitle("Opportunities"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify import icon present."); office_OpportunitiesHelper.IsElementPresent("ImportIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify import label present."); office_OpportunitiesHelper.IsElementPresent("ImportLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on import button."); office_OpportunitiesHelper.ClickElement("ImportLabel"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify browse button present on page."); office_OpportunitiesHelper.IsElementPresent("BrowseFile"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Visit opportunities page."); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title.."); VerifyTitle("Opportunities"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify merge icon present on page."); office_OpportunitiesHelper.IsElementPresent("MergeIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify merge label present on page."); office_OpportunitiesHelper.IsElementPresent("MergeLabel"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on merge button."); office_OpportunitiesHelper.ClickElement("MergeLabel"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify alert text on the page.."); office_OpportunitiesHelper.VerifyAlertText("Please select 2 or more opportunities you wish to merge"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Accept alert message."); office_OpportunitiesHelper.AcceptAlert(); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify export icon present on page."); office_OpportunitiesHelper.IsElementPresent("ExportIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on export button."); office_OpportunitiesHelper.clickJS("ExportIcon"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify export as csv present on page."); office_OpportunitiesHelper.IsElementPresent("ExportCsv"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify recycle bin icon on the page."); office_OpportunitiesHelper.IsElementPresent("RecycleIcon"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Click on recycle bin button."); office_OpportunitiesHelper.clickJS("RecycleIcon"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title as recycled opportunities."); VerifyTitle("Opportunities"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Visit opportunities page."); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify page title.."); VerifyTitle("Opportunities"); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify all opportunities button present on page."); office_OpportunitiesHelper.IsElementPresent("AllOpportunities"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify my opportunities button present on page."); office_OpportunitiesHelper.IsElementPresent("MyOpportunities"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify my team's opportunities button present on page."); office_OpportunitiesHelper.IsElementPresent("MyTeamOppor"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Verify my saved filters button present on page."); office_OpportunitiesHelper.IsElementPresent("MySavedFilters"); //office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyIconAndLabelForOpportunities", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyIconAndLabelForOpportunities"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Icon And Label For Opportunities"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Icon And Label For Opportunities", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Icon And Label For Opportunities"); TakeScreenshot("VerifyIconAndLabelForOpportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyIconAndLabelForOpportunities.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyIconAndLabelForOpportunities"); string id = loginHelper.getIssueID("Verify Icon And Label For Opportunities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyIconAndLabelForOpportunities.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Icon And Label For Opportunities"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Icon And Label For Opportunities"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyIconAndLabelForOpportunities"); executionLog.WriteInExcel("Verify Icon And Label For Opportunities", Status, JIRA, "Opportunities Management"); } }
public void partnerAgentCodeInQuickLook() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PartnerAgentCodeInQuickLook", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("PartnerAgentCodeInQuickLook", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PartnerAgentCodeInQuickLook", "Goto Opportinuties"); VisitOffice("opportunities"); executionLog.Log("PartnerAgentCodeInQuickLook", "Open Opportunity"); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_OpportunitiesHelper.WaitForWorkAround(5000); executionLog.Log("PartnerAgentCodeInQuickLook", "Edit Opportunity"); office_OpportunitiesHelper.clickJS("OppEdit"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("PartnerAgentCodeInQuickLook", "Enter Partner Agent Code."); office_OpportunitiesHelper.TypeText("PartnerAgentCode_Field", "233"); executionLog.Log("PartnerAgentCodeInQuickLook", "Select the status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("PartnerAgentCodeInQuickLook", "Click On Save Button"); office_OpportunitiesHelper.clickJS("ClickSaveClient"); office_OpportunitiesHelper.WaitForWorkAround(9000); executionLog.Log("PartnerAgentCodeInQuickLook", "Verify added code in Quick Look."); office_OpportunitiesHelper.VerifyPageText("223"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AmexRateCorp"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Amex Rate Corp"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Amex Rate Corp", "Bug", "Medium", "Amex page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Amex Rate Corp"); TakeScreenshot("AmexRateCorp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AmexRateCorp.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AmexRateCorp"); string id = loginHelper.getIssueID("Amex Rate Corp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AmexRateCorp.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Amex Rate Corp"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Amex Rate Corp"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AmexRateCorp"); executionLog.WriteInExcel("Amex Rate Corp", Status, JIRA, "Corp Master Data"); } }