public void opportunityToLeadConversionIssue() { 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_office"); 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("OpportunityToLeadConversionIssue", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("OpportunityToLeadConversionIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("OpportunityToLeadConversionIssue", "Create Opportunities"); VisitOffice("opportunities/create"); executionLog.Log("OpportunityToLeadConversionIssue", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunityToLeadConversionIssue", "Verify text on page."); office_OpportunitiesHelper.VerifyText("RequiredFieldsOpp", "This field is required."); executionLog.Log("OpportunityToLeadConversionIssue", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Oppname); executionLog.Log("OpportunityToLeadConversionIssue", "Enter Company DBA Name"); office_OpportunitiesHelper.TypeText("CompanyName", CDBA); executionLog.Log("OpportunityToLeadConversionIssue", "Select Opp Status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("OpportunityToLeadConversionIssue", "Select Opp Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("OpportunityToLeadConversionIssue", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunityToLeadConversionIssue", "Wait for success message"); office_OpportunitiesHelper.WaitForText("Opportunity saved successfully.", 10); executionLog.Log("OpportunityToLeadConversionIssue", "Click on convert."); office_OpportunitiesHelper.ClickElement("Convert"); executionLog.Log("OpportunityToLeadConversionIssue", "Click on radio button lead."); office_OpportunitiesHelper.ClickElement("LeadRadio"); executionLog.Log("OpportunityToLeadConversionIssue", "Click on save button."); office_OpportunitiesHelper.clickJS("SaveConfirm"); office_OpportunitiesHelper.WaitForWorkAround(5000); executionLog.Log("OpportunityToLeadConversionIssue", "Verify converted name present on lead page."); office_OpportunitiesHelper.VerifyName(Oppname); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunityToLeadConversionIssue", "Verify converted DBA name present on the page."); office_OpportunitiesHelper.VerifyCompName(CDBA); office_OpportunitiesHelper.WaitForWorkAround(4000); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("OpportunityToLeadConversionIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("OpportunityToLeadConversionIssue"); if (!result) { if (Int16.Parse(counter) < 9) { 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("OpportunityToLeadConversionIssue"); TakeScreenshot("OpportunityToLeadConversionIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunityToLeadConversionIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OpportunityToLeadConversionIssue"); string id = loginHelper.getIssueID("OpportunityToLeadConversionIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunityToLeadConversionIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("OpportunityToLeadConversionIssue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("OpportunityToLeadConversionIssue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OpportunityToLeadConversionIssue"); executionLog.WriteInExcel("OpportunityToLeadConversionIssue", Status, JIRA, "Opportunities management"); } }
public void verifyOpportunityToClientConversionDataBleed() { 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()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); 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("VerifyOpportunityToClientConversionDataBleed", "Login with valid credentials"); Login(username[0], password[0]); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Create Opportunities"); VisitOffice("opportunities/create"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Oppname); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Enter Company DBA Name"); office_OpportunitiesHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Select Opp Status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Select Opp Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on Save"); office_OpportunitiesHelper.clickJS("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on convert button"); office_OpportunitiesHelper.ClickElement("Convert"); office_OpportunitiesHelper.WaitForWorkAround(500); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on client radio button"); office_OpportunitiesHelper.ClickElement("ClientRadio"); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on No Recycle Bin"); office_OpportunitiesHelper.ClickElement("RecycleNo"); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on save button."); office_OpportunitiesHelper.clickJS("SaveConfirm"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on Company Details tab"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Verify Legal Name is blank"); Assert.AreEqual(office_ClientsHelper.getInputText("//input[@id='ClientDetailCompanyLegalName']"), ""); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Click on Merchant Numbers tab"); office_ClientsHelper.ClickElement("MerchantNumber"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityToClientConversionDataBleed", "Verify Merchant ID is blank"); Assert.AreEqual(office_ClientsHelper.getInputText("//input[@id='ClientDetailMerchID']"), ""); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyOpportunityToClientConversionDataBleed"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Opportunity To Client Conversion Data Bleed"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Opportunity To Client Conversion Data Bleed", "Bug", "Medium", "Terminals and Equipment tab", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Opportunity To Client Conversion Data Bleed"); TakeScreenshot("VerifyOpportunityToClientConversionDataBleed"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityToClientConversionDataBleed.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyOpportunityToClientConversionDataBleed"); string id = loginHelper.getIssueID("Verify Opportunity To Client Conversion Data Bleed"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityToClientConversionDataBleed.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Opportunity To Client Conversion Data Bleed"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Opportunity To Client Conversion Data Bleed"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyOpportunityToClientConversionDataBleed"); executionLog.WriteInExcel("Verify Opportunity To Client Conversion Data Bleed", Status, JIRA, "Office Opportunity"); } }
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"); } }