public void verifyMeetingLabelSelectCategory()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            // Random Variables
            String JIRA   = "";
            String Status = "Pass";

            //          try
            //        {
            executionLog.Log("VerifyMeetingLabelSelectCategory", "Login with valid username and password");
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Verify Page title");
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Click on Activities >> Meetings");
            VisitOffice("meetings");

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Verify Page title meetings");
            VerifyTitle("Meetings");

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Click on any meeting");
            officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
            officeActivities_MeetingHelper.WaitForWorkAround(1000);

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Click on category to edit category.");
            officeActivities_MeetingHelper.DblClick("CategoryLabel");

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Click on save button.");
            officeActivities_MeetingHelper.ClickElement("SaveCategory");

            executionLog.Log("VerifyMeetingLabelSelectCategory", "Verify category label text select category.");
            officeActivities_MeetingHelper.VerifyText("CategoryLabel", "Select Category");
        }
        public void activitiesMeetingsManagement()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());
            var office_ClientsHelper           = new Office_ClientsHelper(GetWebDriver());
            var office_LeadsHelper             = new Office_LeadsHelper(GetWebDriver());
            var office_OpportunitiesHelper     = new Office_OpportunitiesHelper(GetWebDriver());
            var ticket_CreateATicketHelper     = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Random Variables.
            var    Subject = "Meeting" + GetRandomNumber();
            var    file    = GetPathToFile() + "2.pdf";
            String JIRA    = "";
            String Status  = "Pass";

            try
            {
                executionLog.Log("ActivitiesMeetingsManagement", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("ActivitiesMeetingsManagement", "Go to create meetings page");
                VisitOffice("meetings/create");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify page title.");
                VerifyTitle("Create a Meeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required.");

                executionLog.Log("ActivitiesMeetingsManagement", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required.");

                executionLog.Log("ActivitiesMeetingsManagement", "Enter Subject for the meeting");
                officeActivities_MeetingHelper.TypeText("Subject", Subject);

                executionLog.Log("ActivitiesMeetingsManagement", "Enter location of meeting.");
                officeActivities_MeetingHelper.TypeText("Location", "Test Location");

                executionLog.Log("ActivitiesMeetingsManagement", "Enter start date.");
                officeActivities_MeetingHelper.TypeText("StartDate", "12/30/2016");

                executionLog.Log("ActivitiesMeetingsManagement", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "12/22/2016");

                executionLog.Log("ActivitiesMeetingsManagement", "Select Related To");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on client for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time.");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesMeetingsManagement", "Enter start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "12/22/2016");

                executionLog.Log("ActivitiesMeetingsManagement", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "12/30/2016");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "verify page text");
                officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10);

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at clients page.");
                VisitOffice("clients");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on any client.");
                office_ClientsHelper.ClickElement("Client1");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings.");
                office_ClientsHelper.Select("SelectActivityType", "Meetings");
                office_ClientsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Enter ticket name to be search.");
                office_ClientsHelper.TypeText("ActivitySubject", Subject);
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify created meeting present on client page.");
                office_ClientsHelper.IsElementPresent("OpenFirstActivity");

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page.");
                VisitOffice("meetings");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "select all in  owner fiedld");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit");
                officeActivities_MeetingHelper.ClickElement("Edit");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify page title.");
                VerifyTitle("Edit Meeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Select meeting parent as lead");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Lead");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on lead for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Edit end Date");
                officeActivities_MeetingHelper.TypeText("EndDate", "1/1/2017");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "Wait for updation success.");
                officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10);

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at leads page.");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On any lead.");
                office_LeadsHelper.ClickElement("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings.");
                office_LeadsHelper.Select("SelectActivityType", "Meetings");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Enter meeting name to be search.");
                office_LeadsHelper.TypeText("ActivitySubject", Subject);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify created meeting present on leads page.");
                office_LeadsHelper.IsElementPresent("ClickNotes1");

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page.");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "select all in  owner fiedld");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit");
                officeActivities_MeetingHelper.ClickElement("Edit");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify page title.");
                VerifyTitle("Edit Meeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Select parent type to opportunity");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Opportunity");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on opportunity for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "Wait for updation success message.");
                officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10);

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at opportunities page.");
                VisitOffice("opportunities");
                office_OpportunitiesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On any opportunity.");
                office_OpportunitiesHelper.ClickElement("Opportunities1");
                office_OpportunitiesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings");
                office_LeadsHelper.Select("SelectActivityType", "Meetings");
                office_OpportunitiesHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Enter meeting name to be search.");
                office_OpportunitiesHelper.TypeText("ActivitySubject", Subject);
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify created opportunity present on opportunity page");
                office_OpportunitiesHelper.IsElementPresent("OpenOpportunity");

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page.");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "select all in  owner fiedld");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on Edit");
                officeActivities_MeetingHelper.ClickElement("Edit");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Verify page title.");
                VerifyTitle("Edit Meeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Select parent type for meeting.");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Ticket");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on ticket for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesMeetingsManagement", "Wait for success message.");
                officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10);

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at tickets page.");
                VisitOffice("tickets");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On any ticket.");
                ticket_CreateATicketHelper.ClickElement("Ticket1");

                executionLog.Log("ActivitiesMeetingsManagement", "Select actitivity type as meetings");
                office_LeadsHelper.Select("SelectActivityType", "Meetings");

                executionLog.Log("ActivitiesMeetingsManagement", "Enter ticket name to be search.");
                office_OpportunitiesHelper.TypeText("ActivitySubject", Subject);
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on ticket to view details");
                ticket_CreateATicketHelper.IsElementPresent("OpenTicket");

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at meetings page.");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "select all in  owner fiedld");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesMeetingsManagement", "Click on the meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Click On Cance meeting.");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesMeetingsManagement", "Redirect at recycle bin.");
                VisitOffice("meetings/recyclebin");

                executionLog.Log("ActivitiesMeetingsManagement", "Verify page title");
                VerifyTitle("Recycled Meeting");

                executionLog.Log("ActivitiesMeetingsManagement", "Search meeting by name.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "select all in  owner fiedld");
                officeActivities_MeetingHelper.SelectByText("OwnerField", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesMeetingsManagement", "Wait for delete icon to be present.");
                officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10);

                executionLog.Log("ActivitiesMeetingsManagement", "Click On delete icon");
                officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently");

                executionLog.Log("ActivitiesMeetingsManagement", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesMeetingsManagement", "Verify text.");
                officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ActivitiesMeetingsManagement");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Activities Meetings Management");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Activities Meetings Management", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Activities Meetings Management");
                        TakeScreenshot("ActivitiesMeetingsManagement");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesMeetingsManagement.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ActivitiesMeetingsManagement");
                        string id            = loginHelper.getIssueID("Activities Meetings Management");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesMeetingsManagement.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Activities Meetings Management"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Activities Meetings Management");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ActivitiesMeetingsManagement");
                executionLog.WriteInExcel("Activities Meetings Management", Status, JIRA, "Office Activities");
            }
        }
        public void editMeetingdeleteFileSave()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            // Variable
            var    Filename = GetPathToFile() + "index.jpg";
            String JIRA     = "";
            String Status   = "Pass";

            try
            {
                executionLog.Log("EditMeetingdeleteFileSave", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("EditMeetingdeleteFileSave", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("EditMeetingdeleteFileSave", "Click On Admin");
                VisitOffice("admin");

                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(5000);

                executionLog.Log("EditMeetingdeleteFileSave", "Verify title");
                VerifyTitle("Meetings");

                executionLog.Log("EditMeetingdeleteFileSave", "Click on Edit");
                officeActivities_MeetingHelper.ClickElement("Edit");
                officeActivities_MeetingHelper.WaitForWorkAround(5000);

                executionLog.Log("EditMeetingdeleteFileSave", "Verify page title.");
                VerifyTitle("Edit Meeting");

                executionLog.Log("EditMeetingdeleteFileSave", "Click on add attachment");
                officeActivities_MeetingHelper.ClickElement("AddAttachment");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("EditMeetingdeleteFileSave", "Upload File ");
                officeActivities_MeetingHelper.Upload("File_Upload", Filename);

                executionLog.Log("EditMeetingdeleteFileSave", "Enter attachment name.");
                officeActivities_MeetingHelper.TypeText("AttachName", "New Subject");

                executionLog.Log("EditMeetingdeleteFileSave", "Remove the uploaded file.");
                officeActivities_MeetingHelper.ClickElement("RemoveAttach");

                executionLog.Log("EditMeetingdeleteFileSave", "Click on save button.");
                officeActivities_MeetingHelper.ClickElement("SaveAttachment");
                officeActivities_MeetingHelper.WaitForWorkAround(5000);

                executionLog.Log("EditMeetingdeleteFileSave", "Verify validation text.");
                officeActivities_MeetingHelper.VerifyText("Attachmenterror", "This field is required.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditMeetingdeleteFileSave");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit Meeting delete File Save");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Edit Meeting delete File Save", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit Meeting delete File Save");
                        TakeScreenshot("EditMeetingdeleteFileSave");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditMeetingdeleteFileSave.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditMeetingdeleteFileSave");
                        string id            = loginHelper.getIssueID("Edit Meeting delete File Save");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditMeetingdeleteFileSave.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit Meeting delete File Save"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit Meeting delete File Save");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditMeetingdeleteFileSave");
                executionLog.WriteInExcel("Edit Meeting delete File Save", Status, JIRA, "Office Activities");
            }
        }
        public void meetingsAdvanceFilterRelatedTo()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            // Variable
            var    DocName = "Test Exe" + GetRandomNumber();
            var    fileUpl = GetPathToFile() + "chrome.exe";
            String JIRA    = "";
            String Status  = "Pass";

            try
            {
                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify Page title");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");


                //Verify meeting with notes.

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Redirect To URL");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on advance filter.");
                officeActivities_MeetingHelper.ClickForce("AdvanceFilter");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Selct client with activity type.");
                officeActivities_MeetingHelper.ClickForce("MeetingWithNotes");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on apply button.");
                officeActivities_MeetingHelper.ClickForce("Apply");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on any meeting.");
                officeActivities_MeetingHelper.ClickForce("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify notes present for meeting.");
                officeActivities_MeetingHelper.IsElementPresent("//table[@class='table table-bordered']/tbody/tr[1]/td[6]/a");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                //Verify meeting with clients.

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Redirect To URL");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on advance filter.");
                officeActivities_MeetingHelper.ClickForce("AdvanceFilter");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Selct meeting related to clients");
                officeActivities_MeetingHelper.ClickForce("MeetingWithClients");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on apply button.");
                officeActivities_MeetingHelper.ClickForce("Apply");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify meeting present is related to clients.");
                officeActivities_MeetingHelper.VerifyText("MeetingClient", "Merchants");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                //Verify meeting with Leads.

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Redirect To URL");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on advance filter.");
                officeActivities_MeetingHelper.ClickForce("AdvanceFilter");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "click on meeting with activity type.");
                officeActivities_MeetingHelper.ClickForce("MeetingWithLeads");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on apply button.");
                officeActivities_MeetingHelper.ClickForce("Apply");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify meeting present is related to leads.");
                officeActivities_MeetingHelper.VerifyText("MeetingClient", "Leads");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                // Verify meeting with Opportunities .

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Redirect To URL");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on advance filter.");
                officeActivities_MeetingHelper.ClickForce("AdvanceFilter");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "click on meeting  with opportunities.");
                officeActivities_MeetingHelper.ClickForce("MeetingWithOpps");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on apply button.");
                officeActivities_MeetingHelper.ClickForce("Apply");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify meeting present is related to opportunities.");
                officeActivities_MeetingHelper.VerifyText("MeetingClient", "Opportunities");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                // Verify meeting with Attachments .

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Redirect To URL");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on advance filter.");
                officeActivities_MeetingHelper.ClickForce("AdvanceFilter");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Selct meeting with activity type.");
                officeActivities_MeetingHelper.ClickForce("MeetingWithAttach.");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on apply button.");
                officeActivities_MeetingHelper.ClickForce("Apply");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Click on any meeting.");
                officeActivities_MeetingHelper.ClickForce("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("MeetingsAdvanceFilteeRelatedTo", "Verify meeting contains documents.");
                officeActivities_MeetingHelper.IsElementPresent("//table[@class='table']/tbody/tr[1]/td[1]");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("MeetingsAdvanceFilteeRelatedTo");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Meetings Advance Filter RelatedTo");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Meetings Advance Filter RelatedTo", "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("Meetings Advance Filter RelatedTo");
                        TakeScreenshot("MeetingsAdvanceFilteeRelatedTo");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MeetingsAdvanceFilteeRelatedTo.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("MeetingsAdvanceFilteeRelatedTo");
                        string id            = loginHelper.getIssueID("Meetings Advance Filter RelatedTo");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MeetingsAdvanceFilteeRelatedTo.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Meetings Advance Filter RelatedTo"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Meetings Advance Filter RelatedTo");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("MeetingsAdvanceFilteeRelatedTo");
                executionLog.WriteInExcel("Meetings Advance Filter RelatedTo", Status, JIRA, "Opportunities Management");
            }
        }
        public void verifyMeetingsCreditsIssue()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            var Name = "Meeting" + RandomNumber(1, 500);
            // Variable
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("VerifyMeetingsCreditsIssue", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Verify Page title");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");

                executionLog.Log("VerifyMeetingsCreditsIssue", "Goto User Activities >> Meeting");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Create button");
                officeActivities_MeetingHelper.ClickElement("CreateMeetingBtn");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the subjecr Name");
                officeActivities_MeetingHelper.TypeText("Subject", Name);
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the Start Date");
                officeActivities_MeetingHelper.TypeText("StartDate", "06/06/2018");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Enter the End Date");
                officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2018");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Select related to");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Select button");
                officeActivities_MeetingHelper.ClickElement("SelectBtn");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Select the client");
                officeActivities_MeetingHelper.ClickElement("SelectClient");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Save button");
                officeActivities_MeetingHelper.ClickElement("Save");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Search the meeting");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Name);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Click On any Meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Verify meeting created by credits");
                officeActivities_MeetingHelper.VerifyText("CreatedBy", "Howard Tang");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Verify Meeting Modified by credits");
                officeActivities_MeetingHelper.VerifyText("ModifiedBy", "Howard Tang");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMeetingsCreditsIssue", "Click on Cancel button");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();
                officeActivities_MeetingHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyMeetingsCreditsIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Meetings Credits Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Meetings Credits Issue", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Meetings Credits Issue");
                        TakeScreenshot("VerifyMeetingsCreditsIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyMeetingsCreditsIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyMeetingsCreditsIssue");
                        string id            = loginHelper.getIssueID("Verify Meetings Credits Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyMeetingsCreditsIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Meetings Credits Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Meetings Credits Issue");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyMeetingsCreditsIssue");
                executionLog.WriteInExcel("Verify Meetings Credits Issue", Status, JIRA, "Office Activities");
            }
        }
