public void verifyOpportunityStatusOfNoteUnderOpportunityHistory() { 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 officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Subject = "Testnote" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Login with valid credentials"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Go to All tickets page"); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Verify page title."); VerifyTitle("Opportunities"); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Click on an opportunity"); office_OpportunitiesHelper.ClickElement("Opportunities1"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Observe Status of opportunity"); var status = office_OpportunitiesHelper.GetText("//div[@id='status']"); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Click on Add Note button"); office_OpportunitiesHelper.ClickElement("AddNote"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Enter Subject of note"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Click on Save button"); officeActivities_NotesHelper.ClickForce("OpporSaveBtn"); office_OpportunitiesHelper.WaitForWorkAround(3000); office_OpportunitiesHelper.WaitForText("Note successfully Created.", 05); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Select Activity Type >> Notes"); office_OpportunitiesHelper.SelectByText("ActvtyType", "Notes"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Search Note by name"); office_OpportunitiesHelper.TypeText("ActivitySubject", Subject); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunityStatusOfNoteUnderOpportunityHistory", "Verify Opportunity Status is appearing"); office_OpportunitiesHelper.VerifyText("ActvtyStatus1", status); Console.WriteLine("Opportunity Status is appearing in front of note under Opportunity History "); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyOpportunityStatusOfNoteUnderOpportunityHistory"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Opportunity Status Of Note Under Opportunity History"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Opportunity Status Of Note Under Opportunity History", "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("Verify Opportunity Status Of Note Under Opportunity History"); TakeScreenshot("VerifyOpportunityStatusOfNoteUnderOpportunityHistory"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityStatusOfNoteUnderOpportunityHistory.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyOpportunityStatusOfNoteUnderOpportunityHistory"); string id = loginHelper.getIssueID("Verify Opportunity Status Of Note Under Opportunity History"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityStatusOfNoteUnderOpportunityHistory.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Opportunity Status Of Note Under Opportunity History"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Opportunity Status Of Note Under Opportunity History"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyOpportunityStatusOfNoteUnderOpportunityHistory"); executionLog.WriteInExcel("Verify Opportunity Status Of Note Under Opportunity History", Status, JIRA, "Office Opportunity"); } }
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 verifyOpportunitiesCreatedModifiedByCredits() { 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("VerifyOpportunitiesCreatedModifiedByCredits", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Create Opportunities"); VisitOffice("opportunities/create"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify text on page."); office_OpportunitiesHelper.VerifyText("RequiredFieldsOpp", "This field is required."); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Oppname); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Enter Company DBA Name"); office_OpportunitiesHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Select Opp Status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Select Opp Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(3000); var loc = "//h3[text()='Existing Opportunities']"; if (office_OpportunitiesHelper.IsElementPresent(loc)) { executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click Dublicate Button"); office_OpportunitiesHelper.ClickOnDisplayed("ClickOnDubBtn"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait for success message"); office_OpportunitiesHelper.WaitForText("Opportunity saved successfully.", 10); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity created by"); office_OpportunitiesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity modified by"); office_OpportunitiesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on edit button."); office_OpportunitiesHelper.ClickElement("EditLink"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on save button."); office_OpportunitiesHelper.ClickElement("SaveOpp"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity created by"); office_OpportunitiesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity modified by"); office_OpportunitiesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Redirect at Opportunities"); VisitOffice("VerifyOpportunitiesCreatedModifiedByCredits"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on 1st Opportunities"); office_OpportunitiesHelper.ClickElement("ClickOn1stOpp"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click On Merge Records"); office_OpportunitiesHelper.ClickElement("DeleteLink"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait for confirmation"); office_OpportunitiesHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Redirect at recyclebin Page."); VisitOffice("opportunities/recyclebin"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify page title."); VerifyTitle("Recycled Opportunities"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on delete icon."); office_OpportunitiesHelper.ClickElement("DeletePermanaently"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait For Confirmation"); office_OpportunitiesHelper.WaitForText("Opportunity permanently deleted.", 10); } else { executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait for success message"); office_OpportunitiesHelper.WaitForText("Opportunity saved successfully.", 10); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity created by"); office_OpportunitiesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity modified by"); office_OpportunitiesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on edit button."); office_OpportunitiesHelper.ClickElement("EditLink"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on save button."); office_OpportunitiesHelper.ClickElement("SaveOpp"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity created by"); office_OpportunitiesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify opportunity modified by"); office_OpportunitiesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Redirect at Opportunities"); VisitOffice("opportunities"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on 1st Opportunities"); office_OpportunitiesHelper.ClickElement("ClickOn1stOpp"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click On Merge Records"); office_OpportunitiesHelper.ClickElement("DeleteLink"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait for confirmation"); office_OpportunitiesHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Redirect at recyclebin Page."); VisitOffice("opportunities/recyclebin"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Verify page title."); VerifyTitle("Recycled Opportunities"); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Click on delete icon."); office_OpportunitiesHelper.ClickElement("DeletePermanaently"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyOpportunitiesCreatedModifiedByCredits", "Wait For Confirmation"); office_OpportunitiesHelper.WaitForText("Opportunity permanently deleted.", 10); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyOpportunitiesCreatedModifiedByCredits"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyOpportunitiesCreatedModifiedByCredits"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyOpportunitiesCreatedModifiedByCredits", "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("VerifyOpportunitiesCreatedModifiedByCredits"); TakeScreenshot("VerifyOpportunitiesCreatedModifiedByCredits"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Opportunities.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyOpportunitiesCreatedModifiedByCredits"); string id = loginHelper.getIssueID("VerifyOpportunitiesCreatedModifiedByCredits"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Opportunities.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyOpportunitiesCreatedModifiedByCredits"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyOpportunitiesCreatedModifiedByCredits"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyOpportunitiesCreatedModifiedByCredits"); executionLog.WriteInExcel("VerifyOpportunitiesCreatedModifiedByCredits", Status, JIRA, "Opportunity management"); } }
public void verifyQuickLookLabelsForOpportunity() { 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("VerifyQuickLookLabelsForOpportunity", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Create Opportunities"); VisitOffice("opportunities/create"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on Save"); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify text on page."); office_OpportunitiesHelper.VerifyText("RequiredFieldsOpp", "This field is required."); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Oppname); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Enter Company DBA Name"); office_OpportunitiesHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select Opp Status"); office_OpportunitiesHelper.SelectByText("State", "New"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select Opp Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on Save button."); office_OpportunitiesHelper.ClickElement("SaveOpp"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for client type."); office_OpportunitiesHelper.VerifyText("ClientType", "Select"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for status."); office_OpportunitiesHelper.VerifyText("Status", "New"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for source."); office_OpportunitiesHelper.VerifyText("Source", "Select Source"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for category."); office_OpportunitiesHelper.VerifyText("Category", "Select Category"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for responsibility."); office_OpportunitiesHelper.VerifyText("Responsibilityl", "Howard Tang"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for account manager."); office_OpportunitiesHelper.VerifyText("AccountManager", "Select Account Manager"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for partner agent."); office_OpportunitiesHelper.VerifyText("PartnerAgentl", "Select Partner Agent"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for partner association."); office_OpportunitiesHelper.VerifyText("PartnerAssociationl", "Select Partner Association"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify label for sales manager."); office_OpportunitiesHelper.VerifyText("SalesManager", "Select Sales Manager"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on edit opportunity."); office_OpportunitiesHelper.ClickElement("EditLink"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select client type."); office_OpportunitiesHelper.Select("Clientt", "Processing"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select refferal source."); office_OpportunitiesHelper.Select("RSource", "Campaign"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select category."); office_OpportunitiesHelper.SelectByText("Categ", "Single"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select account manager."); office_OpportunitiesHelper.SelectByText("AccntManager", "Howard Tang"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select user group."); office_OpportunitiesHelper.SelectByText("UGroup", "Primary Group"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select sales manager."); office_OpportunitiesHelper.SelectByText("SaleMgr", "Howard Tang"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select responsibility."); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select partner agent."); office_OpportunitiesHelper.SelectByText("PartnerAgent", "Mark Menu"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Select partner association."); office_OpportunitiesHelper.SelectByText("PartAssociation", "Aslam Associate"); //office_OpportunitiesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on Save button."); office_OpportunitiesHelper.ClickElement("ClickSaveClient"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify client type as processing."); office_OpportunitiesHelper.VerifyText("ClientType", "Processing"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify status as New"); office_OpportunitiesHelper.VerifyText("Status", "New"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify source as campaign"); office_OpportunitiesHelper.VerifyText("Source", "Campaign"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify category as Test1"); office_OpportunitiesHelper.VerifyText("Category", "Single"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify responsibility as Howard."); office_OpportunitiesHelper.VerifyText("Responsibilityl", "Howard Tang"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify account manager as Howard."); office_OpportunitiesHelper.VerifyText("AccountManager", "Howard Tang"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify partner agent as mark matthews."); office_OpportunitiesHelper.VerifyText("PartnerAgentl", "Mark Menu"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify partner association. "); office_OpportunitiesHelper.VerifyText("PartnerAssociationl", "Aslam Associate"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify sales manager as howard."); office_OpportunitiesHelper.VerifyText("SalesManager", "Howard Tang"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on delete."); office_OpportunitiesHelper.ClickElement("DeleteLink"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on Save"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Wait for success text."); office_OpportunitiesHelper.WaitForText("Opportunity deleted successfully.", 10); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Redirect at recyclebin page."); VisitOffice("opportunities/recyclebin"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Verify page title as recycled opportunities."); VerifyTitle("Recycled Opportunities"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Click on delete icon."); office_OpportunitiesHelper.ClickElement("DeletePermanaently"); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Accept alert message."); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("VerifyQuickLookLabelsForOpportunity", "Wait for success text."); office_OpportunitiesHelper.WaitForText("Opportunity permanently deleted.", 10); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyQuickLookLabelsForOpportunity"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyQuickLookLabelsForOpportunity"); 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("VerifyQuickLookLabelsForOpportunity"); TakeScreenshot("VerifyQuickLookLabelsForOpportunity"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyQuickLookLabelsForOpportunity.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyQuickLookLabelsForOpportunity"); string id = loginHelper.getIssueID("VerifyQuickLookLabelsForOpportunity"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyQuickLookLabelsForOpportunity.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyQuickLookLabelsForOpportunity"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyQuickLookLabelsForOpportunity"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyQuickLookLabelsForOpportunity"); executionLog.WriteInExcel("VerifyQuickLookLabelsForOpportunity", Status, JIRA, "Opportunity management"); } }
public void verifyOpportunitiesAdvanceFilerColumnOrder() { 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("VerifyOpportunitiesAdvanceFilerColumnOrder", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Redirect To URL"); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(5000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify page title."); VerifyTitle("Opportunities"); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify default position of company name column."); office_OpportunitiesHelper.IsElementPresent("HeadCompany"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify default position of contact column."); office_OpportunitiesHelper.IsElementPresent("HeadAmount"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify default position of phone column."); office_OpportunitiesHelper.IsElementPresent("HeadIndustry"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify default position of email column."); office_OpportunitiesHelper.IsElementPresent("HeadSource"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Select company in displayed columns."); office_OpportunitiesHelper.SelectByText("DisplayedCols", "Company"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols."); office_OpportunitiesHelper.ClickElement("RemoveCols"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Select contact in displayed columns."); office_OpportunitiesHelper.SelectByText("DisplayedCols", "Name"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_OpportunitiesHelper.ClickElement("RemoveCols"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Select phone in displayed columns."); office_OpportunitiesHelper.SelectByText("DisplayedCols", "Phone"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_OpportunitiesHelper.ClickElement("RemoveCols"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Select email in displayed columns."); office_OpportunitiesHelper.SelectByText("DisplayedCols", "E-Mail"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_OpportunitiesHelper.ClickElement("RemoveCols"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify company name not present on page."); office_OpportunitiesHelper.IsElementNotPresent("HeadCompany"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify contact name not present on page."); office_OpportunitiesHelper.IsElementNotPresent("HeadContact"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify phone not present on page."); office_OpportunitiesHelper.IsElementNotPresent("HeadPhone"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "Verify email not present on page."); office_OpportunitiesHelper.IsElementNotPresent("HeadEmail"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyOpportunitiesAdvanceFilerColumnOrder", "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("VerifyOpportunitiesAdvanceFilerColumnOrder"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Opportunities Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities Advance Filter ResultsPP", "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("Opportunities Advance Filter ResultsPP"); TakeScreenshot("VerifyOpportunitiesAdvanceFilerColumnOrder"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunitiesAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyOpportunitiesAdvanceFilerColumnOrder"); string id = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunitiesAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyOpportunitiesAdvanceFilerColumnOrder"); executionLog.WriteInExcel("Opportunities Advance Filter ResultsPP", Status, JIRA, "Opportunities Management"); } }
public void editOppStateIssue() { 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 var Name = "Test" + RandomNumber(1, 999); var Company = "Company" + RandomNumber(1, 9999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditOppStateIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditOppStateIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditOppStateIssue", "Redirect at create opportunities page."); VisitOffice("opportunities/create"); executionLog.Log("EditOppStateIssue", "Verify Page title"); VerifyTitle("Create an Opportunity"); executionLog.Log("EditOppStateIssue", "Enter Name"); office_OpportunitiesHelper.TypeText("Name", Name); executionLog.Log("EditOppStateIssue", "Enter Company Name"); office_OpportunitiesHelper.TypeText("CompanyName", Company); executionLog.Log("EditOppStateIssue", "Select Status"); office_OpportunitiesHelper.SelectByText("State", "Closed Dead"); executionLog.Log("EditOppStateIssue", "Select Responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("EditOppStateIssue", "Select Country"); office_OpportunitiesHelper.SelectByText("Country", "United States"); executionLog.Log("EditOppStateIssue", "Enter zipcode"); office_OpportunitiesHelper.TypeText("ZipCode", "60601"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("EditOppStateIssue", "Click on 'Copy address' button"); office_OpportunitiesHelper.ClickForce("SameAsLocation"); executionLog.Log("EditOppStateIssue", "Click on 'Save' button"); office_OpportunitiesHelper.ClickElement("SaveOpp"); executionLog.Log("EditOppStateIssue", "Verify opp saved successfully"); office_OpportunitiesHelper.WaitForText("Opportunity saved successfully.", 10); executionLog.Log("EditOppStateIssue", "Verify Page title"); VerifyTitle("Details"); executionLog.Log("EditOppStateIssue", "Click on 'Edit' button"); office_OpportunitiesHelper.ClickElement("OppEdit"); executionLog.Log("EditOppStateIssue", "Verify Page title"); VerifyTitle("Edit an Opportunity"); executionLog.Log("EditOppStateIssue", "Redirect at create opportunities page."); VisitOffice("opportunities"); executionLog.Log("EditOppStateIssue", "Verify Page title"); VerifyTitle("Opportunities"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("EditOppStateIssue", "Search company name"); office_OpportunitiesHelper.TypeText("SearchCompanyopp", Company); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("EditOppStateIssue", "Select All in responsibity tab"); office_OpportunitiesHelper.SelectByText("Responsibiltytab", "All"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("EditOppStateIssue", "Select first opportunity"); office_OpportunitiesHelper.ClickElement("ClickOn1stOpp"); executionLog.Log("EditOppStateIssue", "Click on delete button."); office_OpportunitiesHelper.ClickElement("DeleteOpp"); executionLog.Log("EditOppStateIssue", "Accept alert message"); office_OpportunitiesHelper.AcceptAlert(); executionLog.Log("EditOppStateIssue", "Wait for deleted success message."); office_OpportunitiesHelper.WaitForText("1 records deleted successfully", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditOppStateIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit Opp State Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit Opp State Issue", "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("Edit Opp State Issue"); TakeScreenshot("EditOppStateIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditOppStateIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditOppStateIssue"); string id = loginHelper.getIssueID("Edit Opp State Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditOppStateIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit Opp State Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit Opp State Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditOppStateIssue"); executionLog.WriteInExcel("Edit Opp State Issue", 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 verifyingOpportunityeAddresslabel() { 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 var Name = "Opportunity" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyingOpportunityeAddresslabel", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyingOpportunityeAddresslabel", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyingOpportunityeAddresslabel", "Redirect To URL"); VisitOffice("opportunities/create"); executionLog.Log("VerifyingOpportunityeAddresslabel", "Enter Opportunity Name"); office_OpportunitiesHelper.TypeText("Name", Name); executionLog.Log("VerifyingOpportunityeAddresslabel", "Enter Company Name"); office_OpportunitiesHelper.TypeText("CompanyName", Name); executionLog.Log("VerifyingOpportunityeAddresslabel", "Select Opportunity Status"); office_OpportunitiesHelper.Select("State", "New"); executionLog.Log("VerifyingOpportunityeAddresslabel", "Select Opportunity responsibility"); office_OpportunitiesHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyingOpportunityeAddresslabel", "Select eAddress Type"); office_OpportunitiesHelper.Select("EaddressType", "E-Mail"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyingOpportunityeAddresslabel", "Verify eAddress Label"); office_OpportunitiesHelper.VerifyText("EaddressLabel", "Home"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyingOpportunityeAddresslabel"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verifying Opportunity eAddress label"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verifying Opportunity eAddress label", "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("Verifying Opportunity eAddress label"); TakeScreenshot("VerifyingOpportunityeAddresslabel"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingOpportunityeAddresslabel.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyingOpportunityeAddresslabel"); string id = loginHelper.getIssueID("Verifying Opportunity eAddress label"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingOpportunityeAddresslabel.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verifying Opportunity eAddress label"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verifying Opportunity eAddress label"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyingOpportunityeAddresslabel"); executionLog.WriteInExcel("Verifying Opportunity eAddress label", Status, JIRA, "Opportunities Management"); } }
public void opportunitiesAdvanceFilterResultsPP() { 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 var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Redirect To URL"); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify page title."); VerifyTitle("Opportunities"); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 10."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "10"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(10); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 10 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 20."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "20"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(20); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 20 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 50."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "50"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(50); //office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 50 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 100."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "100"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(100); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 100 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "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("OpportunitiesAdvanceFilterResultsPP"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Opportunities Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities Advance Filter ResultsPP", "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("Opportunities Advance Filter ResultsPP"); TakeScreenshot("OpportunitiesAdvanceFilterResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OpportunitiesAdvanceFilterResultsPP"); string id = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OpportunitiesAdvanceFilterResultsPP"); executionLog.WriteInExcel("Opportunities Advance Filter ResultsPP", 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"); } }
public void activitiesNotesManagement() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); var ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver()); // Variable var name = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ActivitiesNotesManagement", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ActivitiesNotesManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ActivitiesNotesManagement", "Redirect at admin page."); VisitOffice("admin"); executionLog.Log("ActivitiesNotesManagement", "Go to notes page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", " Click On Create"); officeActivities_NotesHelper.ClickElement("Create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Create a New Note"); executionLog.Log("ActivitiesNotesManagement", "Click on Save "); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify validation text for subject."); officeActivities_NotesHelper.VerifyText("SubjectError", "This field is required."); executionLog.Log("ActivitiesNotesManagement", "Enter note subject."); officeActivities_NotesHelper.TypeText("Subject", name); executionLog.Log("ActivitiesNotesManagement", "Click on save."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Wait for success text"); officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent"); officeActivities_NotesHelper.Select("NoteParent", "20"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any client."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at clients page."); VisitOffice("clients"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click on any client."); office_ClientsHelper.ClickElement("Client1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes."); office_ClientsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search."); office_ClientsHelper.TypeText("ActivitySubject", name); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on client page."); office_ClientsHelper.IsElementPresent("OpenFirstActivity"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); officeActivities_NotesHelper.WaitForWorkAround(3000); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as lead."); officeActivities_NotesHelper.Select("NoteParent", "14"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on save button."); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at leads page."); VisitOffice("leads"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes."); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search."); office_LeadsHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_LeadsHelper.SelectByText("CreatedByField", "All"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on leads page."); office_LeadsHelper.IsElementPresent("ClickNotes1"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as opportunity."); officeActivities_NotesHelper.Select("NoteParent", "15"); executionLog.Log("ActivitiesNotesManagement", "Click on findlist icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn"); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at opportunities page."); VisitOffice("opportunities"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any opportunity."); office_OpportunitiesHelper.ClickElement("Opportunities1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes"); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter notes name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_OpportunitiesHelper.SelectByText("CreateByField", "All"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on opportunity page"); office_OpportunitiesHelper.IsElementPresent("OpenOpportunity"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify title"); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on Edit"); officeActivities_NotesHelper.ClickElement("Edit"); VerifyTitle("Edit Note"); executionLog.Log("ActivitiesNotesManagement", "Select note parent as tickets."); officeActivities_NotesHelper.Select("NoteParent", "36"); executionLog.Log("ActivitiesNotesManagement", "Click on find list icon."); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", " Click On any ticket."); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn"); officeActivities_NotesHelper.ClickElement("Save"); executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully"); officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect at tickets page."); VisitOffice("tickets"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Click On any ticket."); ticket_CreateATicketHelper.ClickElement("Ticket1"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes"); office_LeadsHelper.Select("SelectActivityType", "Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter ticket name to be search."); office_OpportunitiesHelper.TypeText("ActivitySubject", name); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); office_OpportunitiesHelper.SelectByText("CreateByField", "All"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Verify created note present on ticket page."); ticket_CreateATicketHelper.IsElementPresent("OpenTicket"); executionLog.Log("ActivitiesNotesManagement", "Go to note page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Verify page title."); VerifyTitle("Notes"); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select First Note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click Delete btn "); officeActivities_NotesHelper.ClickElement("DeleteNote"); executionLog.Log("ActivitiesNotesManagement", "Accept alert message. "); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("ActivitiesNotesManagement", "Wait for delete message. "); officeActivities_NotesHelper.WaitForText("Note deleted successfully", 10); executionLog.Log("ActivitiesNotesManagement", "Redirect to recycle bin"); VisitOffice("notes/recyclebin"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field"); officeActivities_NotesHelper.TypeText("EnterSubject", name); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Click on delete icon."); officeActivities_NotesHelper.ClickElement("DeleteNoteRBin"); //officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("ActivitiesNotesManagement", "Accept alert message."); officeActivities_NotesHelper.AcceptAlert(); //officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("ActivitiesNotesManagement", "Wait for success message."); officeActivities_NotesHelper.WaitForText("Note Permanently Deleted.", 5); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ActivitiesNotesManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Activities Notes Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Activities Notes Management", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Activities Notes Management"); TakeScreenshot("ActivitiesNotesManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesNotesManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ActivitiesNotesManagement"); string id = loginHelper.getIssueID("Activities Notes Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ActivitiesNotesManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Activities Notes Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Activities Notes Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ActivitiesNotesManagement"); executionLog.WriteInExcel("Activities Notes Management", Status, JIRA, "Office Activities"); } }