public void elabelAddressIssue() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ELabelAddressIssue", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("ELabelAddressIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ELabelAddressIssue", "Goto Merchant."); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ELabelAddressIssue", "Open First Merchant"); office_ClientsHelper.ClickElement("Open1stMerchant"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ELabelAddressIssue", "Click on Contact Tab."); office_ClientsHelper.ClickForce("ClickOnContactTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Click on Add Another Button."); office_ClientsHelper.ClickForce("AddAnotherContact"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Click on Add Another Button."); office_ClientsHelper.ClickForce("ContactTab2"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Select Address Type."); office_ClientsHelper.scrollToElement("eAddressType2"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.SelectByText("eAddressType2", "IM"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Verify eAddress Label"); office_ClientsHelper.verifyselectedOptn("eAddressLabelDrpDwn", "Google"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ELabelAddressIssue", "Select Address Type."); office_ClientsHelper.SelectByText("eAddressType2", "Social Media"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Verify eAddress Label"); office_ClientsHelper.verifyselectedOptn("eAddressLabelDrpDwn", "Facebook"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("ELabelAddressIssue", "Select Address Type."); office_ClientsHelper.SelectByText("eAddressType2", "Web Links"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ELabelAddressIssue", "Verify eAddress Label"); office_ClientsHelper.verifyselectedOptn("eAddressLabelDrpDwn", "Web Link"); office_ClientsHelper.WaitForWorkAround(1000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ELabelAddressIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("eLabel Address Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("eLabel Address Issue", "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("eLabel Address Issue"); TakeScreenshot("ELabelAddressIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ELabelAddressIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ELabelAddressIssue"); string id = loginHelper.getIssueID("eLabel Address Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ELabelAddressIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("eLabel Address Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("eLabel Address Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ELabelAddressIssue"); executionLog.WriteInExcel("eLabel Address Issue", Status, JIRA, "Corp Master Data"); } }
public void verifyDeletedTicketDisappearUnderMerchant() { 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_MerchantHelper = new Office_ClientsHelper(GetWebDriver()); var officeticketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 5000); var ticketname = "Testticket" + RandomNumber(1, 500); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to Create merchant page"); VisitOffice("clients/create"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Enter DBA name"); office_MerchantHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select the client status"); office_MerchantHelper.SelectByText("Status", "New"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "select the responsibity"); office_MerchantHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on save btn"); office_MerchantHelper.ClickElement("Save"); office_MerchantHelper.WaitForWorkAround(4000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click Create Ticket button"); office_MerchantHelper.ClickForce("CreateTicket"); office_MerchantHelper.WaitForWorkAround(1000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Enter Subject name"); officeticketsHelper.TypeText("TicketName", ticketname); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select Status"); officeticketsHelper.SelectByText("TickStatus", "New"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select Assigned To"); officeticketsHelper.SelectByText("Assignedto", "Howard Tang"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on save btn"); officeticketsHelper.ClickElement("Save1"); officeticketsHelper.WaitForWorkAround(4000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to All merchants page"); VisitOffice("clients"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search merchant by name"); office_MerchantHelper.TypeText("SearchClient", DBA); office_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on client"); office_MerchantHelper.ClickElement("Client1"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on created ticket"); office_MerchantHelper.ClickForce("Ticket1"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on Delete button"); officeticketsHelper.ClickElement("ClickDeleteBtn"); officeticketsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to All merchants page"); VisitOffice("clients"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search merchant by name"); office_MerchantHelper.TypeText("SearchClient", DBA); office_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on client"); office_MerchantHelper.ClickElement("Client1"); office_MerchantHelper.WaitForWorkAround(5000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Verify ticket disappeared"); office_MerchantHelper.VerifyText("NoTickets", "No Data Available."); Console.WriteLine("Deleted ticket disappeared"); office_MerchantHelper.WaitForWorkAround(1000); VisitOffice("clients"); office_MerchantHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search the company Name"); office_MerchantHelper.TypeText("SearchClient", DBA); office_MerchantHelper.WaitForWorkAround(2000); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on check box"); office_MerchantHelper.ClickElement("ClickOnCheckBox"); executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Delete the client"); office_MerchantHelper.ClickElement("DeleteClient"); office_MerchantHelper.AcceptAlert(); office_MerchantHelper.WaitForWorkAround(4000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyDeletedTicketDisappearUnderMerchant"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Deleted Ticket Disappear Under Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Deleted Ticket Disappear Under Merchant", "Bug", "Medium", "Office Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant"); TakeScreenshot("VerifyDeletedTicketDisappearUnderMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDeletedTicketDisappearUnderMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyDeletedTicketDisappearUnderMerchant"); string id = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDeletedTicketDisappearUnderMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyDeletedTicketDisappearUnderMerchant"); executionLog.WriteInExcel("Verify Deleted Ticket Disappear Under Merchant", Status, JIRA, "Office Merchant"); } }
public void verifyRecycleBin() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); String JIRA = ""; String Status = "Pass"; username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); try { executionLog.Log("VerifyRecycleBin", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyRecycleBin", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyRecycleBin", "Go to Client export page"); VisitOffice("clients/export"); executionLog.Log("VerifyRecycleBin", "Verify Title"); VerifyTitle("Client"); executionLog.Log("VerifyRecycleBin", "Mouse hover on the tickets."); office_ClientsHelper.MouseOverAndWait("TicHover", 5); executionLog.Log("VerifyRecycleBin", "Click on All ticket button"); office_ClientsHelper.ClickForce("AllTicketBtn"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyRecycleBin", "Verify 'RecycleBin' not available"); office_ClientsHelper.VerifyTextNotPresent("RecycleBin"); executionLog.Log("VerifyRecycleBin", "Verify Recycle Bin available"); office_ClientsHelper.VerifyPageText("Recycle Bin"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyRecycleBin"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Recycle Bin"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Recycle Bin", "Bug", "Medium", "Clients page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Recycle Bin"); TakeScreenshot("VerifyRecycleBin"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyRecycleBin.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyRecycleBin"); string id = loginHelper.getIssueID("Verify Recycle Bin"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyRecycleBin.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Recycle Bin"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Recycle Bin"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyRecycleBin"); executionLog.WriteInExcel("Verify Recycle Bin", Status, JIRA, "Client Management"); } }
public void setFieldToDecimal() { 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 ExecutionLog executionLog = new ExecutionLog(); LoginHelper loginHelper = new LoginHelper(GetWebDriver()); var validate = new AdminSetFormatFieldsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); //Random Variable String JIRA = ""; String Status = "Pass"; var DBAName = "DBA@Company" + RandomNumber(1, 999); try { executionLog.Log("AdminSetValidationDecimal", "Login"); Login(username[0], password[0]); //executionLog.Log("AdminSetValidationDecimal", "Wait"); //validate.WaitForWorkAround(4000); executionLog.Log("AdminSetValidationDecimal", "Verify Title Dashboard"); VerifyTitle("Dashboard"); //VisitOffice("clients"); //validate.WaitForWorkAround(3000); //executionLog.Log("AdminSetValidationDecimal", "Click CompanySearchBar"); //validate.ClickElement("CompanySearchBar"); //executionLog.Log("AdminSetValidationDecimal", "Ttype Text Client's name"); //validate.TypeText("CompanySearchBar", "Client's name"); //executionLog.Log("AdminSetValidationDecimal", "Click FirstClient"); //validate.ClickElement("FirstClient"); //executionLog.Log("AdminSetValidationDecimal", "Click Contacts"); //validate.ClickElement("Contacts"); //executionLog.Log("AdminSetValidationDecimal", "Wait"); //validate.WaitForElementPresent("Title", 2); //executionLog.Log("AdminSetValidationDecimal", "Click Save"); //validate.ClickElement("Save"); //executionLog.Log("AdminSetValidationDecimal", "Visit admin office"); //VisitOffice("admin"); //executionLog.Log("AdminSetValidationDecimal", "Wait"); //validate.WaitForWorkAround(2000); VisitOffice("fields"); validate.WaitForWorkAround(3000); validate.SelectByText("Module", "Clients"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Processor as First Data North"); validate.SelectByText("Processor", "First Data North"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Tab as Contacts"); validate.SelectByText("Tab", "Contacts"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Section as Contacts"); validate.SelectByText("Section", "Contacts"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Click Search"); validate.ClickElement("Search"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Type title"); validate.TypeText("filter", "Title"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Click TitleField"); validate.ClickElement("ContactTitle"); validate.WaitForWorkAround(4000); executionLog.Log("AdminSetValidationDecimal", "Click ApplyDataTypeValidation"); validate.checkAndClick("ProcApplyDataTypeValidation"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select data type as decimal."); validate.SelectByText("ProcFieldDataType", "Decimal"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Click SaveFieldManager"); validate.ClickElement("SaveFieldManager"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Redirect at Create Client"); VisitOffice("clients/create"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Select Processor"); office_ClientsHelper.SelectByText("CreateProc", "First Data North"); executionLog.Log("AdminSetValidationDecimal", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBAName); executionLog.Log("AdminSetValidationDecimal", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("AdminSetValidationDecimal", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("AdminSetValidationDecimal", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("AdminSetValidationDecimal", "Click On Contact Tab Clinet"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Wait "); validate.WaitForElementPresent("Title", 1); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Redirect To clients page. "); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select client by check box"); office_ClientsHelper.ClickForce("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("AdminSetValidationDecimal", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetValidationDecimal", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("AdminSetValidationDecimal", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("AdminSetValidationDecimal", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetValidationDecimal", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); VisitOffice("fields"); validate.WaitForWorkAround(3000); validate.SelectByText("Module", "Clients"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Processor as First Data North"); validate.SelectByText("Processor", "First Data North"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Tab as Contacts"); validate.SelectByText("Tab", "Contacts"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Select Section as Contacts"); validate.SelectByText("Section", "Contacts"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Click Search"); validate.ClickElement("Search"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Type title"); validate.TypeText("filter", "Title"); validate.WaitForWorkAround(3000); executionLog.Log("AdminSetValidationDecimal", "Click TitleField"); validate.ClickElement("ContactTitle"); validate.WaitForWorkAround(4000); executionLog.Log("AdminSetValidationDecimal", "Click ApplyDataTypeValidation"); validate.checkAndClick("ProcApplyDataTypeValidation"); validate.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationDecimal", "Click SaveFieldManager"); validate.ClickElement("SaveFieldManager"); validate.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminSetValidationDecimal"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Admin Set Validation Decimal"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Set Validation Decimal", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Set Validation Decimal"); TakeScreenshot("AdminSetFormatSSN"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetValidationDecimal.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminSetValidationDecimal"); string id = loginHelper.getIssueID("Admin Set Validation Decimal"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetValidationDecimal.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Set Validation Decimal"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Set Validation Decimal"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminSetValidationDecimal"); executionLog.WriteInExcel("Admin Set Validation Decimal", Status, JIRA, "Partner Portal"); } }
public void clientSSNIssue() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // VARIABLE var name = "TestEmployee" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientSSNIssue", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("ClientSSNIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ClientSSNIssue", "Go to client page"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientSSNIssue", "Verify title"); VerifyTitle("Clients"); executionLog.Log("ClientSSNIssue", "Open a client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientSSNIssue", "Click on 'Owner' tab"); office_ClientsHelper.ClickForce("OwnerTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientSSNIssue", "Enter the title of owner"); office_ClientsHelper.TypeText("TitleOwner", "President"); executionLog.Log("ClientSSNIssue", "Enter SSN"); office_ClientsHelper.TypeText("SSN", "877656756"); executionLog.Log("ClientSSNIssue", "Click on Save button"); office_ClientsHelper.ClickElement("OwnerSave"); executionLog.Log("ClientSSNIssue", "Wait for success message"); office_ClientsHelper.WaitForText("Client data updated successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientSSNIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client SSN Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client SSN Issue", "Bug", "Medium", "Client Owner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Client SSN Issue"); TakeScreenshot("ClientSSNIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientSSNIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientSSNIssue"); string id = loginHelper.getIssueID("Client SSN Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientSSNIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client SSN Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client SSN Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientSSNIssue"); executionLog.WriteInExcel("Client SSN Issue", Status, JIRA, "Client Management"); } }
public void clientVerifyCanadaCountry() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // VARIABLE var DBA = "Client" + RandomNumber(111, 99999); var Title = "Tester" + RandomNumber(11, 100); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientVerifyCanadaCountry", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("ClientVerifyCanadaCountry", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ClientVerifyCanadaCountry", "Redirect to Create Merchant page"); VisitOffice("clients/create"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("ClientVerifyCanadaCountry", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientVerifyCanadaCountry", "Select Client Responsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientVerifyCanadaCountry", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("ClientVerifyCanadaCountry", "Goto Company details tab."); office_ClientsHelper.ClickElement("CompanyDetails"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.TypeText("FederalTaxID", "123432232"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Select Mailing Country"); office_ClientsHelper.SelectByText("MailingCountry", "Canada"); //office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Select Location counrty"); office_ClientsHelper.SelectByText("LocationCountry", "Canada"); //office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Click On Contact Tab"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Enter the Contact Title"); office_ClientsHelper.TypeText("ContactTitle", Title); executionLog.Log("ClientVerifyCanadaCountry", "SelectAddressCountry"); office_ClientsHelper.SelectByText("ContactAddressCountry", "Canada"); //office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Clkck on Owner tab"); office_ClientsHelper.ClickForce("OwnerTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Select Owner Address country"); office_ClientsHelper.SelectByText("OwnerAddressCountry", "Canada"); //office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Redirect at clients page."); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("ClientVerifyCanadaCountry", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientVerifyCanadaCountry", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("ClientVerifyCanadaCountry", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientVerifyCanadaCountry", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientVerifyCanadaCountry", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("ClientVerifyCanadaCountry", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientVerifyCanadaCountry", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientVerifyCanadaCountry"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Verify Canada Country"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Verify Canada Country", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Client Verify Canada Country"); TakeScreenshot("ClientVerifyCanadaCountry"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientVerifyCanadaCountry.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientVerifyCanadaCountry"); string id = loginHelper.getIssueID("Client Verify Canada Country"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientVerifyCanadaCountry.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Verify Canada Country"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Verify Canada Country"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientVerifyCanadaCountry"); executionLog.WriteInExcel("Client Verify Canada Country", Status, JIRA, "Client Management"); } }
public void verifyStartAndDueTimeOfTaskUnderLeadAndMerchant() { 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_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var officeActivities_TasksHelper = new OfficeActivities_TasksHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Subject = "Testtask" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Login with valid credentials"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Go to All leads page"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify page title."); VerifyTitle("Leads"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on a lead"); office_LeadsHelper.ClickElement("FirstLead"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Add Note button"); office_LeadsHelper.ClickElement("AddNote"); office_LeadsHelper.WaitForWorkAround(3000); office_LeadsHelper.SwitchToWindow(); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Subject of note"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Add Task check box"); officeActivities_NotesHelper.ClickElement("AddTaskChkBox"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Start Date of task"); officeActivities_TasksHelper.TypeText("StartDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter End Date of task"); officeActivities_TasksHelper.TypeText("DueDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Save button"); officeActivities_NotesHelper.ClickForce("Save"); //officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); office_LeadsHelper.WaitForText("Note successfully Created.", 05); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Activity Type >> Tasks"); office_LeadsHelper.WaitForWorkAround(3000); office_LeadsHelper.SelectByText("SelectActivityType", "Tasks"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Search Task by name"); office_LeadsHelper.TypeText("ActivitySubject", Subject); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Open task"); office_LeadsHelper.ClickForce("ClickNotes1"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Edit button"); officeActivities_TasksHelper.ClickElement("EditBtn"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Start Time"); officeActivities_TasksHelper.VerifySelectdOptn("StartHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("StartMin", "00"); officeActivities_TasksHelper.VerifySelectdOptn("StartAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Due Time"); officeActivities_TasksHelper.VerifySelectdOptn("DueHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("DueMin", "15"); officeActivities_TasksHelper.VerifySelectdOptn("DueAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Go to All merchants page"); VisitOffice("clients"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on a merchant"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Add Note button"); office_ClientsHelper.ClickElement("AddNotes"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.SwitchToWindow(); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Subject of note"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Add Task check box"); officeActivities_NotesHelper.ClickElement("AddTaskChkBox"); officeActivities_NotesHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter Start Date of task"); officeActivities_TasksHelper.TypeText("StartDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Enter End Date of task"); officeActivities_TasksHelper.TypeText("DueDate", "2017-10-10"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Save button"); officeActivities_NotesHelper.ClickForce("Save"); //officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); officeActivities_TasksHelper.SwitchToWindow(); officeActivities_TasksHelper.WaitForWorkAround(3000); office_ClientsHelper.WaitForText("Note successfully Created.", 05); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Select Activity Type >> Tasks"); office_ClientsHelper.WaitForWorkAround(3000); office_ClientsHelper.SelectByText("ActivityType", "Tasks"); office_ClientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Search Task by name"); office_ClientsHelper.TypeText("SearchActivity", Subject); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Open task"); office_ClientsHelper.ClickForce("Activity1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Click on Edit button"); officeActivities_TasksHelper.ClickElement("EditBtn"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Start Time"); officeActivities_TasksHelper.VerifySelectdOptn("StartHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("StartMin", "00"); officeActivities_TasksHelper.VerifySelectdOptn("StartAMPM", "AM"); executionLog.Log("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant", "Verify Due Time"); officeActivities_TasksHelper.VerifySelectdOptn("DueHour", "01"); officeActivities_TasksHelper.VerifySelectdOptn("DueMin", "15"); officeActivities_TasksHelper.VerifySelectdOptn("DueAMPM", "AM"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Start And Due Time Of Task Under Lead And Merchant"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Start And Due Time Of Task Under Lead And Merchant", "Bug", "Medium", "Leads and Merchants page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); TakeScreenshot("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); string id = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Start And Due Time Of Task Under Lead And Merchant"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyStartAndDueTimeOfTaskUnderLeadAndMerchant"); executionLog.WriteInExcel("Verify Start And Due Time Of Task Under Lead And Merchant", Status, JIRA, "Office Leads And Merchants"); } }
public void clientZipCodeAutoPopulationIssue() { 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_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Test" + RandomNumber(99, 99999); var LName = "Test" + RandomNumber(99, 99999); var DBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientZipCodeAutoPopulationIssue", "Login with valid credentials"); Login(username[0], password[0]); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Visit Craete Client"); VisitOffice("clients/create"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click Cancel"); office_ClientsHelper.ClickForce("CancelOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Visit Craete Client"); VisitOffice("clients/create"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", "Client DBA"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Wait for element to be visible."); office_ClientsHelper.WaitForElementPresent("CompanyDetails", 10); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Goto Company details tab."); office_ClientsHelper.ClickElement("CompanyDetails"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Client Company DBA Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter Client federal tax id."); office_ClientsHelper.TypeText("FederalTaxID", "111122222"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter Client Bussiness Legal Name."); office_ClientsHelper.TypeText("BussinessLegalName", "LegalCli"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Select Status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Select Responsibilties"); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter company details zipcode."); office_ClientsHelper.TypeText("ZipCodeMailingAddress", "60601"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on contact tab"); office_ClientsHelper.ClickElement("ClickOnContactTab"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter the Conatct Title"); office_ClientsHelper.TypeText("ContactTitle", "(785) 786-8768"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on owner tab."); office_ClientsHelper.ClickForce("OwnerTab"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter zip code."); office_ClientsHelper.TypeText("OwnerZipCode", "60601"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on save button."); office_ClientsHelper.ClickElement("OwnerSave"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client data updated successfully. ", 10); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Visit Client page."); VisitOffice("clients"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Verify page title."); VerifyTitle(); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter created client company name."); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(6000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on searched company name."); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on comapany details tab."); office_ClientsHelper.ClickElement("CompanyDetails"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Verify all field populated automatically on entering a valid zip code."); office_ClientsHelper.VerifyAutoPopulation(); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on save button."); office_ClientsHelper.ClickElement("Save"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); office_ClientsHelper.selectOwner("//*[@id='gs_first_name']"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCodeAutoPopulationIssue", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientZipCodeAutoPopulationIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("ClientZipCodeAutoPopulationIssue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("ClientZipCodeAutoPopulationIssue", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("ClientZipCodeAutoPopulationIssue"); TakeScreenshot("ClientZipCodeAutoPopulationIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCodeAutoPopulationIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientZipCodeAutoPopulationIssue"); string id = loginHelper.getIssueID("ClientZipCodeAutoPopulationIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCodeAutoPopulationIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("ClientZipCodeAutoPopulationIssue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("ClientZipCodeAutoPopulationIssue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientZipCodeAutoPopulationIssue"); executionLog.WriteInExcel("ClientZipCodeAutoPopulationIssue", Status, JIRA, "Lead Management"); } }
public void verifyDocumentShareDBAPopulate() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_clientsHelper = new Office_ClientsHelper(GetWebDriver()); var yopmail_Helper = new YopMailHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 9999); var OwnerFirst = "Owner" + RandomNumber(1, 9999); var OwnerLast = "Test" + RandomNumber(1, 9999); var DBAVerify = "Merchant Portal - " + DBA + " You have documents waiting for review"; // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyDocumentShareDBAPopulate", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected to Dashboard"); VisitOffice("clients/create"); office_clientsHelper.WaitForWorkAround(2000); Console.WriteLine("Redirected to Create Merchant page"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Bussiness DBA name"); office_clientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter First Name"); office_clientsHelper.TypeText("FirstName", "Test"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Last Name"); office_clientsHelper.TypeText("LastName", "Client"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Status"); office_clientsHelper.SelectByText("Status", "New"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Responsibility"); office_clientsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("Save"); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Merchant Created"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Owners tab"); office_clientsHelper.ClickElement("OwnerTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Owners tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner First Name"); office_clientsHelper.TypeText("OwnerFirstName", OwnerFirst); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Last Name"); office_clientsHelper.TypeText("OwnerLastName", OwnerLast); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Title"); office_clientsHelper.TypeText("TitleOwner", "NewTitle"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select eAddress Type"); office_clientsHelper.SelectByText("OwnereAddressType", "E-Mail"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter eAddress"); office_clientsHelper.TypeText("OwnereAddressEnter", "*****@*****.**"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("OwnerSave"); Console.WriteLine("Owner Information saved"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Default Password radio button"); office_clientsHelper.ClickElement("DefaultPwdRadioBtn"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create button"); office_clientsHelper.ClickElement("CreateBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Close Create User Popup"); office_clientsHelper.ClickElement("CrossIcon"); Console.WriteLine("Client User Created"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Info tab"); office_clientsHelper.ClickElement("InfoTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Info tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create/Manage button"); office_clientsHelper.ClickForce("ManageClientUser"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Manage option"); office_clientsHelper.ClickElement("ManageOption"); office_clientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select User"); office_clientsHelper.ClickElement("ClientChkBox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Activate Selected User button"); office_clientsHelper.ClickElement("ActivateBtn"); office_clientsHelper.WaitForWorkAround(4000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Client User Activated"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Owners Signature Required check box"); office_clientsHelper.ClickElement("OwnerSignReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Documents Required check box"); office_clientsHelper.ClickElement("DocReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Share button"); office_clientsHelper.ClickElement("ShareBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); Console.WriteLine("File Shared successfully"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to yopmail.com"); GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); yopmail_Helper.WaitForWorkAround(3000); Console.WriteLine("Redirected to yopmail.com"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Email"); yopmail_Helper.TypeText("Yopmail", "owner.pegasus"); yopmail_Helper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Check Inbox button"); yopmail_Helper.ClickElement("YopmailClick"); Console.WriteLine("Entered into inbox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify DBA Name present in Subject of email"); yopmail_Helper.switchFrame("ifmail"); yopmail_Helper.VerifyText("SubjectFirstMail", DBA); Console.WriteLine("DBA Name is populated in Subject if email"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyDocumentShareDBAPopulate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Document Share DBA Populate"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Document Share DBA Populate", "Bug", "Medium", "Office Merchant", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string id = loginHelper.getIssueID("Verify Document Share DBA Populate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Document Share DBA Populate"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Document Share DBA Populate"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyDocumentShareDBAPopulate"); executionLog.WriteInExcel("Verify Document Share DBA Populate", Status, JIRA, "Office Merchant"); } }
public void leadAndClientManagement() { 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_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Test" + RandomNumber(99, 99999); var LName = "Test" + RandomNumber(99, 99999); var CDBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadAndClientManagement", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("LeadAndClientManagement", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadAndClientManagement", "Visit Lead"); VisitOffice("leads/create"); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); executionLog.Log("LeadAndClientManagement", "Select Responsibities"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadAndClientManagement", "Click on Save"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); executionLog.Log("LeadAndClientManagement", "Wait for Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickOnConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click Save on Pop Up"); office_LeadsHelper.ClickOnDisplayed("ClickonPopUpSave"); executionLog.Log("LeadAndClientManagement", "Verify confirmation"); office_LeadsHelper.WaitForText("Lead is converted and moved to recyclebin.", 10); executionLog.Log("LeadAndClientManagement", "Visit Lead"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(4000); executionLog.Log("LeadAndClientManagement", "Click Export"); office_LeadsHelper.ClickElement("ClickOnExport"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click Export As CSV"); office_LeadsHelper.ClickElement("ExportAsCSVlEAD"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Goto Lead"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Export"); office_LeadsHelper.ClickElement("ClickOnExport"); executionLog.Log("LeadAndClientManagement", "Click on Export as excel"); office_LeadsHelper.ClickElement("ExportAsExcelLead"); office_LeadsHelper.WaitForWorkAround(5000); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Select the responsibility"); office_LeadsHelper.SelectByText("SelectResponsibiltiy", "Howard Tang"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickJS("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Wait for success message."); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Goto Client"); VisitOffice("clients"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Export"); office_ClientsHelper.ClickForce("ClickOnExport"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click export AS Excel"); office_ClientsHelper.ClickElement("ExportAsExcelLead"); executionLog.Log("LeadAndClientManagement", "Go to create a Lead"); VisitOffice("leads/create"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA Name"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Responsibilities"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click Save Button"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); executionLog.Log("LeadAndClientManagement", "Wait for Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickJS("CancelConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Convert"); office_LeadsHelper.ClickElement("ClickConvert"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on No"); office_LeadsHelper.ClickDisplayed("//*[@id='LeadConversionDelete0']"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Save"); office_LeadsHelper.ClickOnDisplayed("ClickonPopUpSave"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Confirmation"); office_LeadsHelper.VerifyPageText("Lead is converted successfully."); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Go to create a Lead"); VisitOffice("leads/create"); executionLog.Log("LeadAndClientManagement", "Enter First Name"); office_LeadsHelper.TypeText("FirstNameLead", FName); executionLog.Log("LeadAndClientManagement", "Enter Last Name"); office_LeadsHelper.TypeText("LastName", LName); executionLog.Log("LeadAndClientManagement", "Enter Company DBA Name"); office_LeadsHelper.TypeText("CompanyName", CDBA); executionLog.Log("LeadAndClientManagement", "Click on Assignments"); office_LeadsHelper.ClickElement("Assignments"); executionLog.Log("LeadAndClientManagement", "Wait for element to be visible."); office_LeadsHelper.WaitForElementPresent("LeadStatus", 10); executionLog.Log("LeadAndClientManagement", "Select Status"); office_LeadsHelper.SelectByText("LeadStatus", "New"); executionLog.Log("LeadAndClientManagement", "Select Responsibility"); office_LeadsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("LeadAndClientManagement", "Click onSave Button"); office_LeadsHelper.ClickElement("SaveLeadNewSkin"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Click on Create duplicate lead"); office_LeadsHelper.ClickElement("CreateDuplicate"); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("Lead saved successfully.", 10); executionLog.Log("LeadAndClientManagement", "Go to Lead"); VisitOffice("leads"); executionLog.Log("LeadAndClientManagement", "Click on First Lead To check"); office_LeadsHelper.ClickElement("CheckDocToDel"); executionLog.Log("LeadAndClientManagement", "Click on Delete button."); office_LeadsHelper.ClickElement("ClickDelLeadbutton"); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Goto leads/recyclebin "); VisitOffice("leads/recyclebin"); executionLog.Log("LeadAndClientManagement", "Click Restore"); office_LeadsHelper.ClickElement("ClickOnRestoreLeadIcon"); executionLog.Log("LeadAndClientManagement", "Verify Confirmation"); office_LeadsHelper.WaitForText("Lead Restored Successfully.", 10); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickElement("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Wait for success message."); office_LeadsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("LeadAndClientManagement", "Redirect To leads page. "); VisitOffice("leads"); executionLog.Log("LeadAndClientManagement", "Select lead by check box"); office_LeadsHelper.ClickElement("ClickOn1stOpp"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadAndClientManagement", "Click on delete lead"); office_LeadsHelper.ClickElement("DeleteLead"); executionLog.Log("LeadAndClientManagement", "Accept alert message."); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadAndClientManagement", "Wait for success message."); office_LeadsHelper.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("LeadAndClientManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("LeadAndClientManagement"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("LeadAndClientManagement", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("LeadAndClientManagement"); TakeScreenshot("LeadAndClientManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadAndClientManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadAndClientManagement"); string id = loginHelper.getIssueID("LeadAndClientManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadAndClientManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("LeadAndClientManagement"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("LeadAndClientManagement"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadAndClientManagement"); executionLog.WriteInExcel("LeadAndClientManagement", Status, JIRA, "Lead Management"); } }
public void downloadIdsManagement() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var equipment_DownloadIDHelper = new Equipment_DownloadIDHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable var Name = "Download" + RandomNumber(1, 999); var name = "UpdateDown" + RandomNumber(33, 9999); var Id = "12" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("DownloadIdsManagement", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("DownloadIdsManagement", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("DownloadIdsManagement", "Redirect To Downlaod id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Download IDs"); executionLog.Log("DownloadIdsManagement", " Click On Create"); equipment_DownloadIDHelper.ClickElement("Create"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Manage Master Equipment Type Download Ids"); executionLog.Log("DownloadIdsManagement", " Click on Save button"); equipment_DownloadIDHelper.ClickElement("Save"); //equipment_DownloadIDHelper.WaitForWorkAround(5000); executionLog.Log("DownloadIdsManagement", " Verify error for type"); equipment_DownloadIDHelper.VerifyText("TypeError", "This field is required."); executionLog.Log("DownloadIdsManagement", " Verify validation for name"); equipment_DownloadIDHelper.VerifyText("NameError", "This field is required"); executionLog.Log("DownloadIdsManagement", "Verify validation for ID"); equipment_DownloadIDHelper.VerifyText("IDError", "This field is required."); executionLog.Log("DownloadIdsManagement", "Select DownloadIdsType"); equipment_DownloadIDHelper.Select("DownloadIdsType", "Terminal"); executionLog.Log("DownloadIdsManagement", "Enter DownloadsIDName"); equipment_DownloadIDHelper.TypeText("DownloadsIDName", Name); executionLog.Log("DownloadIdsManagement", "Enter DownloadsID"); equipment_DownloadIDHelper.TypeText("DownloadID", Id); executionLog.Log("DownloadIdsManagement", "Select Status"); equipment_DownloadIDHelper.Select("Status", "0"); executionLog.Log("DownloadIdsManagement", " Click on Save button"); equipment_DownloadIDHelper.ClickElement("Save"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for text"); equipment_DownloadIDHelper.WaitForText("The download id is successfully created!!", 10); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Click on Edit button"); equipment_DownloadIDHelper.ClickElement("Edit"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify title"); VerifyTitle("Manage Master Equipment Type Download Ids"); executionLog.Log("DownloadIdsManagement", "Select DownloadIdsType"); equipment_DownloadIDHelper.Select("DownloadIdsType", "VAR"); executionLog.Log("DownloadIdsManagement", "Enter DownloadsIDName"); equipment_DownloadIDHelper.TypeText("DownloadsIDName", name); executionLog.Log("DownloadIdsManagement", "Enter DownloadsID"); equipment_DownloadIDHelper.TypeText("DownloadID", Id + "22"); executionLog.Log("DownloadIdsManagement", "Select Status"); equipment_DownloadIDHelper.Select("Status", "0"); executionLog.Log("DownloadIdsManagement", " Click on Save button "); equipment_DownloadIDHelper.ClickElement("Save"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for text"); equipment_DownloadIDHelper.WaitForText("The download id is successfully updated!!", 10); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Redirect at clients page"); VisitOffice("clients"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify page title"); VerifyTitle(); executionLog.Log("DownloadIdsManagement", "Click on any client"); office_ClientsHelper.ClickElement("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on terminals and equipment tab"); office_ClientsHelper.ClickElement("TerminalsandEquipments"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on Add equipment"); office_ClientsHelper.ClickElement("AddEquipment"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Click on any equipment"); office_ClientsHelper.ClickForce("Equipment1"); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Verify created Download ID present on page."); Assert.IsTrue(office_ClientsHelper.IsElementPresent("//select//option[text()= '" + name + "']")); //office_ClientsHelper.WaitForWorkAround(7000); executionLog.Log("DownloadIdsManagement", "Redirect at download id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id + "22"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", " Click to change status"); equipment_DownloadIDHelper.ClickElement("StatusToggle"); executionLog.Log("DownloadIdsManagement", " Accept alert message."); equipment_DownloadIDHelper.AcceptAlert(); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", "Wait for status updation message"); equipment_DownloadIDHelper.WaitForText("Equipment Download ID is successfully deactivated", 10); executionLog.Log("DownloadIdsManagement", "Redirect at clients page"); VisitOffice("clients"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Verify page title"); VerifyTitle(); executionLog.Log("DownloadIdsManagement", "Click on any client"); office_ClientsHelper.ClickElement("Client1"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on terminals and equipment tab"); equipment_DownloadIDHelper.ClickElement("TerminalsandEquipments"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Click on Add equipment"); equipment_DownloadIDHelper.ClickElement("AddEquipment"); equipment_DownloadIDHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Click on any equipment"); equipment_DownloadIDHelper.ClickViaJavaScript("//*[@id='popupContent']/table/tbody/tr[1]/td[1]/a"); equipment_DownloadIDHelper.WaitForWorkAround(4000); executionLog.Log("DownloadIdsManagement", "Verify download id not present on page."); Assert.IsFalse(equipment_DownloadIDHelper.IsElementPresent("//select//option[text()= '" + name + "']")); executionLog.Log("DownloadIdsManagement", "Redirect At download id page"); VisitOffice("download_ids"); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Enter Id to search"); equipment_DownloadIDHelper.TypeText("SearchDownloadIds", Id + "22"); equipment_DownloadIDHelper.WaitForWorkAround(2000); executionLog.Log("DownloadIdsManagement", " Click on Change status icon"); equipment_DownloadIDHelper.ClickElement("StatusToggle"); executionLog.Log("DownloadIdsManagement", " Accept Alert message."); equipment_DownloadIDHelper.AcceptAlert(); equipment_DownloadIDHelper.WaitForWorkAround(3000); executionLog.Log("DownloadIdsManagement", "Wait for status updation message"); equipment_DownloadIDHelper.WaitForText("Equipment Download ID is successfully activated", 5); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("DownloadIdsManagement"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("DownloadIds Management"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("DownloadIds Management", "Bug", "Medium", "Create DownloadsIDS page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("DownloadIds Management"); TakeScreenshot("DownloadIdsManagement"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DownloadIdsManagement.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("DownloadIdsManagement"); string id = loginHelper.getIssueID("DownloadIds Management"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DownloadIdsManagement.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("DownloadIds Management"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("DownloadIds Management"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("DownloadIdsManagement"); executionLog.WriteInExcel("DownloadIds Management", Status, JIRA, "Equipment Management"); } }
public void validateName() { 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 ExecutionLog executionLog = new ExecutionLog(); LoginHelper loginHelper = new LoginHelper(GetWebDriver()); var validateNames = new AdminValidateDisplayNamesHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Random Variable String JIRA = ""; String Status = "Pass"; var DBAName = "DBA@Company" + RandomNumber(1, 999); try { //executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); //validateNames.WaitForWorkAround(2000); //Logging in executionLog.Log(" AdminValidateDisplayNames", "Login"); Login(username[0], password[0]); //executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); //validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", "Verify Dashboard"); VerifyTitle("Dashboard"); //VisitOffice("clients"); //validateNames.WaitForWorkAround(3000); //executionLog.Log(" AdminValidateDisplayNames", " Search the clients name "); //validateNames.TypeText("SearchFields", "Client's Name"); //validateNames.WaitForWorkAround(3000); //executionLog.Log(" AdminValidateDisplayNames", " Click on FirstClient "); //validateNames.ClickElement("FirstClient"); //executionLog.Log(" AdminValidateDisplayNames", "Hover on CompanyDetails "); //validateNames.MouseHover("CompanyDetails"); //executionLog.Log(" AdminValidateDisplayNames", " Click on CompanyDetails "); //validateNames.ClickElement("CompanyDetails"); //// Verifying the field exists that will be changed //executionLog.Log(" AdminValidateDisplayNames", " Verify NameCity "); //validateNames.ElementVisible("AddressLine1"); //// Going to admin office //executionLog.Log(" AdminValidateDisplayNames", " Visit office admin "); //VisitOffice("admin"); //validateNames.WaitForWorkAround(4000); // Accessing field in field dictionary VisitOffice("fields"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module"); validateNames.SelectByText("Module", "Clients"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationTime", "Select Processor as First Data North"); validateNames.SelectByText("Processor", "First Data North"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module tab"); validateNames.SelectByText("Tab", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select Section as Company Address"); validateNames.SelectByText("Section", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log(" AdminValidateDisplayNames", " Click on Search "); validateNames.ClickElement("Search"); validateNames.WaitForWorkAround(3000); executionLog.Log(" AdminValidateDisplayNames", " Click on Addressline1D "); validateNames.ClickElement("StoreName"); validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", " Click on FieldDisplayName "); validateNames.ClickElement("ProcFieldDisplayName"); // Changing the name of the field executionLog.Log(" AdminValidateDisplayNames", " Type City Name Here"); validateNames.TypeText("ProcFieldDisplayName", "Test"); executionLog.Log(" AdminValidateDisplayNames", " Click on Save "); validateNames.ClickElement("SaveFieldManager"); executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); validateNames.WaitForWorkAround(3000); // Vist Clients site executionLog.Log("AdminValidateDisplayNames", "Redirect at Create Client"); VisitOffice("clients/create"); validateNames.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Select Processor"); office_ClientsHelper.SelectByText("CreateProc", "First Data North"); executionLog.Log("AdminValidateDisplayNames", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBAName); executionLog.Log("AdminValidateDisplayNames", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("AdminValidateDisplayNames", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("AdminValidateDisplayNames", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("AdminValidateDisplayNames", "Click On Contact Tab Clinet"); office_ClientsHelper.ClickElement("CompanyDetailsTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Verify Title of Store Name"); office_ClientsHelper.VerifyText("StoreNameLabel", "Test"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Redirect To clients page. "); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select client by check box"); office_ClientsHelper.ClickForce("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("AdminValidateDisplayNames", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminValidateDisplayNames", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("AdminValidateDisplayNames", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminValidateDisplayNames", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("AdminValidateDisplayNames", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminValidateDisplayNames", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); // Vist field site VisitOffice("fields"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module"); validateNames.SelectByText("Module", "Clients"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminSetValidationTime", "Select Processor as First Data North"); validateNames.SelectByText("Processor", "First Data North"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select the module tab"); validateNames.SelectByText("Tab", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log("AdminValidateDisplayNames", "Select Section as Company Address"); validateNames.SelectByText("Section", "Company Details"); validateNames.WaitForWorkAround(2000); executionLog.Log(" AdminValidateDisplayNames", " Click on Search "); validateNames.ClickElement("Search"); validateNames.WaitForWorkAround(3000); executionLog.Log(" AdminValidateDisplayNames", " Click on Addressline1D "); validateNames.ClickElement("StoreName"); validateNames.WaitForWorkAround(4000); executionLog.Log(" AdminValidateDisplayNames", " Click on FieldDisplayName "); validateNames.ClickElement("ProcFieldDisplayName"); // Changing the name of the field executionLog.Log(" AdminValidateDisplayNames", " Type City Name Here"); validateNames.TypeText("ProcFieldDisplayName", "Store/DBA Name"); executionLog.Log(" AdminValidateDisplayNames", " Click on Save "); validateNames.ClickElement("SaveFieldManager"); executionLog.Log(" AdminValidateDisplayNames", "Wait for work around"); validateNames.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminValidateDisplayNames"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("AdminValidateDisplayNames"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("AdminValidateDisplayNames", "Bug", "Medium", "Calls page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("AdminValidateDisplayNames"); TakeScreenshot("AdminValidateDisplayNames"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminValidateDisplayNames.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminValidateDisplayNames"); string id = loginHelper.getIssueID("Admin Validate Display Names"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminValidateDisplayNames.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Validate Display Names"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Admin Validate Display Names"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminValidateDisplayNames"); executionLog.WriteInExcel("Admin Validate Display Names", Status, JIRA, "Office"); } }
public void clientsAdvanceFilterActivities() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; var ClientNote = "Client Note" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientsAdvanceFilterActivities", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientsAdvanceFilterActivities", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Clients"); //office_ClientsHelper.WaitForWorkAround(3000); //Verify clients with notes. executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientWithNotes"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as notes."); office_ClientsHelper.SelectByText("SelectActivityType", "Notes"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify notes present for clients."); office_ClientsHelper.WaitForElementVisible("NoteClient", 5); // Verifies client with open meetings. executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientOpenMeet"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as meetings."); office_ClientsHelper.SelectByText("SelectActivityType", "Meetings"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify meetings present for clients."); office_ClientsHelper.WaitForElementVisible("MeetingClient", 5); // Verifies client with closed meetings. executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle(); executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientCLoseMeet"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as meetings."); office_ClientsHelper.SelectByText("SelectActivityType", "Meetings"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify meeting present for clients."); // office_ClientsHelper.WaitForElementVisible("MeetingClient",5); // Verifies client with open tasks. executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientOpenTask"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as tasks."); office_ClientsHelper.SelectByText("SelectActivityType", "Tasks"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify tasks present for clients."); office_ClientsHelper.WaitForElementVisible("TasksClient", 5); // Verifies client with closed tasks. // executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); // VisitOffice("clients"); // office_ClientsHelper.WaitForWorkAround(5000); // executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); // VerifyTitle(); // executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); // office_ClientsHelper.ClickForce("AdvanceFilter"); // office_ClientsHelper.WaitForWorkAround(3000); // executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); // office_ClientsHelper.ClickForce("ShowClientActivity"); // office_ClientsHelper.WaitForWorkAround(3000); // executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); // office_ClientsHelper.ClickForce("ClientCLoseTask"); // office_ClientsHelper.WaitForWorkAround(3000); // executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); // office_ClientsHelper.ClickForce("Apply"); // office_ClientsHelper.WaitForWorkAround(3000); // executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); // office_ClientsHelper.ClickForce("Client1"); // office_ClientsHelper.WaitForWorkAround(3000); // executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as tasks."); // office_ClientsHelper.SelectByText("SelectActivityType", "Tasks"); // office_ClientsHelper.WaitForWorkAround(2000); // executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); // office_ClientsHelper.SelectByText("CreatedByField", "All"); // office_ClientsHelper.WaitForWorkAround(2000); // executionLog.Log("ClientsAdvanceFilterActivities", "Verify tasks present for clients."); //// office_ClientsHelper.WaitForElementVisible("TasksClient",5); // Verifies client with documents. executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientWithDoc"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as documents."); office_ClientsHelper.SelectByText("SelectActivityType", "Documents"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify documents present for clients."); office_ClientsHelper.WaitForElementVisible("DocsClient", 5); // Verifies client with emails. executionLog.Log("ClientsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(5000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Clients"); executionLog.Log("ClientsAdvanceFilterActivities", "Click on advance filter."); office_ClientsHelper.ClickForce("AdvanceFilter"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on show activiities button."); office_ClientsHelper.ClickForce("ShowClientActivity"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Selct client with activity type."); office_ClientsHelper.ClickForce("ClientsWithEmail"); //office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on apply button."); office_ClientsHelper.ClickForce("Apply"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Click on any client."); office_ClientsHelper.ClickForce("Client1"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientsAdvanceFilterActivities", "Select actitivity type as emails."); office_ClientsHelper.SelectByText("SelectActivityType", "E-Mails"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Select All in Created By field"); office_ClientsHelper.SelectByText("CreatedByField", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientsAdvanceFilterActivities", "Verify email present for clients."); office_ClientsHelper.WaitForElementVisible("EmailClient", 5); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientsAdvanceFilterActivities"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Clients Advance Filter Activities"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Clients Advance Filter Activities", "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("Clients Advance Filter Activities"); TakeScreenshot("ClientsAdvanceFilterActivities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientsAdvanceFilterActivities.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientsAdvanceFilterActivities"); string id = loginHelper.getIssueID("Clients Advance Filter Activities"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientsAdvanceFilterActivities.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Clients Advance Filter Activities"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Clients Advance Filter Activities"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientsAdvanceFilterActivities"); executionLog.WriteInExcel("Clients Advance Filter Activities", Status, JIRA, "Opportunities Management"); } }