public void verifyCompanyNameOfMerchantOwnerContact() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var office_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(111, 999999); var ownername = "Owner" + DBA; // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Redirect at Create merchant page"); VisitOffice("clients/create"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Enter DBA name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Select the client status"); office_ClientsHelper.SelectByText("Status", "New"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "select the responsibity"); office_ClientsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Click on save btn"); office_ClientsHelper.ClickElement("Save"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Go to Owners tab"); office_ClientsHelper.ClickElement("OwnerTab"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Enter Title"); office_ClientsHelper.TypeText("TitleOwner", "Title"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Enter Owner First Name"); office_ClientsHelper.TypeText("OwnerFirstName", ownername); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Enter Owner Last Name"); office_ClientsHelper.TypeText("OwnerLastName", "Owner"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Click on Save button"); office_ClientsHelper.ClickElement("OwnerSave"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Redirect at All Contacts page"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Search Contact Name"); office_ContactsHelper.TypeText("SearchName", ownername); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Verify Company name"); office_ContactsHelper.VerifyText("FirstCompName", DBA); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Redirect at All merchants page"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Search the company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Click on check box"); office_ClientsHelper.ClickElement("ClickOnCheckBox"); executionLog.Log("VerifyCompanyNameOfMerchantOwnerContact", "Delete the client"); office_ClientsHelper.ClickJS("DeleteClient"); office_ClientsHelper.AcceptAlert(); office_ClientsHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyCompanyNameOfMerchantOwnerContact"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Company Name Of Merchant Owner Contact"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Company Name Of Merchant Owner Contact", "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 Company Name Of Merchant Owner Contact"); TakeScreenshot("VerifyCompanyNameOfMerchantOwnerContact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCompanyNameOfMerchantOwnerContact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyCompanyNameOfMerchantOwnerContact"); string id = loginHelper.getIssueID("Verify Company Name Of Merchant Owner Contact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyCompanyNameOfMerchantOwnerContact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Company Name Of Merchant Owner Contact"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Company Name Of Merchant Owner Contact"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyCompanyNameOfMerchantOwnerContact"); executionLog.WriteInExcel("Verify Company Name Of Merchant Owner Contact", Status, JIRA, "Office Merchants"); } }
public void verifyContactCreditsIssue() { 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_ContactsHelper = new Office_ContactsHelper(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); var ContactImport = GetPathToFile() + "contactsamples.csv"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyContactCreditsIssue", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyContactCreditsIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyContactCreditsIssue", "Goto Contact"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(5000); executionLog.Log("VerifyContactCreditsIssue", "Verify title"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("VerifyContactCreditsIssue", "Goto Create Contact"); VisitOffice("contacts/create"); executionLog.Log("VerifyContactCreditsIssue", "Click on Cancel Button"); office_ContactsHelper.ClickElement("Cancelbtn"); executionLog.Log("VerifyContactCreditsIssue", "Verify text on page."); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("VerifyContactCreditsIssue", "Create Contact"); VisitOffice("contacts/create"); executionLog.Log("VerifyContactCreditsIssue", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("VerifyContactCreditsIssue", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("VerifyContactCreditsIssue", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyContactCreditsIssue", "Click on Save Contact"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); /* * if (office_ContactsHelper.IsElementPresent("//h3[text()='Existing Contacts']")) * { * * executionLog.Log("VerifyContactCreditsIssue", "Click on Dublicate button"); * office_ContactsHelper.ClickElement("ClickOnDuplicate"); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Confirmation"); * office_ContactsHelper.WaitForText("A Contact has been created.", 10); * * executionLog.Log("VerifyContactCreditsIssue", "Redirect at contacts page."); * VisitOffice("contacts"); * * executionLog.Log("VerifyContactCreditsIssue", "Verify page title."); * VerifyTitle("Contacts"); * * executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); * office_ContactsHelper.TypeText("SearchCompany", CDBA); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Clcik on searched contact."); * office_ContactsHelper.ClickElement("Contact1"); * * executionLog.Log("VerifyContactCreditsIssue", "Verify contact created by credits."); * office_ContactsHelper.VerifyText("CreatedBy", "Howard Tang"); * * executionLog.Log("VerifyContactCreditsIssue", "Verify contact modified by credits."); * office_ContactsHelper.VerifyText("ModifiedBy", "Howard Tang"); * * executionLog.Log("VerifyContactCreditsIssue", "Goto Contact"); * VisitOffice("contacts"); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); * office_ContactsHelper.TypeText("SearchCompany", CDBA); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Check the first contact checkbox"); * office_ContactsHelper.ClickElement("CheckTheFirstContact"); * * executionLog.Log("VerifyContactCreditsIssue", "Click delete icon"); * office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); * office_ContactsHelper.AcceptAlert(); * * executionLog.Log("VerifyContactCreditsIssue", "Wait for deleted text message"); * office_ContactsHelper.WaitForText("records deleted successfully", 10); * * executionLog.Log("VerifyContactCreditsIssue", "Redirect to recycled contacts."); * VisitOffice("contacts/recyclebin"); * * executionLog.Log("VerifyContactCreditsIssue", "Click restore link"); * office_ContactsHelper.ClickElement("ClickOnContactRCRestore"); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Wait for restored message"); * office_ContactsHelper.WaitForText("Contact Restored Successfully.", 10); * * executionLog.Log("VerifyContactCreditsIssue", "Goto Contact"); * VisitOffice("contacts"); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); * office_ContactsHelper.TypeText("SearchCompany", CDBA); * office_ContactsHelper.WaitForWorkAround(3000); * * executionLog.Log("VerifyContactCreditsIssue", "Check the First Checkbox"); * office_ContactsHelper.ClickElement("CheckTheFirstContact"); * * executionLog.Log("VerifyContactCreditsIssue", "Click on Delete Icon"); * office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); * office_ContactsHelper.AcceptAlert(); * * executionLog.Log("VerifyContactCreditsIssue", "Confrimation"); * office_ContactsHelper.WaitForText("records deleted successfully", 10); * * executionLog.Log("VerifyContactCreditsIssue", "Goto Contact Recycle Bin"); * VisitOffice("contacts/recyclebin"); * * executionLog.Log("VerifyContactCreditsIssue", "Delete Icon"); * office_ContactsHelper.ClickElement("ClickOnDeleteIconRCBin"); * office_ContactsHelper.AcceptAlert(); * * executionLog.Log("VerifyContactCreditsIssue", "Confiration"); * office_ContactsHelper.WaitForText("Contact Permanently Deleted.", 10); * * } * else * { */ executionLog.Log("VerifyContactCreditsIssue", "Wait for save Confirmation"); office_ContactsHelper.WaitForText("A Contact has been created.", 20); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Redirect at contacts page."); VisitOffice("contacts"); executionLog.Log("VerifyContactCreditsIssue", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(3000); office_ContactsHelper.SelectDropDownByText("//select[@name='owner']", "All"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Click on searched contact."); office_ContactsHelper.ClickElement("Contact1"); executionLog.Log("VerifyContactCreditsIssue", "Verify contact created by credits."); office_ContactsHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyContactCreditsIssue", "Verify contact modified by credits."); office_ContactsHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyContactCreditsIssue", "Goto Contact"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Check the first contact checkbox"); office_ContactsHelper.ClickElement("CheckTheFirstContact"); executionLog.Log("VerifyContactCreditsIssue", "Click delete icon"); office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); office_ContactsHelper.AcceptAlert(); executionLog.Log("VerifyContactCreditsIssue", "Wait for deleted text message"); office_ContactsHelper.WaitForText("records deleted successfully", 10); executionLog.Log("VerifyContactCreditsIssue", "Redirect to recycled contacts."); VisitOffice("contacts/recyclebin"); executionLog.Log("VerifyContactCreditsIssue", "Click restore link"); office_ContactsHelper.ClickElement("ClickOnContactRCRestore"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Wait for restored message"); office_ContactsHelper.WaitForText("Contact Restored Successfully.", 10); executionLog.Log("VerifyContactCreditsIssue", "Goto Contact"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactCreditsIssue", "Search Contact by company name"); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(5000); executionLog.Log("VerifyContactCreditsIssue", "Check the First Checkbox"); office_ContactsHelper.ClickElement("CheckTheFirstContact"); executionLog.Log("VerifyContactCreditsIssue", "Click on Delete Icon"); office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); office_ContactsHelper.AcceptAlert(); executionLog.Log("VerifyContactCreditsIssue", "Confrimation"); office_ContactsHelper.WaitForText("records deleted successfully", 10); executionLog.Log("VerifyContactCreditsIssue", "Goto Contact Recycle Bin"); VisitOffice("contacts/recyclebin"); executionLog.Log("VerifyContactCreditsIssue", "Delete Icon"); office_ContactsHelper.ClickElement("ClickOnDeleteIconRCBin"); office_ContactsHelper.AcceptAlert(); executionLog.Log("VerifyContactCreditsIssue", "Confiration"); office_ContactsHelper.WaitForText("Contact Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyContactCreditsIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyContactCreditsIssue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyContactCreditsIssue", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("VerifyContactCreditsIssue"); TakeScreenshot("VerifyContactCreditsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyContactCreditsIssue"); string id = loginHelper.getIssueID("VerifyContactCreditsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyContactCreditsIssue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyContactCreditsIssue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyContactCreditsIssue"); executionLog.WriteInExcel("VerifyContactCreditsIssue", Status, JIRA, "Contact Management"); } }
public void verifyContactStatusBulkUpdate() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); // Random Variable var last_name = "Contact" + GetRandomNumber(); var comp = "Automation" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyContactStatusBulkUpdate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyContactStatusBulkUpdate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyContactStatusBulkUpdate", "Redirect at import contacts page."); VisitOffice("contacts/create"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Enter First and Last name"); office_ContactsHelper.TypeText("FirstNAME", "Automation"); office_ContactsHelper.TypeText("LastName", last_name); executionLog.Log("VerifyContactStatusBulkUpdate", "Enter Company name"); office_ContactsHelper.TypeText("CompanyName", comp); executionLog.Log("VerifyContactStatusBulkUpdate", "Select Status"); office_ContactsHelper.selectByText("Status", "Active"); executionLog.Log("VerifyContactStatusBulkUpdate", "Click on Save button"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Navigate to All Contacts page"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Search by contact name and company"); var name = "Automation " + last_name; office_ContactsHelper.TypeText("SearchName", name); office_ContactsHelper.WaitForWorkAround(1000); office_ContactsHelper.TypeText("SearchCompanyName", comp); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Select check box"); office_ContactsHelper.ClickElement("SelectIstContact"); executionLog.Log("VerifyContactStatusBulkUpdate", "Click on Bulk Update"); office_ContactsHelper.ClickElement("BulkUpdate"); office_ContactsHelper.Click("//div[@title='Bulk Update']/ul/li[3]/a"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyContactStatusBulkUpdate", "Select Status"); office_ContactsHelper.selectByText("BU_Status", "Inactive"); executionLog.Log("VerifyContactStatusBulkUpdate", "Click on Update button"); office_ContactsHelper.ClickElement("BU_StatusUpdate"); office_ContactsHelper.AcceptAlert(); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Search by contact name and company"); office_ContactsHelper.TypeText("SearchName", name); office_ContactsHelper.WaitForWorkAround(1000); office_ContactsHelper.TypeText("SearchCompanyName", comp); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Open contact"); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusBulkUpdate", "Verify Status updated"); Assert.AreEqual(office_ContactsHelper.GetText("//div[@id='status']"), "Inactive"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyContactStatusBulkUpdate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Contact Status Bulk Update"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Contact Status Bulk Update", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Contact Status Bulk Update"); TakeScreenshot("VerifyContactStatusBulkUpdate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactStatusBulkUpdate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyContactStatusBulkUpdate"); string id = loginHelper.getIssueID("Verify Contact Status Bulk Update"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactStatusBulkUpdate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Contact Status Bulk Update"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Contact Status Bulk Update"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyContactStatusBulkUpdate"); executionLog.WriteInExcel("Verify Contact Status Bulk Update", Status, JIRA, "Contact Management"); } }
public void verifyQuickLookLabelsForContacts() { 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_ContactsHelper = new Office_ContactsHelper(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); var ContactImport = GetPathToFile() + "contactsamples.csv"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyQuickLookLabelsForContacts", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyQuickLookLabelsForContacts", "Goto Create Contact"); VisitOffice("contacts/create"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on Cancel Button"); office_ContactsHelper.ClickElement("Cancelbtn"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify text on page."); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Redirect at create contacts page."); VisitOffice("contacts/create"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Enter First name."); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("VerifyQuickLookLabelsForContacts", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("VerifyQuickLookLabelsForContacts", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on Save Contact"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); // executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify Confirmation"); //office_ContactsHelper.WaitForText("A Contact has been created.", 30); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on any contact."); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact type."); office_ContactsHelper.VerifyText("Type", "Select Type"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact Status."); office_ContactsHelper.VerifyText("StatusV", "Active"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact source."); office_ContactsHelper.VerifyText("Source", "Select Source"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact category."); office_ContactsHelper.VerifyText("CategoryLabel", "Select Category"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact responsibility."); office_ContactsHelper.VerifyText("ResponsibilityV", "Howard Tang"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify label for contact sales manager."); office_ContactsHelper.VerifyText("SalesManagerLabel", "Select Sales Manager"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on edit button."); office_ContactsHelper.ClickElement("EditLink"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify page title as edit contact"); VerifyTitle("Edit Contact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select contact type."); office_ContactsHelper.selectByText("SelectType", "Client Owner"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select contact source."); office_ContactsHelper.selectByText("SelectSource", "Web Site"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select contact category."); office_ContactsHelper.selectByText("SelectCategory", "Personal"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select contact responsibility."); office_ContactsHelper.selectByText("Responsibility", "Howard Tang"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select contact sales manager."); office_ContactsHelper.selectByText("SalesManager", "Howard Tang"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on save contact."); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify title as contacts."); VerifyTitle("Contacts"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for type."); office_ContactsHelper.VerifyText("Type", "Client Owner"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for status."); office_ContactsHelper.VerifyText("StatusV", "Active"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for source."); office_ContactsHelper.VerifyText("Source", "Web Site"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for category."); office_ContactsHelper.VerifyText("CategoryLabel", "Personal"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for responsibility."); office_ContactsHelper.VerifyText("ResponsibilityV", "Howard Tang"); //office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Verify contact label for sales manager."); office_ContactsHelper.VerifyText("SalesManagerLabel", "Howard Tang"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Goto Contact"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Search Contact by company name"); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Select 'All' in Responsbitiy field"); office_ContactsHelper.SelectByText("ResponsibiltyField", "All"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Check the First Checkbox"); office_ContactsHelper.ClickElement("CheckTheFirstContact"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Click on Delete Icon"); office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); office_ContactsHelper.AcceptAlert(); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyQuickLookLabelsForContacts", "Confrimation"); office_ContactsHelper.WaitForText("records deleted successfully", 10); executionLog.Log("VerifyQuickLookLabelsForContacts", "Goto Contact Recycle Bin"); VisitOffice("contacts/recyclebin"); executionLog.Log("VerifyQuickLookLabelsForContacts", "Delete Icon"); office_ContactsHelper.ClickElement("ClickOnDeleteIconRCBin"); office_ContactsHelper.AcceptAlert(); executionLog.Log("VerifyQuickLookLabelsForContacts", "Confiration"); office_ContactsHelper.WaitForText("Contact Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyQuickLookLabelsForContacts"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyQuickLookLabelsForContacts"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyQuickLookLabelsForContacts", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("VerifyQuickLookLabelsForContacts"); TakeScreenshot("VerifyQuickLookLabelsForContacts"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyQuickLookLabelsForContacts"); string id = loginHelper.getIssueID("VerifyQuickLookLabelsForContacts"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyQuickLookLabelsForContacts"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyQuickLookLabelsForContacts"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyQuickLookLabelsForContacts"); executionLog.WriteInExcel("VerifyQuickLookLabelsForContacts", Status, JIRA, "Contact Management"); } }
public void verifyContactStatusOfTaskUnderContactHistory() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); var officeActivities_TasksHelper = new OfficeActivities_TasksHelper(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("VerifyContactStatusOfTaskUnderContactHistory", "Login with valid credentials"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Goto Contact"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Click on a contact"); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Observe Contact Status"); var status = office_ContactsHelper.GetText("//div[@id='status']"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Click Create New(Task/Meeting) button"); office_ContactsHelper.ClickElement("CreateNewTMBtn"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Click Task Option"); office_ContactsHelper.ClickElement("TaskOption"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Enter Subject of task"); officeActivities_TasksHelper.TypeText("Subject", Subject); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Enter Start Date of task"); officeActivities_TasksHelper.TypeText("StartDate", "17/11/2017"); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Enter End Date of task"); officeActivities_TasksHelper.TypeText("DueDate", "17/11/2017"); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Click on Save button"); officeActivities_TasksHelper.ClickElement("Save"); officeActivities_TasksHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Select Activity Type >> Tasks"); office_ContactsHelper.SelectByText("SelectActivityType", "Tasks"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Search Task by name"); office_ContactsHelper.TypeText("SearchActivity", Subject); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyContactStatusOfTaskUnderContactHistory", "Verify Contact Status is appearing"); office_ContactsHelper.VerifyText("FirstActvtyCntctStatus", status); Console.WriteLine("Contact Status is appearing in front of task under Contact History " + status); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyContactStatusOfTaskUnderContactHistory"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Contact Status Of Task Under Contact History"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Contact Status Of Task Under Contact History", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Contact Status Of Task Under Contact History"); TakeScreenshot("VerifyContactStatusOfTaskUnderContactHistory"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactStatusOfTaskUnderContactHistory.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyContactStatusOfTaskUnderContactHistory"); string id = loginHelper.getIssueID("Verify Contact Status Of Task Under Contact History"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactStatusOfTaskUnderContactHistory.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Contact Status Of Task Under Contact History"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Contact Status Of Task Under Contact History"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyContactStatusOfTaskUnderContactHistory"); executionLog.WriteInExcel("Verify Contact Status Of Task Under Contact History", Status, JIRA, "Office Contacts"); } }
public void contactEaddressLabelAndTypeIssue() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Fname" + RandomNumber(1, 999); var LName = "Lname" + RandomNumber(1, 999); var CDBA = "Comp" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Goto Contact page"); VisitOffice("contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify title"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Goto Create Contact"); VisitOffice("contacts/create"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify Page title."); VerifyTitle("Create a Contact"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Select phone type"); office_ContactsHelper.Select("PhoneType1", "Work"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter phone number."); office_ContactsHelper.TypeText("PhoneNumber1", "1222121211"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter first email address."); office_ContactsHelper.TypeText("Eaddress", "*****@*****.**"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on add email."); office_ContactsHelper.ClickElement("AddEmail"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Select e adress type as email."); office_ContactsHelper.Select("EaddressType2", "E-Mail"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter second email."); office_ContactsHelper.TypeText("Eaddress2", "*****@*****.**"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on save button."); office_ContactsHelper.ClickElement("SaveContactN"); // Verifiews if existing overlay present then create duplicate contact. var duplicate = "//h3[text()='Existing Contacts']"; if (office_ContactsHelper.IsElementPresent(duplicate)) { office_ContactsHelper.WaitForWorkAround(2000); office_ContactsHelper.ClickElement("DuplicateRadio"); office_ContactsHelper.WaitForWorkAround(2000); office_ContactsHelper.ClickElement("ClickOnDuplicate"); office_ContactsHelper.WaitForWorkAround(2000); } executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Wait for success message."); // office_ContactsHelper.WaitForText("A Contact has been created. . ", 10); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Redirect at contacts page."); VisitOffice("contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Search created contact by name."); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on edit icon."); office_ContactsHelper.ClickElement("EditContactNewSkin"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify page title."); VerifyTitle("Edit Contact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify dropdown label not changed."); office_ContactsHelper.VerifyDropdownLabel(); office_ContactsHelper.WaitForWorkAround(4000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify dropdown type not changed."); office_ContactsHelper.VerifyDropdownType(); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on save button."); office_ContactsHelper.ClickElement("SaveContactN"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Wait for success message."); // office_ContactsHelper.WaitForText("A Contact has been updated.", 10); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Redirect at contacts page."); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Wait for locator to present."); office_ContactsHelper.WaitForElementPresent("SearchCompany", 10); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter company name to searched."); office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Select first contact."); office_ContactsHelper.ClickElement("CheckTheFirstContact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on delete icon."); office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Accept alert message."); office_ContactsHelper.AcceptAlert(); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Wait for success message."); // office_ContactsHelper.WaitForText("1 records deleted successfully", 10); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Redirect at recyclebin page"); VisitOffice("contacts/recyclebin"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify page title."); VerifyTitle("Recycled Contacts"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter company name to be searched."); // office_ContactsHelper.TypeText("SearchCompany", CDBA); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on delete icon."); office_ContactsHelper.ClickElement("ClickOnDeleteIconRCBin"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Acccept alert message"); office_ContactsHelper.AcceptAlert(); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "wait for successa message."); // office_ContactsHelper.WaitForText("Contact Permanently Deleted.", 10); office_ContactsHelper.WaitForWorkAround(2000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ContactPrimaryPhoneAndExistingOverlay"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("ContactPrimaryPhoneAndExistingOverlay"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("ContactPrimaryPhoneAndExistingOverlay", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); TakeScreenshot("ContactPrimaryPhoneAndExistingOverlay"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ContactPrimaryPhoneAndExistingOverlay"); string id = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ContactPrimaryPhoneAndExistingOverlay"); executionLog.WriteInExcel("ContactPrimaryPhoneAndExistingOverlay", Status, JIRA, "Contact Management"); } }
public void contactPrimaryPhoneAndExistingOverlay() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Fname" + RandomNumber(1, 999); var LName = "Lname" + RandomNumber(1, 999); var CDBA = "Comp" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Goto Contact"); VisitOffice("contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify title"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Goto Create Contact"); VisitOffice("contacts/create"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on Cancel Button"); office_ContactsHelper.ClickElement("Cancelbtn"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify text on page."); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Redirect at create contacts page."); VisitOffice("contacts/create"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Select phone type"); office_ContactsHelper.Select("PhoneType1", "Work"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter phone number."); office_ContactsHelper.TypeText("PhoneNumber1", "1222121211"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on add phone."); office_ContactsHelper.ClickElement("AddPhone"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Select phone type."); office_ContactsHelper.Select("PhoneType2", "Home"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Enter phone number."); office_ContactsHelper.TypeText("PhoneNumber2", "1222121211"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on radio button primary."); office_ContactsHelper.ClickElement("PrimaryRadio2"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on remove icon to remove phone."); office_ContactsHelper.ClickElement("RemovePhone"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Click on Save button."); office_ContactsHelper.ClickElement("SaveContactN"); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify alert for primary phone"); office_ContactsHelper.VerifyAlertText("please select a primary phone"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Accept alert message."); office_ContactsHelper.AcceptAlert(); executionLog.Log("ContactPrimaryPhoneAndExistingOverlay", "Verify that no exisitng contact overlay present."); Assert.IsFalse(office_ContactsHelper.IsElementPresent("ExistingContactOverlay")); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ContactPrimaryPhoneAndExistingOverlay"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("ContactPrimaryPhoneAndExistingOverlay"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("ContactPrimaryPhoneAndExistingOverlay", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); TakeScreenshot("ContactPrimaryPhoneAndExistingOverlay"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ContactPrimaryPhoneAndExistingOverlay"); string id = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Contact.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("ContactPrimaryPhoneAndExistingOverlay"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ContactPrimaryPhoneAndExistingOverlay"); executionLog.WriteInExcel("ContactPrimaryPhoneAndExistingOverlay", Status, JIRA, "Contact Management"); } }
public void mergeContact() { 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_ContactsHelper = new Office_ContactsHelper(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("MergeContact", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("MergeContact", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MergeContact", "Goto Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Veify Title Contact"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("MergeContact", "Goto Create Contact page."); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Click on Cancel"); office_ContactsHelper.ClickElement("Cancelbtn"); executionLog.Log("MergeContact", "Verify Title Contact"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Create Contact"); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("MergeContact", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("MergeContact", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("MergeContact", "Click Save Button"); office_ContactsHelper.ClickElement("SaveContactN"); executionLog.Log("MergeContact", "Wait for Confirmation"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Goto Create Contact"); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("MergeContact", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("MergeContact", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("MergeContact", "Save Contact"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); if (office_ContactsHelper.IsElementPresent("//h3[text()='Existing Contacts']")) { executionLog.Log("MergeContact", "Click on Dublicate"); office_ContactsHelper.ClickElement("ClickOnDuplicate"); executionLog.Log("MergeContact", "Confirmation"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Visit Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Select 1st contact"); office_ContactsHelper.ClickElement("SelectIstContact"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Select 2nd contact"); office_ContactsHelper.ClickElement("Select2ndContact"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Click on merge records."); office_ContactsHelper.ClickElement("MergeRecordContact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("MergeContact", "Select Primary Contact."); office_ContactsHelper.ClickElement("SelectCompContact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("MergeContact", "Click On Merge"); office_ContactsHelper.ClickElement("ClickOnMergeBtn"); office_ContactsHelper.AcceptAlert(); executionLog.Log("MergeContact", "Wait for success message."); office_ContactsHelper.WaitForText("Merging Contact(s) Completed Successfully.", 10); } else { executionLog.Log("MergeContact", "Wait for Confirmatoion"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Visist Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Select 1st Contact"); office_ContactsHelper.ClickElement("SelectIstContact"); executionLog.Log("MergeContact", "Select 2nd Contact"); office_ContactsHelper.ClickElement("Select2ndContact"); executionLog.Log("MergeContact", "Merge Record Contact"); office_ContactsHelper.ClickElement("MergeRecordContact"); executionLog.Log("MergeContact", "Select Comp Contact"); office_ContactsHelper.ClickElement("SelectCompContact"); executionLog.Log("MergeContact", "Click on Merge Button"); office_ContactsHelper.ClickElement("ClickOnMergeBtn"); office_ContactsHelper.AcceptAlert(); executionLog.Log("MergeContact", "Wait for Confirmation"); office_ContactsHelper.WaitForText("Merging Contact(s) Completed Successfully.", 10); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MergeContact"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("MergeContact"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("MergeContact", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("MergeContact"); TakeScreenshot("MergeContact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Merge.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MergeContact"); string id = loginHelper.getIssueID("MergeContact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Merge.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("MergeContact"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("MergeContact"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MergeContact"); executionLog.WriteInExcel("MergeContact", Status, JIRA, "Office Contact"); } }
public void verifyingContactValidationMessage() { 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_ContactsHelper = new Office_ContactsHelper(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 = "NewComp" + RandomNumber(1, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyingContactValidationMessage", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyingContactValidationMessage", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyingContactValidationMessage", "Reditect at contact page."); VisitOffice("contacts"); executionLog.Log("VerifyingContactValidationMessage", "Verify title"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("VerifyingContactValidationMessage", "Reditect at create contact page."); VisitOffice("contacts/create"); executionLog.Log("VerifyingContactValidationMessage", "First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("VerifyingContactValidationMessage", "Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("VerifyingContactValidationMessage", "Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyingContactValidationMessage", "Select Eadress type"); office_ContactsHelper.Select("EaddressType", "E-Mail"); executionLog.Log("VerifyingContactValidationMessage", "Enter Eadress"); office_ContactsHelper.TypeText("Eaddress", "*****@*****.**"); executionLog.Log("VerifyingContactValidationMessage", "Cliclk Add email button"); office_ContactsHelper.ClickElement("AddEmail"); executionLog.Log("VerifyingContactValidationMessage", "Select EAddress type"); office_ContactsHelper.Select("EaddressType2", "E-Mail"); executionLog.Log("VerifyingContactValidationMessage", "Enter eAddress"); office_ContactsHelper.TypeText("Eaddress2", "*****@*****.**"); executionLog.Log("VerifyingContactValidationMessage", "Select Second email as primary"); office_ContactsHelper.Click("//input[@name='data[ContactElectronicAddress][1][primary]']"); executionLog.Log("VerifyingContactValidationMessage", "Remove Second Email"); office_ContactsHelper.ClickElement("RemoveEmailIcon"); executionLog.Log("VerifyingContactValidationMessage", "Click on savw button"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(4000); executionLog.Log("VerifyingContactValidationMessage", "Verify the validation message"); office_ContactsHelper.VerifyAlertText("please select a primary email"); executionLog.Log("VerifyingContactValidationMessage", "Accept alert"); office_ContactsHelper.AcceptAlert(); executionLog.Log("VerifyingContactValidationMessage", " Verify user is redirected to create page"); VerifyTitle("Create a Contact"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyingContactValidationMessage"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyingContactValidationMessage"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("VerifyingContactValidationMessage", "Bug", "Medium", "Create Contact page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("VerifyingContactValidationMessage"); TakeScreenshot("VerifyingContactValidationMessage"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingContactValidationMessage.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyingContactValidationMessage"); string id = loginHelper.getIssueID("VerifyingContactValidationMessage"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyingContactValidationMessage.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyingContactValidationMessage"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyingContactValidationMessage"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyingContactValidationMessage"); executionLog.WriteInExcel("VerifyingContactValidationMessage", Status, JIRA, "Contact Management"); } }
public void verifyRemarkBtnInContacts() { 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_ContactsHelper = new Office_ContactsHelper(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 = "NewComp" + RandomNumber(1, 99999); String JIRA = ""; String Status = "Pass"; //try //{ executionLog.Log("VerifyRemarkBtnInContacts", "Login with valid credentials"); Login(username[0], password[0]); executionLog.Log("VerifyRemarkBtnInContacts", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyRemarkBtnInContacts", "Redirect to contact page."); VisitOffice("contacts"); executionLog.Log("VerifyRemarkBtnInContacts", "Verify title"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("VerifyRemarkBtnInContacts", "Reditect to create contact page."); VisitOffice("contacts/create"); executionLog.Log("VerifyRemarkBtnInContacts", "First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("VerifyRemarkBtnInContacts", "Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("VerifyRemarkBtnInContacts", "Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("VerifyRemarkBtnInContacts", "Click on Add Remark button"); office_ContactsHelper.ClickElement("AddRemarkPhnBtn1"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyRemarkBtnInContacts", "Enter Remark"); office_ContactsHelper.TypeText("AddRemarkPhnArea1", "THIS IS PHONE REMARK"); executionLog.Log("VerifyRemarkBtnInContacts", "Click Add Remark button"); office_ContactsHelper.ClickElement("AddRemarkEmailBtn1"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyRemarkBtnInContacts", "Enter Remark"); office_ContactsHelper.TypeText("AddRemarkEmailArea1", "THIS IS EMAIL REMARK"); executionLog.Log("VerifyRemarkBtnInContacts", "Click on Save button"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyRemarkBtnInContacts", "Enter Contact Name in Search Box"); office_ContactsHelper.TypeText("SearchName", FName); office_ContactsHelper.WaitForWorkAround(4000); executionLog.Log("VerifyRemarkBtnInContacts", "Click on Edit icon"); office_ContactsHelper.ClickElement("FirstEditIcon"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("VerifyRemarkBtnInContacts", "Verify Show Remark text for Phone"); office_ContactsHelper.VerifyText("AddRemarkPhnBtn1", "Show remark"); Console.WriteLine("Show Remark is appearing for Phone"); executionLog.Log("VerifyRemarkBtnInContacts", "Verify Show Remark text for Email"); office_ContactsHelper.VerifyText("AddRemarkEmailBtn1", "Show remark"); Console.WriteLine("Show Remark is appearing for Email"); executionLog.Log("VerifyRemarkBtnInContacts", "Redirect to contact page."); VisitOffice("contacts"); executionLog.Log("VerifyRemarkBtnInContacts", "Enter Contact Name in Search Box"); office_ContactsHelper.TypeText("SearchName", FName); office_ContactsHelper.WaitForWorkAround(4000); executionLog.Log("VerifyRemarkBtnInContacts", "Click on check box"); office_ContactsHelper.ClickElement("SelectIstContact"); executionLog.Log("VerifyRemarkBtnInContacts", "Click on Delete button"); office_ContactsHelper.ClickElement("ClickOnDeleteIcon"); //} //catch (Exception e) //{ //} }