Exemplo n.º 6
0
        public void documentForMeetingReplaceInvalidFile()
        {
            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    officeActivities_MeetingHelper  = new OfficeActivities_MeetingHelper(GetWebDriver());
            var    officeActivities_DocumentHelper = new OfficeActivities_DocumentHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("DocumentUpdateVersion", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("DocumentUpdateVersion", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Go to meetings page");
                VisitOffice("meetings");

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click On Meeting In Activity");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click On Add Document Btn");
                officeActivities_MeetingHelper.ClickElement("ClickOnAddDocumentBtn");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Enter Doc Name");
                var DocName = "Test Valid Doc" + GetRandomNumber();
                officeActivities_MeetingHelper.TypeText("EnterDocumentName", DocName);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Upload Invalid file(exe)");
                var InvalidFile = GetPathToFile() + "chrome.exe";
                officeActivities_MeetingHelper.Upload("BrowseDoc", InvalidFile);
                officeActivities_MeetingHelper.WaitForWorkAround(5000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Replace with valid file(jpg)");
                var ValidFile = GetPathToFile() + "Up.jpg";
                officeActivities_MeetingHelper.Upload("BrowserDoc1", ValidFile);
                officeActivities_MeetingHelper.WaitForWorkAround(5000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click Save Of Doc Pop Up");
                officeActivities_MeetingHelper.ClickElement("ClickSaveOfDocPopUp");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Verify Confirmation");
                officeActivities_MeetingHelper.WaitForText("Documents successfully Added.", 10);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Redirect To Document Section Activities");
                VisitOffice("documents");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Search Document");
                officeActivities_MeetingHelper.TypeText("SearchSubject", DocName);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Select All in owner field");
                officeActivities_MeetingHelper.SelectByText("OwnerField", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Verify Added Document Present");
                officeActivities_MeetingHelper.VerifyText("DoucumentFirstInList", DocName);
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Search Document");
                officeActivities_DocumentHelper.TypeText("SearchDocumet", DocName);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Select document");
                officeActivities_DocumentHelper.ClickElement("CheckDocToDel");

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Click on delete.");
                officeActivities_DocumentHelper.ClickElement("ClickOndelete");

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Accept alert message.");
                officeActivities_DocumentHelper.AcceptAlert();

                executionLog.Log("DocumentForMeetingReplaceInvalidFile", "Wait for success message.");
                officeActivities_DocumentHelper.WaitForText("Document deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("DocumentForMeetingReplaceInvalidFile");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Document For Meeting Replace InvalidFile");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("DocumentForMeetingReplaceInvalidFile", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Document For Meeting Replace InvalidFile");
                        TakeScreenshot("DocumentForMeetingReplaceInvalidFile");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DocumentForMeetingReplaceInvalidFile.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("DocumentForMeetingReplaceInvalidFile");
                        string id            = loginHelper.getIssueID("Document For Meeting Replace InvalidFile");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DocumentForMeetingReplaceInvalidFile.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Document For Meeting Replace InvalidFile"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Document For Meeting Replace InvalidFile");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("DocumentForMeetingReplaceInvalidFile");
                executionLog.WriteInExcel("Document For Meeting Replace InvalidFile", Status, JIRA, "Office Activities");
            }
        }
        public void verifyLabelSelectForMeeting()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("VerifyLabelSelectForMeeting", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("VerifyLabelSelectForMeeting", "Verify Page title");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");

                executionLog.Log("VerifyLabelSelectForMeeting", "Click on Activities >> meetings");
                VisitOffice("meetings");

                executionLog.Log("VerifyLabelSelectForMeeting", "Click on any Task");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");

                executionLog.Log("VerifyLabelSelectForMeeting", "Verify Select for category");
                officeActivities_MeetingHelper.VerifyText("CategoryLabel", "Select");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyLabelSelectForMeeting");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Label Select For Meeting");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Label Select For Meeting", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Label Select For Meeting");
                        TakeScreenshot("VerifyLabelSelectForMeeting");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyLabelSelectForMeeting.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyLabelSelectForMeeting");
                        string id            = loginHelper.getIssueID("Verify Label Select For Meeting");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyLabelSelectForMeeting.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Label Select For Meeting"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Label Select For Meeting");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyLabelSelectForMeeting");
                executionLog.WriteInExcel("Verify Label Select For Meeting", Status, JIRA, "Office Activities");
            }
        }
