public void verifyContactsAdvanceFilerColumnOrder() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); // Variable Random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(5000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of company name column."); office_ContactsHelper.IsElementPresent("HeadCompany"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of contact column."); office_ContactsHelper.IsElementPresent("HeadContact"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of phone column."); office_ContactsHelper.IsElementPresent("HeadPhone"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of email column."); office_ContactsHelper.IsElementPresent("HeadEmail"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select company in displayed columns."); office_ContactsHelper.SelectByText("DisplayedCols", "Company"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols."); office_ContactsHelper.ClickElement("RemoveCols"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select contact in displayed columns."); office_ContactsHelper.SelectByText("DisplayedCols", "Contact Type"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ContactsHelper.ClickElement("RemoveCols"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select phone in displayed columns."); office_ContactsHelper.SelectByText("DisplayedCols", "Phone"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ContactsHelper.ClickElement("RemoveCols"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select email in displayed columns."); office_ContactsHelper.SelectByText("DisplayedCols", "E-Mail"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols"); office_ContactsHelper.ClickElement("RemoveCols"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify company name not present on page."); office_ContactsHelper.IsElementNotPresent("HeadCompany"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify contact name not present on page."); office_ContactsHelper.IsElementNotPresent("HeadContact"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify phone not present on page."); office_ContactsHelper.IsElementNotPresent("HeadPhone"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify email not present on page."); office_ContactsHelper.IsElementNotPresent("HeadEmail"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Redirect at leads page."); VisitOffice("leads"); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify page title as leads."); VerifyTitle("Leads"); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Redirect at clients page."); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify page title as clients"); VerifyTitle("Contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of phone column."); office_ContactsHelper.IsElementPresent("HeadPhone5"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify default position of email column."); office_ContactsHelper.IsElementPresent("HeadEmail4"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Redirect at merchants page."); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select phone in displayed column."); office_ContactsHelper.SelectByText("DisplayedCols", "Phone"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Move phone 1 step up."); office_ContactsHelper.ClickElement("MoveUp"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Move phone 1 step up."); office_ContactsHelper.ClickElement("MoveUp"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Select email in displayed column."); office_ContactsHelper.SelectByText("DisplayedCols", "E-Mail"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Move email 1 step down."); office_ContactsHelper.ClickElement("MoveDown"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify changed position of phone column."); office_ContactsHelper.IsElementPresent("HeadPhone2"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Verify changed position of email column."); office_ContactsHelper.IsElementPresent("HeadEmail5"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyContactsAdvanceFilerColumnOrder", "Logout from the application."); VisitCorp("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyContactsAdvanceFilerColumnOrder"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Contacts Advance Filer Column Order"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Contacts Advance Filer Column Order", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Contacts Advance Filer Column Order"); TakeScreenshot("VerifyContactsAdvanceFilerColumnOrder"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactsAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyContactsAdvanceFilerColumnOrder"); string id = loginHelper.getIssueID("Verify Contacts Advance Filer Column Order"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyContactsAdvanceFilerColumnOrder.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Contacts Advance Filer Column Order"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Contacts Advance Filer Column Order"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyContactsAdvanceFilerColumnOrder"); executionLog.WriteInExcel("Verify Contacts Advance Filer Column Order", Status, JIRA, "Opportunities 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 contactsAdvanceFilterActivities() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; //try //{ executionLog.Log("ContactsAdvanceFilterActivities", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ContactsAdvanceFilterActivities", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); // Verify leads with notes. executionLog.Log("ContactsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("ContactsAdvanceFilterActivities", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on show activiities button."); office_ContactsHelper.CheckAndClick("ShowActivities"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactsAdvanceFilterActivities", "Selct contact activity type."); office_ContactsHelper.ClickElement("ContactWithNotes"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on any contact."); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Select actitivity type as notes."); office_ContactsHelper.SelectByText("SelectActivityType", "Notes"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Select All in created by field"); office_ContactsHelper.selectByText("CreatedByField", "All"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify notes present for contact."); office_ContactsHelper.WaitForElementVisible("NotesContacts", 10); // Verify contacts with open tasks. executionLog.Log("ContactsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Contacts"); //office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on show activiities button."); office_ContactsHelper.CheckAndClick("ShowActivities"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactsAdvanceFilterActivities", "Selct contact activity type."); office_ContactsHelper.ClickElement("ContactWithTask"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on any contact."); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Select actitivity type as notes."); office_ContactsHelper.SelectByText("SelectActivityType", "Tasks"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Select All in created by field"); office_ContactsHelper.selectByText("CreatedByField", "All"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify notes present for contact."); office_ContactsHelper.WaitForElementVisible("TasksContacts", 10); // Verify contacts with closed tasks. //executionLog.Log("ContactsAdvanceFilterActivities", "Redirect To URL"); //VisitOffice("contacts"); //office_ContactsHelper.WaitForWorkAround(3000); //executionLog.Log("ContactsAdvanceFilterActivities", "Verify page title."); //VerifyTitle("Contacts"); //executionLog.Log("ContactsAdvanceFilterActivities", "Click on advance filter."); //office_ContactsHelper.ClickElement("AdvanceFilter"); //office_ContactsHelper.WaitForWorkAround(2000); //executionLog.Log("ContactsAdvanceFilterActivities", "Click on show activiities button."); //office_ContactsHelper.CheckAndClick("ShowActivities"); //office_ContactsHelper.WaitForWorkAround(1000); //executionLog.Log("ContactsAdvanceFilterActivities", "Selct contact activity type."); //office_ContactsHelper.ClickElement("ContactsWithCLosedTasks"); ////office_ContactsHelper.WaitForWorkAround(3000); //executionLog.Log("ContactsAdvanceFilterActivities", "Click on apply button."); //office_ContactsHelper.ClickElement("Apply"); //office_ContactsHelper.WaitForWorkAround(3000); //executionLog.Log("ContactsAdvanceFilterActivities", "Click on any contact."); //office_ContactsHelper.ClickElement("Contact1"); //office_ContactsHelper.WaitForWorkAround(3000); //executionLog.Log("ContactsAdvanceFilterActivities", "Select actitivity type as notes."); //office_ContactsHelper.SelectByText("SelectActivityType", "Tasks"); //office_ContactsHelper.WaitForWorkAround(2000); //executionLog.Log("ContactsAdvanceFilterActivities", "Select All in created by field"); //office_ContactsHelper.selectByText("CreatedByField", "All"); //office_ContactsHelper.WaitForWorkAround(2000); //executionLog.Log("ContactsAdvanceFilterActivities", "Verify notes present for contact."); //office_ContactsHelper.WaitForElementVisible("TasksContacts", 10); // Verify contacts with documents. executionLog.Log("ContactsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Contacts"); //office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on show activiities button."); office_ContactsHelper.CheckAndClick("ShowActivities"); office_ContactsHelper.WaitForWorkAround(4000); executionLog.Log("ContactsAdvanceFilterActivities", "Selct contact activity type."); office_ContactsHelper.ClickElement("ContactWithDocs"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on any contact."); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Select actitivity type as notes."); office_ContactsHelper.SelectByText("SelectActivityType", "Documents"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Select All in created by field"); office_ContactsHelper.selectByText("CreatedByField", "All"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify notes present for contact."); office_ContactsHelper.WaitForElementVisible("DOcumentsContacts", 10); // Verify contacts with emails. executionLog.Log("ContactsAdvanceFilterActivities", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("ContactsAdvanceFilterActivities", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on show activiities button."); office_ContactsHelper.CheckAndClick("ShowActivities"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("ContactsAdvanceFilterActivities", "Selct contact activity type."); office_ContactsHelper.ClickElement("ContactWithEmails"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Click on any contact."); office_ContactsHelper.ClickElement("Contact1"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterActivities", "Select actitivity type as notes."); office_ContactsHelper.SelectByText("SelectActivityType", "E-Mails"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Select All in created by field"); office_ContactsHelper.selectByText("CreatedByField", "All"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterActivities", "Verify notes present for contact."); office_ContactsHelper.WaitForElementVisible("EmailsContacts", 10); //office_ContactsHelper.WaitForWorkAround(3000); //} //catch (Exception e) //{ // executionLog.Log("Error", e.StackTrace); // Status = "Fail"; // String counter = executionLog.readLastLine("counter"); // String Description = executionLog.GetAllTextFile("ContactsAdvanceFilterActivities"); // String Error = executionLog.GetAllTextFile("Error"); // Console.WriteLine(Error); // if (counter == "") // { // counter = "0"; // } // bool result = loginHelper.CheckExstingIssue("Contacts Advance Filter Activities"); // if (!result) // { // if (Int16.Parse(counter) < 9) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // loginHelper.CreateIssue("Contacts 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("Contacts Advance Filter Activities"); // TakeScreenshot("ContactsAdvanceFilterActivities"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\ContactsAdvanceFilterActivities.png"; // loginHelper.AddAttachment(location, id); // } // } // else // { // if (Int16.Parse(counter) < 9) // { // executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); // TakeScreenshot("ContactsAdvanceFilterActivities"); // string id = loginHelper.getIssueID("Contacts Advance Filter Activities"); // string directoryName = loginHelper.GetnewDirectoryName(GetPath()); // var location = directoryName + "\\ContactsAdvanceFilterActivities.png"; // loginHelper.AddAttachment(location, id); // loginHelper.AddComment(loginHelper.getIssueID("Contacts Advance Filter Activities"), "This issue is still occurring"); // } // } // JIRA = loginHelper.getIssueID("Contacts Advance Filter Activities"); // // executionLog.DeleteFile("Error"); // throw; //} //finally //{ // executionLog.DeleteFile("ContactsAdvanceFilterActivities"); // executionLog.WriteInExcel("Contacts Advance Filter Activities", Status, JIRA, "Opportunities 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 contactsAdvanceFilterResultsPP() { 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_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ContactsAdvanceFilterResultsPP", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ContactsAdvanceFilterResultsPP", "Redirect To URL"); VisitOffice("contacts"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify page title."); VerifyTitle("Contacts"); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Select number of records to 10."); office_ContactsHelper.SelectByText("ResultsPerPage", "10"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify number of records displayed."); office_ContactsHelper.VerifyText("No.ofResults", "Showing 1 - 10 of"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Select number of records to 20."); office_ContactsHelper.SelectByText("ResultsPerPage", "20"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify number of records displayed."); office_ContactsHelper.VerifyText("No.ofResults", "Showing 1 - 20 of"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Select number of records to 50."); office_ContactsHelper.SelectByText("ResultsPerPage", "50"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify number of records displayed."); office_ContactsHelper.VerifyText("No.ofResults", "Showing 1 - 50 of"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on advance filter."); office_ContactsHelper.ClickElement("AdvanceFilter"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Select number of records to 100."); office_ContactsHelper.SelectByText("ResultsPerPage", "100"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Click on apply button."); office_ContactsHelper.ClickElement("Apply"); office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Verify number of records displayed."); office_ContactsHelper.VerifyText("No.ofResults", "Showing 1 - 100 of"); //office_ContactsHelper.WaitForWorkAround(3000); executionLog.Log("ContactsAdvanceFilterResultsPP", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ContactsAdvanceFilterResultsPP"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Clients Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Clients Advance Filter ResultsPP", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); TakeScreenshot("ContactsAdvanceFilterResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ContactsAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ContactsAdvanceFilterResultsPP"); string id = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ContactsAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Clients Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Clients Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ContactsAdvanceFilterResultsPP"); executionLog.WriteInExcel("Clients Advance Filter ResultsPP", Status, JIRA, "Opportunities Management"); } }