Exemplo n.º 8
0
        public void verifyQuickLookLabelsForMeetings()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            username = oXMLData.getData("settings/Credentials", "username_office");
            password = oXMLData.getData("settings/Credentials", "password");

            // Variable
            var    name   = "Meeting" + RandomNumber(99, 9999);
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify Page title");
                VerifyTitle("Dashboard");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Go to create meetings page");
                VisitOffice("meetings/create");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify page title.");
                VerifyTitle("Create a Meeting");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required.");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required.");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter Subject for the meeting");
                officeActivities_MeetingHelper.TypeText("Subject", name);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter location of meeting.");
                officeActivities_MeetingHelper.TypeText("Location", "Test Location");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter start date.");
                officeActivities_MeetingHelper.TypeText("StartDate", "09/09/2016");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2016");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select Related To");
                officeActivities_MeetingHelper.Select("RelatedTo", "20");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on client for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button");
                officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time.");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "07/07/2016");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2016");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for success text");
                officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter meeting name to search.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", name);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on any meeting .");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting status.");
                officeActivities_MeetingHelper.VerifyText("VerifyStatus", "Held");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting  priority.");
                officeActivities_MeetingHelper.VerifyText("VerifyPriority", "Medium");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting category.");
                officeActivities_MeetingHelper.VerifyText("VerifyCategory", "Select Category");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting responsibility.");
                officeActivities_MeetingHelper.VerifyText("VerifyResponsibility", "Howard Tang");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on edit button.");
                officeActivities_MeetingHelper.ClickElement("EditLink");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact type.");
                officeActivities_MeetingHelper.SelectByText("Status", "New");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact Status.");
                officeActivities_MeetingHelper.SelectByText("Priority", "High");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact source.");
                officeActivities_MeetingHelper.SelectByText("SelectCategory", "Personal");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for contact category.");
                officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on save button.");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting updated successfully.", 10);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Enter meeting name to search.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", name);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click on any meeting .");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting status.");
                officeActivities_MeetingHelper.VerifyText("VerifyStatus", "New");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting  priority.");
                officeActivities_MeetingHelper.VerifyText("VerifyPriority", "High");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting category.");
                officeActivities_MeetingHelper.VerifyText("VerifyCategory", "Personal");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify label for meeting responsibility.");
                officeActivities_MeetingHelper.VerifyText("VerifyResponsibility", "Howard Tang");
                //officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On Cance meeting.");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Redirect at recycle bin.");
                VisitOffice("meetings/recyclebin");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify page title");
                VerifyTitle("Recycled Meeting");
                //officeActivities_MeetingHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Search meeting by name.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", name);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Select 'All' in owner field");
                officeActivities_MeetingHelper.SelectByText("OwnerField", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                //executionLog.Log("VerifyQuickLookLabelsForMeetings", "Wait for delete icon to be present.");
                //officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10);
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Click On delete icon");
                officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();
                // officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForMeetings", "Verify text.");
                officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyQuickLookLabelsForMeetings");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("VerifyQuickLookLabelsForMeetings");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("VerifyQuickLookLabelsForMeetings", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings");
                        TakeScreenshot("VerifyQuickLookLabelsForMeetings");
                        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("VerifyQuickLookLabelsForMeetings");
                        string id            = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Contact.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("VerifyQuickLookLabelsForMeetings");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyQuickLookLabelsForMeetings");
                executionLog.WriteInExcel("VerifyQuickLookLabelsForMeetings", Status, JIRA, "Activities Management");
            }
        }
        public void activitiesBulkUpdateMeetings()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());
            var office_ClientsHelper           = new Office_ClientsHelper(GetWebDriver());
            var office_LeadsHelper             = new Office_LeadsHelper(GetWebDriver());
            var office_OpportunitiesHelper     = new Office_OpportunitiesHelper(GetWebDriver());
            var ticket_CreateATicketHelper     = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Random Variables.
            var    Subject1 = "Meeting2" + RandomNumber(1, 99);
            var    Subject  = "Meeting" + RandomNumber(1, 999);
            String JIRA     = "";
            String Status   = "Pass";

            try
            {
                executionLog.Log("ActivitiesBulkUpdateMeetings", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify Page title");
                VerifyTitle("Dashboard");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to create meetings page");
                VisitOffice("meetings/create");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Create a Meeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter Subject for the meeting");
                officeActivities_MeetingHelper.TypeText("Subject", Subject);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter location of meeting.");
                officeActivities_MeetingHelper.TypeText("Location", "Test Location");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date.");
                officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-28");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Related To");
                officeActivities_MeetingHelper.Select("RelatedTo", "20");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on client for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting status");
                officeActivities_MeetingHelper.Select("Status", "Planned");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting priority.");
                officeActivities_MeetingHelper.Select("Priority", "Low");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned owner for meeting.");
                officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned user group for meeting.");
                officeActivities_MeetingHelper.Select("AssignedUserGroup", "81");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for dates.");
                officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert by clicking ok.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-24");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "verify page text");
                officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to create meetings page");
                VisitOffice("meetings/create");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Create a Meeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("StartDateError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify validation text for mandatoryness.");
                officeActivities_MeetingHelper.VerifyText("ParentError", "This field is required.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter Subject for the meeting");
                officeActivities_MeetingHelper.TypeText("Subject", Subject1);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter location of meeting.");
                officeActivities_MeetingHelper.TypeText("Location", "Test Location");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date.");
                officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-28");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Related To");
                officeActivities_MeetingHelper.Select("RelatedTo", "20");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on client for which meeting is created.");
                officeActivities_MeetingHelper.ClickElement("ClickOnClientMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select status as planned.");
                officeActivities_MeetingHelper.Select("Status", "Planned");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select meeting priority.");
                officeActivities_MeetingHelper.Select("Priority", "Low");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned owner for meeting.");
                officeActivities_MeetingHelper.SelectByText("AssignedOwner", "Howard Tang");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select assigned user group for meeting.");
                officeActivities_MeetingHelper.Select("AssignedUserGroup", "81");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify alert text for dates.");
                officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time.");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert by clicking ok.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "2015-03-24");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Enter End Date.");
                officeActivities_MeetingHelper.TypeText("EndDate", "2015-03-26");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Save button");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text");
                officeActivities_MeetingHelper.WaitForText("Meeting saved successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Bulk Update.");
                officeActivities_MeetingHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On status");

                officeActivities_MeetingHelper.ClickElement("UpDateStatus");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify alert for selecting records.");
                officeActivities_MeetingHelper.VerifyAlertText("Please select atleast one record to proceed");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting.");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting.");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox2");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update.");
                officeActivities_MeetingHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on status.");
                officeActivities_MeetingHelper.ClickElement("UpDateStatus");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select status to be updated.");
                officeActivities_MeetingHelper.Select("ChangeStatus", "Held");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button.");
                officeActivities_MeetingHelper.ClickElement("UpdateButton");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting status updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting.");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox2");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update.");
                officeActivities_MeetingHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on Owner.");
                officeActivities_MeetingHelper.ClickElement("ChangeOwner");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select Owner to be updated.");
                officeActivities_MeetingHelper.SelectByText("ChangeResponsibility", "Brian Sales Agent");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button.");
                officeActivities_MeetingHelper.ClickElement("UpdateOwner");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting owner updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting.");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox2");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update.");
                officeActivities_MeetingHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on User group.");
                officeActivities_MeetingHelper.ClickElement("ChangeUserGroup");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select user group to be updated.");
                officeActivities_MeetingHelper.Select("SelectUserGroup", "169");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button.");
                officeActivities_MeetingHelper.ClickElement("UpdateGroup");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting user group updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Go to meetings page");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title.");
                VerifyTitle("Meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select first meeting");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select second meeting.");
                officeActivities_MeetingHelper.ClickElement("SelectCheckbox2");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on bulk update.");
                officeActivities_MeetingHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on priority.");
                officeActivities_MeetingHelper.ClickElement("ChangePriority");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Select priority to be updated.");
                officeActivities_MeetingHelper.Select("SelectPriority", "High");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on update button.");
                officeActivities_MeetingHelper.ClickElement("UpdatePriority");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting priority updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at meetings page.");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on the meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Cancel meeting.");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at recycle bin.");
                VisitOffice("meetings/recyclebin");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title");
                VerifyTitle("Recycled Meeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by name.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for delete icon to be present.");
                officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On delete icon");
                officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify text.");
                officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at meetings page.");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject1);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click on the meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On Cancel meeting.");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Redirect at recycle bin.");
                VisitOffice("meetings/recyclebin");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify page title");
                VerifyTitle("Recycled Meeting");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Search meeting by name.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject1);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Wait for delete icon to be present.");
                officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10);

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Click On delete icon");
                officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently");

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateMeetings", "Verify text.");
                officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ActivitiesBulkUpdateMeetings");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Activities Bulk Update Meetings");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Activities Bulk Update Meetings", "Bug", "Medium", "Meeting page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Activities Bulk Update Meetings");
                        TakeScreenshot("ActivitiesBulkUpdateMeetings");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesBulkUpdateMeetings.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ActivitiesBulkUpdateMeetings");
                        string id            = loginHelper.getIssueID("Activities Bulk Update Meetings");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesBulkUpdateMeetings.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Activities Bulk Update Meetings"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Activities Bulk Update Meetings");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ActivitiesBulkUpdateMeetings");
                executionLog.WriteInExcel("Activities Bulk Update Meetings", Status, JIRA, "Office Activities");
            }
        }