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 verifyTicketsBulkUpdates()
        {
            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 officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Random Variables.
            var    TickName = "Ticket" + RandomNumber(666, 9999);
            var    Ticket2  = "Ticket2" + RandomNumber(333, 9999);
            String JIRA     = "";
            String Status   = "Pass";

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

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify Page title");
                VerifyTitle("Dashboard");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Redirect To Tickets");
                VisitOffice("tickets/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                VerifyTitle("Create a Ticket");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnSaveTicket");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify validation text for name");
                officeTickets_CreateTicketsHelper.VerifyText("TickNameErr", "This field is required.");

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify validation text for assignee.");
                officeTickets_CreateTicketsHelper.VerifyText("TickParentErr", "This field is required.");

                executionLog.Log("VerifyTicketsBulkUpdates", "Enter Ticket Name");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", TickName);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click On Client Display Icon");
                officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "ClickOnClient");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnClient");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select client status.");
                officeTickets_CreateTicketsHelper.SelectByText("TickStatus", "Resolved");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnSaveTicket");

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait text Ticket Created Successfully.");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 05);

                executionLog.Log("VerifyTicketsBulkUpdates", "Redirect To Tickets");
                VisitOffice("tickets/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                VerifyTitle("Create a Ticket");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnSaveTicket");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify validation text for name");
                officeTickets_CreateTicketsHelper.VerifyText("TickNameErr", "This field is required.");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify validation text for assignee.");
                officeTickets_CreateTicketsHelper.VerifyText("TickParentErr", "This field is required.");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Enter Ticket Name");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", Ticket2);
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select client status.");
                officeTickets_CreateTicketsHelper.SelectByText("TickStatus", "Resolved");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click On Client Display Icon");
                officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "ClickOnClient");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnClient");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnSaveTicket");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait text Ticket Created Successfully.");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 05);

                executionLog.Log("VerifyTicketsBulkUpdates", "Redirect To Tickets");
                VisitOffice("tickets");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("BulkUpdate", 30);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update.");
                officeTickets_CreateTicketsHelper.ClickElement("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click to update status");
                officeTickets_CreateTicketsHelper.ClickElement("ChangeStatus");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify Alert message for selecting record.");
                officeTickets_CreateTicketsHelper.VerifyAlertText("Please select atleast one record to proceed.");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 20);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update.");
                officeTickets_CreateTicketsHelper.ClickElement("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on change status.");
                officeTickets_CreateTicketsHelper.ClickElement("ChangeStatus");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("UpdatedStatus", "New");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickElement("UPButton");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 20);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update..");
                officeTickets_CreateTicketsHelper.ClickElement("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.ClickElement("ChangeCategory");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("SelectCategoryy", "Billing");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickElement("UpdateButton");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 30);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update..");
                officeTickets_CreateTicketsHelper.ClickElement("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.ClickElement("ChangeTopic");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("SelectTopic", "Merge");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickElement("UpdateTopic");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 20);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update..");
                officeTickets_CreateTicketsHelper.ClickJs("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.ClickJs("ChangePriority");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("SelectPriority", "Medium");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickElement("UpdatePrirority");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 20);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update..");
                officeTickets_CreateTicketsHelper.ClickJs("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.ClickJs("ChangeOwner");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("OwnerSelect", "Howard Tang");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickJs("UpdateOwner");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);

                //executionLog.Log("VerifyTicketsBulkUpdates", "Wait for locator to present.");
                //officeTickets_CreateTicketsHelper.WaitForElementPresent("Checkbox1", 20);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on first checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on seconf checkbox.");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox2");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on bulk update..");
                officeTickets_CreateTicketsHelper.ClickJs("BulkUpdate");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.ClickJs("ChangeManager");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Verify page title.");
                officeTickets_CreateTicketsHelper.SelectByText("SelectManager", "Howard Tang");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on update button.");
                officeTickets_CreateTicketsHelper.ClickJs("UpdateManager");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Wait updation success message.");
                officeTickets_CreateTicketsHelper.WaitForText("2 Record(s) updated successfully", 10);
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Redirect To Tickets");
                VisitOffice("tickets");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "SearchTicket by Name");
                officeTickets_CreateTicketsHelper.TypeText("SearchTicket", TickName);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select 'All' in Assigned field");
                officeTickets_CreateTicketsHelper.SelectByText("AssignedField", "All");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select first ticket");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on delete link");
                officeTickets_CreateTicketsHelper.ClickElement("DeleteBulk");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Accept alert message.");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Redirect To Tickets");
                VisitOffice("tickets");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsBulkUpdates", "SearchTicket by Name");
                officeTickets_CreateTicketsHelper.TypeText("SearchTicket", Ticket2);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select 'All' in Assigned field");
                officeTickets_CreateTicketsHelper.SelectByText("AssignedField", "All");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Select first ticket");
                officeTickets_CreateTicketsHelper.ClickElement("Checkbox1");

                executionLog.Log("VerifyTicketsBulkUpdates", "Click on delete link");
                officeTickets_CreateTicketsHelper.ClickElement("DeleteBulk");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsBulkUpdates", "Accept alert message.");
                officeTickets_CreateTicketsHelper.AcceptAlert();
                officeTickets_CreateTicketsHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyTicketsBulkUpdates");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Tickets Bulk Updates");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Tickets Bulk Updates", "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 Tickets Bulk Updates");
                        TakeScreenshot("VerifyTicketsBulkUpdates");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsBulkUpdates.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTicketsBulkUpdates");
                        string id            = loginHelper.getIssueID("Verify Tickets Bulk Updates");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsBulkUpdates.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Tickets Bulk Updates"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Tickets Bulk Updates");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyTicketsBulkUpdates");
                executionLog.WriteInExcel("Verify Tickets Bulk Updates", Status, JIRA, "Office Activities");
            }
        }
        public void verifyDeletedTicketDisappearUnderMerchant()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog          = new ExecutionLog();
            var loginHelper           = new LoginHelper(GetWebDriver());
            var office_MerchantHelper = new Office_ClientsHelper(GetWebDriver());
            var officeticketsHelper   = new OfficeTickets_CreateTicketsHelper(GetWebDriver());


            var DBA        = "ClientDBA" + RandomNumber(1, 5000);
            var ticketname = "Testticket" + RandomNumber(1, 500);

            // Variable random
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Login with valid username and password");
                Login(username[0], password[0]);

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

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to Create merchant page");
                VisitOffice("clients/create");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Enter DBA name");
                office_MerchantHelper.TypeText("ClientDBAName", DBA);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select the client status");
                office_MerchantHelper.SelectByText("Status", "New");

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "select the responsibity");
                office_MerchantHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on save btn");
                office_MerchantHelper.ClickElement("Save");
                office_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click Create Ticket button");
                office_MerchantHelper.ClickForce("CreateTicket");
                office_MerchantHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Enter Subject name");
                officeticketsHelper.TypeText("TicketName", ticketname);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select Status");
                officeticketsHelper.SelectByText("TickStatus", "New");

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Select Assigned To");
                officeticketsHelper.SelectByText("Assignedto", "Howard Tang");

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on save btn");
                officeticketsHelper.ClickElement("Save1");
                officeticketsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to All merchants page");
                VisitOffice("clients");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search merchant by name");
                office_MerchantHelper.TypeText("SearchClient", DBA);
                office_MerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on client");
                office_MerchantHelper.ClickElement("Client1");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on created ticket");
                office_MerchantHelper.ClickForce("Ticket1");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on Delete button");
                officeticketsHelper.ClickElement("ClickDeleteBtn");
                officeticketsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Redirect to All merchants page");
                VisitOffice("clients");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search merchant by name");
                office_MerchantHelper.TypeText("SearchClient", DBA);
                office_MerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on client");
                office_MerchantHelper.ClickElement("Client1");
                office_MerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Verify ticket disappeared");
                office_MerchantHelper.VerifyText("NoTickets", "No Data Available.");
                Console.WriteLine("Deleted ticket disappeared");
                office_MerchantHelper.WaitForWorkAround(1000);

                VisitOffice("clients");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Search the company Name");
                office_MerchantHelper.TypeText("SearchClient", DBA);
                office_MerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Click on check box");
                office_MerchantHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("VerifyDeletedTicketDisappearUnderMerchant", "Delete the client");
                office_MerchantHelper.ClickElement("DeleteClient");
                office_MerchantHelper.AcceptAlert();
                office_MerchantHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyDeletedTicketDisappearUnderMerchant");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Deleted Ticket Disappear Under Merchant");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Deleted Ticket Disappear Under Merchant", "Bug", "Medium", "Office Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant");
                        TakeScreenshot("VerifyDeletedTicketDisappearUnderMerchant");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDeletedTicketDisappearUnderMerchant.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyDeletedTicketDisappearUnderMerchant");
                        string id            = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDeletedTicketDisappearUnderMerchant.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Deleted Ticket Disappear Under Merchant");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyDeletedTicketDisappearUnderMerchant");
                executionLog.WriteInExcel("Verify Deleted Ticket Disappear Under Merchant", Status, JIRA, "Office Merchant");
            }
        }
        public void verifyTicketResolution()
        {
            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 ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());
            var ticket_ViewATicketHelper   = new OfficeTickets_ViewTicketsHelper(GetWebDriver());

            // Variable


            var TickName = "Test Ticket" + GetRandomNumber();

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

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

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

            executionLog.Log("VerifyTicketResolution", "Redirect To Create Tickets");
            VisitOffice("tickets/create");

            executionLog.Log("VerifyTicketResolution", "Verify Page title");
            VerifyTitle("Create a Ticket");

            executionLog.Log("VerifyTicketResolution", "Enter Ticket Name");
            ticket_CreateATicketHelper.TypeText("TicketName", TickName);
            ticket_CreateATicketHelper.WaitForWorkAround(1000);

            executionLog.Log("VerifyTicketResolution", "Select the status");
            ticket_CreateATicketHelper.SelectByText("TickStatus", "Open");
            ticket_CreateATicketHelper.WaitForWorkAround(1000);

            executionLog.Log("VerifyTicketResolution", "Click On Select Client Button");
            ticket_CreateATicketHelper.ClickElement("ClientDisplayIcon");
            ticket_CreateATicketHelper.WaitForWorkAround(4000);

            executionLog.Log("VerifyTicketResolution", "Search DBA Client by Company Name");
            ticket_CreateATicketHelper.TypeText("CompanyName", "Thompson");

            executionLog.Log("VerifyTicketResolution", "Search Button");
            ticket_CreateATicketHelper.ClickElement("SearchBtn");
            ticket_CreateATicketHelper.WaitForWorkAround(4000);


            executionLog.Log("VerifyTicketResolution", "Click On Client");
            ticket_CreateATicketHelper.ClickElement("ClickOnClient");
            ticket_CreateATicketHelper.WaitForWorkAround(4000);

            executionLog.Log("VerifyTicketResolution", "Assigned To ");
            ticket_CreateATicketHelper.SelectByText("Assignedto", "Howard Tang");

            executionLog.Log("VerifyTicketResolution", "Assigned Manager");
            ticket_CreateATicketHelper.SelectByText("AssignedManager", "Howard Tang");

            executionLog.Log("VerifyTicketResolution", "Click on Save");
            ticket_CreateATicketHelper.ClickElement("ClickOnSaveTicket");
            ticket_CreateATicketHelper.WaitForWorkAround(3000);

            executionLog.Log("VerifyTicketResolution", "Verify Ticket Created Successfully.");
            ticket_CreateATicketHelper.WaitForText("Ticket Created Successfully.", 10);

            executionLog.Log("VerifyTicketResolution", "Click on Resolve Button");
            ticket_ViewATicketHelper.ClickElement("ResolveBtn");
            ticket_ViewATicketHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyTicketResolution", "Click on Resolution Drop down");
            ticket_ViewATicketHelper.ClickElement("Resolution");
            ticket_ViewATicketHelper.WaitForWorkAround(3000);

            executionLog.Log("VerifyTicketResolution", "Click on Drop down options present");
            ticket_ViewATicketHelper.IsElementVisible("//option[@value='Resolved']");

            //}
            //catch (Exception e)
            //{
            //}
        }
Пример #5
0
        public void changeStatusOfTicketAndVerifyStatus()
        {
            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 officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());


            // Variable random
            var    name   = "Ticket" + RandomNumber(1, 999);
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Login with valid username and password");
                Login(username[0], password[0]);

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

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click on ticket tab.");
                officeTickets_CreateTicketsHelper.ClickJs("TicketTab");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click On Create");
                officeTickets_CreateTicketsHelper.ClickElement("Create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "ClickOnCreate");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", name);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click on Client icon");
                officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "ClickOnClient");
                officeTickets_CreateTicketsHelper.ClickElement("Client");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select the Status");
                officeTickets_CreateTicketsHelper.SelectByText("TickStatus", "New");

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickJs("Save");

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Verify result");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 10);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Redirect To Document");
                VisitOffice("tickets");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Search ticket by name. ");
                officeTickets_CreateTicketsHelper.TypeText("SearchTicket", name);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select All in Assigned to field");
                officeTickets_CreateTicketsHelper.SelectByText("AssignedField", "All");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click on ticket to open it.");
                officeTickets_CreateTicketsHelper.ClickElement("ClickOnTicket");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click on resolved");
                officeTickets_CreateTicketsHelper.ClickElement("ResolvedBtn");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select ticket resolved status.");
                officeTickets_CreateTicketsHelper.SelectByText("SelectTicketResolution", "Resolved");

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click Resolved SaveBtn");
                officeTickets_CreateTicketsHelper.ClickElement("ClickResolvedSaveBtn");

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Ticket Resolved Successfully");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Resolved Successfully.", 10);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Search ticket by name ");
                officeTickets_CreateTicketsHelper.TypeText("SearchTicket", name);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select All in Assigned to field");
                officeTickets_CreateTicketsHelper.SelectByText("AssignedField", "All");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Verify Status");
                officeTickets_CreateTicketsHelper.VerifyPageText("Resolved");

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select ticket");
                officeTickets_CreateTicketsHelper.ClickElement("Ticket1");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Click On Closed ");
                officeTickets_CreateTicketsHelper.ClickElement("ClosedTicket");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Verify Ticket Closed Successfully.");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Closed Successfully.", 10);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Search ticket ");
                officeTickets_CreateTicketsHelper.TypeText("SearchTicket", name);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Select All in Assigned to field");
                officeTickets_CreateTicketsHelper.SelectByText("AssignedField", "All");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("ChangeStatusOfTicketAndVerifyStatus", "Verify Status closed");
                officeTickets_CreateTicketsHelper.VerifyPageText("Closed");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ChangeStatusOfTicketAndVerifyStatus");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Change Status Of Ticket And Verify Status");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Change Status Of Ticket And Verify Status", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Change Status Of Ticket And Verify Status");
                        TakeScreenshot("ChangeStatusOfTicketAndVerifyStatus");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ChangeStatusOfTicketAndVerifyStatus.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ChangeStatusOfTicketAndVerifyStatus");
                        string id            = loginHelper.getIssueID("Change Status Of Ticket And Verify Status");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ChangeStatusOfTicketAndVerifyStatus.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Change Status Of Ticket And Verify Status"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Change Status Of Ticket And Verify Status");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ChangeStatusOfTicketAndVerifyStatus");
                executionLog.WriteInExcel("Change Status Of Ticket And Verify Status", Status, JIRA, "Ticketing System");
            }
        }
Пример #6
0
        public void saleAgent2()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

            // Initializing the objects5
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_MeetingHelper    = new OfficeActivities_MeetingHelper(GetWebDriver());
            var officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());
            var officeActivities_TasksHelper      = new OfficeActivities_TasksHelper(GetWebDriver());

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

            // Variable
            var    Meeting = "Meeting" + RandomNumber(1, 99999);
            var    Task    = "New" + RandomNumber(99, 99999);
            String JIRA    = "";
            String Status  = "Pass";


            try
            {
                executionLog.Log("SaleAgent2", "Login with valid credential  Username");
                Login(username[0], password[0]);

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

                executionLog.Log("SaleAgent2", "Goto Ticket");
                VisitOffice("tickets");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Verify Ticket");
                officeTickets_CreateTicketsHelper.VerifyText("ViewHeadingTicket", "Tickets");

                executionLog.Log("SaleAgent2", "Goto create Ticket");
                VisitOffice("tickets/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Enter Ticket Subject");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", "Test Ticket");

                executionLog.Log("SaleAgent2", "Click Assigned Icon");
                officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Select Client Ticket");
                officeTickets_CreateTicketsHelper.ClickElement("Client");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Verify Confirmation");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 10);

                executionLog.Log("SaleAgent2", "Click Edit Ticket Button");
                officeTickets_CreateTicketsHelper.ClickElement("ClickEditTicketBtn");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click on Save");
                officeTickets_CreateTicketsHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Redirect at Create Task");
                VisitOffice("tasks/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click on Save");
                officeActivities_TasksHelper.ClickElement("Save");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Verify Validation text on page.");
                officeActivities_TasksHelper.VerifyText("ValdatiponForSujectField", "This field is required.");

                executionLog.Log("SaleAgent2", "Enter Subject");
                officeActivities_TasksHelper.TypeText("Subjuct1", Task);

                executionLog.Log("SaleAgent2", " Click Save");
                officeActivities_TasksHelper.ClickElement("Save");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Verify Validation for date.");
                officeActivities_TasksHelper.VerifyText("Valdationforstartdate", "This field is required.");

                executionLog.Log("SaleAgent2", "Enter Start date");
                officeActivities_TasksHelper.TypeText("StartDate", "08/08/2017");

                executionLog.Log("SaleAgent2", "Enter End date");
                officeActivities_TasksHelper.TypeText("DueDate", "09/09/2017");

                executionLog.Log("SaleAgent2", "Select Related TO");
                officeActivities_TasksHelper.SelectByText("SelectRelatedTo", "Client");

                executionLog.Log("SaleAgent2", "Click on Assigned To");
                officeActivities_TasksHelper.ClickElement("SelectAssignedTo");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Select Client");
                officeActivities_TasksHelper.ClickElement("ClickToSelectClient");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Click on save.");
                officeActivities_TasksHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Wait for Confrmation");
                officeActivities_TasksHelper.WaitForText("Task saved successfully.", 10);

                executionLog.Log("SaleAgent2", "Rediret to task");
                VisitOffice("tasks");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Search Task");
                officeActivities_TasksHelper.TypeText("EnterSubject", Task);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Edit Task");
                officeActivities_TasksHelper.ClickElement("Edit");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Save");
                officeActivities_TasksHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Verify Confrmation");
                officeActivities_TasksHelper.WaitForText("Task Updated Success.", 10);

                executionLog.Log("SaleAgent2", "Rediected to task ");
                VisitOffice("meetings/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Enter Subject");
                officeActivities_MeetingHelper.TypeText("Subject", Meeting);

                executionLog.Log("SaleAgent2", "Enter Start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "07/07/2017");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Enter End date");
                officeActivities_MeetingHelper.TypeText("EndDate", "08/08/2017");

                executionLog.Log("SaleAgent2", "Select Client");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click Assigned To");
                officeActivities_MeetingHelper.ClickElement("AssignedOwner");
                //officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click on find list icon.");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Click on client");
                officeActivities_MeetingHelper.ClickElement("SelectClient");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click on Save");
                officeActivities_MeetingHelper.Click("//button[@title='Save']");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Verify");
                officeTickets_CreateTicketsHelper.WaitForText("Meeting saved successfully. ", 10);

                executionLog.Log("SaleAgent2", "Redirect to meeting");
                VisitOffice("meetings");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Search Meeting");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Meeting);
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Click Edit");
                officeActivities_MeetingHelper.ClickElement("Edit");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaleAgent2", "Click Save");
                officeActivities_MeetingHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("SaleAgent2", "Wait for success message.");
                officeActivities_MeetingHelper.WaitForText("Meeting updated successfully", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("SaleAgent2");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("SaleAgent2");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("SaleAgent2", "Bug", "Medium", "SaleA gent1", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("SaleAgent2");
                        TakeScreenshot("SaleAgent2");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Iframe.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("SaleAgent2");
                        string id            = loginHelper.getIssueID("SaleAgent2");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SaleAgent2.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("SaleAgent2"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("SaleAgent2");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("SaleAgent2");
                executionLog.WriteInExcel("SaleAgent2", Status, JIRA, "Sale Agent Activities");
            }
        }
Пример #7
0
        public void activitiesDocumentManagement2()
        {
            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_DocumentsHelper = new OfficeActivities_DocumentHelper(GetWebDriver());
            var office_ClientsHelper             = new Office_ClientsHelper(GetWebDriver());
            var office_LeadsHelper         = new Office_LeadsHelper(GetWebDriver());
            var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver());
            var ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Variable
            var    name        = "Doc" + RandomNumber(1, 9999);
            var    email       = "Test" + GetRandomNumber() + "@gmail.com";
            String ValidFile   = GetPathToFile() + "index.jpg";
            String InvalidFile = GetPathToFile() + "chrome.exe";
            String JIRA        = "";
            String Status      = "Pass";


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

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

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

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect to create document page");
                VisitOffice("documents/create");

                executionLog.Log("ActivitiesDocumentManagement2", "verify title");
                VerifyTitle("Create a New Document");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for name.");
                officeActivities_DocumentsHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for attachment.");
                officeActivities_DocumentsHelper.VerifyText("AttachmentError", "This field is required.");

                executionLog.Log("ActivitiesDocumentManagement2", "Enter Document name");
                officeActivities_DocumentsHelper.TypeText("Name", name);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on document version");
                officeActivities_DocumentsHelper.ClickElement("DocumentVersion");

                executionLog.Log("ActivitiesDocumentManagement2", "Upload an invalid File ");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", InvalidFile);

                executionLog.Log("ActivitiesDocumentManagement2", "Verify alert message for invalid file.");
                officeActivities_DocumentsHelper.VerifyAlertText("please select a valid file!");
                officeActivities_DocumentsHelper.AcceptAlert();

                executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File.");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile);

                executionLog.Log("ActivitiesDocumentManagement2", "Select Assign owner");
                officeActivities_DocumentsHelper.SelectByText("AssignOwner", "Howard Tang");

                executionLog.Log("ActivitiesDocumentManagement2", "Select status");
                officeActivities_DocumentsHelper.Select("Status", "Active");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document saved successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");

                executionLog.Log("ActivitiesDocumentManagement2", "Select document related to.");
                officeActivities_DocumentsHelper.Select("ReletedTo", "18");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon.");
                officeActivities_DocumentsHelper.ClickElement("Assign");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on any meeting.");
                officeActivities_DocumentsHelper.ClickElement("AssignUser");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10);

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

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("ClickOnAnyMeeting", 10);

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

                VisitOffice("documents");
                office_ClientsHelper.WaitForWorkAround(3000);

                VerifyTitle("Documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select document related to.");
                officeActivities_DocumentsHelper.SelectByText("ReletedTo", "Client");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon.");
                officeActivities_DocumentsHelper.ClickElement("Assign");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on any task.");
                officeActivities_DocumentsHelper.ClickElement("AssignUser");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect at tasks page.");
                VisitOffice("tasks");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("OpenTask", 10);

                VisitOffice("documents");
                office_ClientsHelper.WaitForWorkAround(3000);

                VerifyTitle("Documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on add new version.");
                officeActivities_DocumentsHelper.ClickElement("NewVersion");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File.");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Write a comment about version.");
                officeActivities_DocumentsHelper.TypeText("DocCommnet", "This is newly added version.");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on save button.");
                officeActivities_DocumentsHelper.ClickElement("AddVersionSave");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("New Version File Uploaded successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect to document page");
                VisitOffice("documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("SearchDocumet", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Checkbox");
                officeActivities_DocumentsHelper.ClickElement("CheckDocToDel");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Delete button");
                officeActivities_DocumentsHelper.ClickElement("DeleteDoc");

                executionLog.Log("ActivitiesDocumentManagement2", "Acccept alert to delete doc.");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document deleted successfully.", 20);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect at recyclebin page.");
                VisitOffice("documents/recyclebin");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("DeleteRecycle", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on delete icon.");
                officeActivities_DocumentsHelper.ClickElement("DeleteRecycle");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message..");
                officeActivities_DocumentsHelper.WaitForText("Document Permanently Deleted.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            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 officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            try
            {
                executionLog.Log("TicketStatusIssue", "Login with valid username and password");
                Login(username[0], password[0]);

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

                executionLog.Log("TicketStatusIssue", "Go to Create Ticket page");
                VisitOffice("tickets/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketStatusIssue", "Verify title");
                VerifyTitle("Create a Ticket");

                executionLog.Log("TicketStatusIssue", "Set blank ticket status");
                officeTickets_CreateTicketsHelper.SelectByText("TickStatus", "Select Status");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketStatusIssue", "Collapse the Assignment section");
                officeTickets_CreateTicketsHelper.ClickElement("TickAssi");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketStatusIssue", "Enter ticket name");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", "Other");

                executionLog.Log("TicketStatusIssue", "Click on Assign link");
                officeTickets_CreateTicketsHelper.ClickElement("Assign");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketStatusIssue", "Click on Assign user");
                officeTickets_CreateTicketsHelper.ClickElement("AssignUser");

                executionLog.Log("TicketStatusIssue", "Wait for save button to be visible.");
                officeTickets_CreateTicketsHelper.WaitForElementPresent("Save", 10);

                executionLog.Log("TicketStatusIssue", "Click on 'Save' button");
                officeTickets_CreateTicketsHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketStatusIssue", "Verify validation for required status field displayed");
                officeTickets_CreateTicketsHelper.verifyElementVisible("TickAssiErr");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketStatusIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Ticket Status Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Ticket Status Issue", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Ticket Status Issue");
                        TakeScreenshot("TicketStatusIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketStatusIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketStatusIssue");
                        string id            = loginHelper.getIssueID("Ticket Status Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketStatusIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Ticket Status Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Ticket Status Issue");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketStatusIssue");
                executionLog.WriteInExcel("Ticket Status Issue", Status, JIRA, "Ticketing System");
            }
        }
        public void activitiesBulkUpdatesCalls()
        {
            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_CallsHelper = new OfficeActivities_CallsHelper(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 Variable
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", " verify title");
                VerifyTitle("Calls");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on Bulk Update");
                officeActivities_CallsHelper.ClickElement("BulkUpdate");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on Change Status");
                officeActivities_CallsHelper.ClickElement("ChangeCategory");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Verify alert text for selecting task.");
                officeActivities_CallsHelper.VerifyAlertText("Please select atleast one record to proceed.");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Accept alert message by clickin ok.");
                officeActivities_CallsHelper.AcceptAlert();
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on first task.");
                officeActivities_CallsHelper.ClickElement("ChkBox1");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on second task.");
                officeActivities_CallsHelper.ClickElement("ChkBox2");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on bulk update.");
                officeActivities_CallsHelper.ClickElement("BulkUpdate");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on change status.");
                officeActivities_CallsHelper.ClickForce("ChangeCategory");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Select status to be updated.");
                officeActivities_CallsHelper.SelectByText("SelectCategory", "other");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on update button.");
                officeActivities_CallsHelper.ClickElement("UpdateCategory");
                officeActivities_CallsHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Wait for success text.");
                officeActivities_CallsHelper.WaitForText("Call categories updated successfully.", 05);
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Redirect at tasks page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Verify Page title as tasks.");
                VerifyTitle("Calls");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on first task.");
                officeActivities_CallsHelper.ClickElement("ChkBox1");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on second task.");
                officeActivities_CallsHelper.ClickElement("ChkBox2");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on bulk update.");
                officeActivities_CallsHelper.ClickElement("BulkUpdate");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on change user group.");
                officeActivities_CallsHelper.ClickElement("ChangeEmployee");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Select group to be updated.");
                officeActivities_CallsHelper.SelectByText("SelectEmployee", "Howard Tang");

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Click on update button.");
                officeActivities_CallsHelper.ClickForce("UpdateOwner");
                officeActivities_CallsHelper.AcceptAlert();
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesCalls", "Wait for success text.");
                officeActivities_CallsHelper.WaitForText("Call owner updated successfully.", 05);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Redirect at ticket topic page.");
                VisitOffice("tickets/settings");
                ticket_SettingsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Select category under Auto Assignment");
                ticket_SettingsHelper.ClickElement("TickDefCategory");
                ticket_SettingsHelper.Click("//*[@id='assign0Category']/option[2]");

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Select set as Department");
                ticket_SettingsHelper.ClickElement("SetDept");
                ticket_SettingsHelper.Click("//*[@id='assign0Department']/option[2]");

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Select set as Priority");
                ticket_SettingsHelper.ClickElement("SetPriority");
                ticket_SettingsHelper.Click("//*[@id='assign0Priority']/option[2]");

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Select set as Assigned To");
                ticket_SettingsHelper.ClickElement("SetAssignto");
                ticket_SettingsHelper.Click("//*[@id='assign0Owner']/option[2]");

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Select set as Assigned Manager");
                ticket_SettingsHelper.ClickElement("SetAssignMgr");
                ticket_SettingsHelper.Click("//*[@id='assign0Manager']/option[3]");

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Click on Save button.");
                ticket_SettingsHelper.ClickElement("SaveBtn");
                ticket_SettingsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Redirect to Create Ticket page");
                VisitOffice("tickets/create");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketAutoAssignmentSettings", "Verify Assignments are not selected");
                officeTickets_CreateTicketsHelper.VerifySlctdOptn("TickPriority", "Select Priority");
                officeTickets_CreateTicketsHelper.VerifySlctdOptn("TickDepartment", "Select Department");
                officeTickets_CreateTicketsHelper.VerifySlctdOptn("Assignedto", "Select Assigned To");
                officeTickets_CreateTicketsHelper.VerifySlctdOptn("AssignedManager", "Select Assigned Manager");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyTicketAutoAssignmentSettings");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Ticket Auto Assignment Settings");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Ticket Auto Assignment Settings", "Bug", "Medium", "Ticket Admin page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Ticket Auto Assignment Settings");
                        TakeScreenshot("VerifyTicketAutoAssignmentSettings");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketAutoAssignmentSettings.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTicketAutoAssignmentSettings");
                        string id            = loginHelper.getIssueID("Verify Ticket Auto Assignment Settings");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketAutoAssignmentSettings.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Ticket Auto Assignment Settings"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Ticket Auto Assignment Settings");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyTicketAutoAssignmentSettings");
                executionLog.WriteInExcel("Verify Ticket Auto Assignment Settings", Status, JIRA, "Admin Ticket settings");
            }
        }
        public void verifyTicketsCreatedAndModifiedByCredits()
        {
            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 ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Variable
            var    TickName = "Test Ticket" + RandomNumber(1, 999);
            String JIRA     = "";
            String Status   = "Pass";

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

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

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Redirect To Tickets");
                VisitOffice("tickets/create");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify page title.");
                VerifyTitle("Create a Ticket");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on Save");
                ticket_CreateATicketHelper.ClickElement("ClickOnSaveTicket");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify validation text for name");
                ticket_CreateATicketHelper.VerifyText("TickNameErr", "This field is required.");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify validation text for assignee.");
                ticket_CreateATicketHelper.VerifyText("TickParentErr", "This field is required.");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Enter Ticket Name");
                ticket_CreateATicketHelper.TypeText("TicketName", TickName);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click On Client Display Icon");
                ticket_CreateATicketHelper.ClickElement("ClientDisplayIcon");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Search Dba Client");
                ticket_CreateATicketHelper.TypeText("SearchDBAClient", "Chy Company");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on SearchButton");
                ticket_CreateATicketHelper.ClickElement("SearchButton");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "ClickOnClient");
                ticket_CreateATicketHelper.ClickElement("ClickOnClient");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on Save");
                ticket_CreateATicketHelper.ClickElement("ClickOnSaveTicket");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Wait text Ticket Created Successfully.");
                ticket_CreateATicketHelper.WaitForText("Ticket Created Successfully.", 10);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Redirect To Tickets");
                VisitOffice("tickets");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "SearchTicket by Name");
                ticket_CreateATicketHelper.TypeText("SearchTicket", TickName);
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on first ticket.");
                ticket_CreateATicketHelper.ClickElement("Ticket1");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify ticket created by.");
                ticket_CreateATicketHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify ticket Modified by.");
                ticket_CreateATicketHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on edit icon.");
                ticket_CreateATicketHelper.ClickElement("ClickEditTicketBtn");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Updated ticket name.");
                ticket_CreateATicketHelper.TypeText("TicketName", TickName);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on save button.");
                ticket_CreateATicketHelper.ClickElement("Save");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Wait for success text..");
                ticket_CreateATicketHelper.WaitForText("Ticket Edited Successfully", 10);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "SearchTicket by Name");
                ticket_CreateATicketHelper.TypeText("SearchTicket", TickName);
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on first ticket.");
                ticket_CreateATicketHelper.ClickElement("Ticket1");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify ticket created by.");
                ticket_CreateATicketHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify ticket Modified by.");
                ticket_CreateATicketHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Redirect To Tickets");
                VisitOffice("tickets");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "SearchTicket by Name");
                ticket_CreateATicketHelper.TypeText("SearchTicket", TickName);
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Select first ticket");
                ticket_CreateATicketHelper.ClickElement("Checkbox1");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Click on delete link");
                ticket_CreateATicketHelper.ClickElement("DeleteBulk");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Accept alert message.");
                ticket_CreateATicketHelper.AcceptAlert();

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Redirect at tickets recyclebin page.");
                VisitOffice("tickets/recyclebin");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Verify page title.");
                VerifyTitle("Recycle Bin");

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Accept alert message.");
                ticket_CreateATicketHelper.ClickElement("DeletePermanently");
                ticket_CreateATicketHelper.AcceptAlert();

                executionLog.Log("VerifyTicketsCreatedAndModifiedByCredits", "Wait for success text.");
                ticket_CreateATicketHelper.WaitForText("Ticket Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyTicketsCreatedAndModifiedByCredits");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Tickets Created And Modified By Credits");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Tickets Created And Modified By Credits", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                        TakeScreenshot("VerifyTicketsCreatedAndModifiedByCredits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTicketsCreatedAndModifiedByCredits");
                        string id            = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Tickets Created And Modified By Credits"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyTicketsCreatedAndModifiedByCredits");
                executionLog.WriteInExcel("Verify Tickets Created And Modified By Credits", Status, JIRA, "Office tickets");
            }
        }
        public void editTicketVerifyResponsibility()
        {
            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 ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Variable
            var    TickName = "Test Ticket" + GetRandomNumber();
            String JIRA     = "";
            String Status   = "Pass";

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

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

                executionLog.Log("EditTicketVerifyResponsibility", "Redirect To Tickets");
                VisitOffice("tickets/create");

                executionLog.Log("EditTicketVerifyResponsibility", "Verify page title.");
                VerifyTitle("Create a Ticket");

                executionLog.Log("EditTicketVerifyResponsibility", "Enter Ticket Name");
                ticket_CreateATicketHelper.TypeText("TicketName", TickName);

                executionLog.Log("EditTicketVerifyResponsibility", "Select the status");
                ticket_CreateATicketHelper.SelectByText("TickStatus", "New");

                executionLog.Log("EditTicketVerifyResponsibility", "ClickOnClientDisplayIcon");
                ticket_CreateATicketHelper.ClickElement("ClientDisplayIcon");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("EditTicketVerifyResponsibility", "ClickOnClient");
                ticket_CreateATicketHelper.ClickElement("ClickOnClient");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("EditTicketVerifyResponsibility", "Select Assigned To ");
                ticket_CreateATicketHelper.SelectDropDownByText("//*[@id='TicketAssignedUserId']", "Howard Tang");

                executionLog.Log("EditTicketVerifyResponsibility", "Select Assigned Manager");
                ticket_CreateATicketHelper.SelectDropDownByText("//*[@id='TicketAssignedManagerId']", "Howard Tang");

                executionLog.Log("EditTicketVerifyResponsibility", "Click on Save");
                ticket_CreateATicketHelper.ClickElement("ClickOnSaveTicket");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("EditTicketVerifyResponsibility", "Wait text Ticket Created Successfully.");
                ticket_CreateATicketHelper.WaitForText("Ticket Created Successfully.", 10);

                executionLog.Log("EditTicketVerifyResponsibility", "Redirect To Tickets");
                VisitOffice("tickets");
                ticket_CreateATicketHelper.WaitForWorkAround(3000);

                executionLog.Log("EditTicketVerifyResponsibility", "SearchTicket by Name");
                ticket_CreateATicketHelper.TypeText("SearchTicket", TickName);
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("EditTicketVerifyResponsibility", "Select all in assign field");
                ticket_CreateATicketHelper.SelectByText("AssignedField", "All");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("EditTicketVerifyResponsibility", "Click on edit icon");
                ticket_CreateATicketHelper.ClickElement("ClickOnEdit");

                executionLog.Log("EditTicketVerifyResponsibility", "Verify page title.");
                VerifyTitle("Edit Ticket");

                executionLog.Log("EditTicketVerifyResponsibility", "Click on Save");
                ticket_CreateATicketHelper.ClickElement("ClickOnSaveTicket");
                ticket_CreateATicketHelper.WaitForWorkAround(3000);

                executionLog.Log("EditTicketVerifyResponsibility", "Verify Success message. ");
                ticket_CreateATicketHelper.WaitForText("Ticket Edited Successfully", 10);

                executionLog.Log("EditTicketVerifyResponsibility", "Redirect To Tickets");
                VisitOffice("tickets");
                ticket_CreateATicketHelper.WaitForWorkAround(1000);

                executionLog.Log("EditTicketVerifyResponsibility", "SearchTicket by Name");
                ticket_CreateATicketHelper.TypeText("SearchTicket", TickName);
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("EditTicketVerifyResponsibility", "Select all in assign field");
                ticket_CreateATicketHelper.SelectByText("AssignedField", "All");
                ticket_CreateATicketHelper.WaitForWorkAround(2000);

                executionLog.Log("EditTicketVerifyResponsibility", "Select first ticket");
                ticket_CreateATicketHelper.ClickElement("Checkbox1");

                executionLog.Log("EditTicketVerifyResponsibility", "Click on delete link");
                ticket_CreateATicketHelper.ClickElement("DeleteBulk");

                executionLog.Log("EditTicketVerifyResponsibility", "Accept alert message.");
                ticket_CreateATicketHelper.AcceptAlert();

                executionLog.Log("EditTicketVerifyResponsibility", "Wait for success message.");
                ticket_CreateATicketHelper.WaitForText("1 Records deleted successfully", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditTicketVerifyResponsibility");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit Ticket Verify Responsibility");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Edit Ticket Verify Responsibility", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit Ticket Verify Responsibility");
                        TakeScreenshot("EditTicketVerifyResponsibility");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditTicketVerifyResponsibility.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditTicketVerifyResponsibility");
                        string id            = loginHelper.getIssueID("Edit Ticket Verify Responsibility");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditTicketVerifyResponsibility.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit Ticket Verify Responsibility"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit Ticket Verify Responsibility");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditTicketVerifyResponsibility");
                executionLog.WriteInExcel("Edit Ticket Verify Responsibility", Status, JIRA, "Office Tickets");
            }
        }
Пример #13
0
        public void tickets()
        {
            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 officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

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

            // Variable
            var    FName  = "Test" + RandomNumber(99, 99999);
            var    LName  = "Test" + RandomNumber(99, 99999);
            var    CDBA   = "New" + RandomNumber(99, 99999);
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                executionLog.Log("Tickets", "Login with valid credential  Username");
                Login(username[0], password[0]);

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

                executionLog.Log("Tickets", "Vist Tickets page.");
                VisitOffice("tickets");

                executionLog.Log("Tickets", "Verify Heading Tickets");
                officeTickets_CreateTicketsHelper.VerifyText("ViewHeadingTicket", "Tickets");

                executionLog.Log("Tickets", "Goto Create Tickets");
                VisitOffice("tickets/create");

                executionLog.Log("Tickets", "Enter Tickets Subjects");
                officeTickets_CreateTicketsHelper.TypeText("TicketName", "Test Ticket");

                executionLog.Log("Tickets", "Click Assigned icon");
                officeTickets_CreateTicketsHelper.ClickElement("ClientDisplayIcon");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("Tickets", "Click on Tickets");
                officeTickets_CreateTicketsHelper.ClickElement("Client");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("Tickets", "Save");
                officeTickets_CreateTicketsHelper.ClickElement("Save");

                executionLog.Log("Tickets", "Ticket created successfully");
                officeTickets_CreateTicketsHelper.WaitForText("Ticket Created Successfully.", 10);

                executionLog.Log("Tickets", "Click on edit icon.");
                officeTickets_CreateTicketsHelper.ClickElement("ClickEditTicketBtn");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("Tickets", "Save");
                officeTickets_CreateTicketsHelper.ClickElement("Save");
                officeTickets_CreateTicketsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("Tickets");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Tickets");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Tickets", "Bug", "Medium", "Tickets page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Tickets");
                        TakeScreenshot("Tickets");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Tickets.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("Tickets");
                        string id            = loginHelper.getIssueID("Tickets");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Tickets.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Tickets"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Tickets");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("Tickets");
                executionLog.WriteInExcel("Tickets", Status, JIRA, "Office Tickets");
            }
        }
        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");
            }
        }
Пример #15
0
        public void activitiesNotesManagement()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver());
            var office_ClientsHelper         = new Office_ClientsHelper(GetWebDriver());
            var office_LeadsHelper           = new Office_LeadsHelper(GetWebDriver());
            var office_OpportunitiesHelper   = new Office_OpportunitiesHelper(GetWebDriver());
            var ticket_CreateATicketHelper   = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

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

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

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

                executionLog.Log("ActivitiesNotesManagement", "Redirect at admin page.");
                VisitOffice("admin");

                executionLog.Log("ActivitiesNotesManagement", "Go to notes page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesNotesManagement", " Click On Create");
                officeActivities_NotesHelper.ClickElement("Create");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Create a New Note");

                executionLog.Log("ActivitiesNotesManagement", "Click on Save  ");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify validation text for subject.");
                officeActivities_NotesHelper.VerifyText("SubjectError", "This field is required.");

                executionLog.Log("ActivitiesNotesManagement", "Enter note subject.");
                officeActivities_NotesHelper.TypeText("Subject", name);

                executionLog.Log("ActivitiesNotesManagement", "Click on save.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Wait for success text");
                officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent");
                officeActivities_NotesHelper.Select("NoteParent", "20");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any client.");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on save button.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at clients page.");
                VisitOffice("clients");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes.");
                office_ClientsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search.");
                office_ClientsHelper.TypeText("ActivitySubject", name);
                office_ClientsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                VerifyTitle("Edit Note");


                executionLog.Log("ActivitiesNotesManagement", "Select note parent as lead.");
                officeActivities_NotesHelper.Select("NoteParent", "14");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on save button.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at leads page.");
                VisitOffice("leads");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes.");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search.");
                office_LeadsHelper.TypeText("ActivitySubject", name);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_LeadsHelper.SelectByText("CreatedByField", "All");
                office_LeadsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent as opportunity.");
                officeActivities_NotesHelper.Select("NoteParent", "15");

                executionLog.Log("ActivitiesNotesManagement", "Click on findlist icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at opportunities page.");
                VisitOffice("opportunities");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter notes name to be search.");
                office_OpportunitiesHelper.TypeText("ActivitySubject", name);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_OpportunitiesHelper.SelectByText("CreateByField", "All");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify title");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent as tickets.");
                officeActivities_NotesHelper.Select("NoteParent", "36");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any ticket.");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at tickets page.");
                VisitOffice("tickets");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Click On any ticket.");
                ticket_CreateATicketHelper.ClickElement("Ticket1");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

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

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_OpportunitiesHelper.SelectByText("CreateByField", "All");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Verify created note present on ticket page.");
                ticket_CreateATicketHelper.IsElementPresent("OpenTicket");

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title.");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select First Note");
                officeActivities_NotesHelper.ClickElement("SelectNote1");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click Delete btn  ");
                officeActivities_NotesHelper.ClickElement("DeleteNote");

                executionLog.Log("ActivitiesNotesManagement", "Accept alert message. ");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesNotesManagement", "Wait for delete message. ");
                officeActivities_NotesHelper.WaitForText("Note deleted successfully", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect to recycle bin");
                VisitOffice("notes/recyclebin");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Enter Subject in Search field");
                officeActivities_NotesHelper.TypeText("EnterSubject", name);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on delete icon.");
                officeActivities_NotesHelper.ClickElement("DeleteNoteRBin");
                //officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Accept alert message.");
                officeActivities_NotesHelper.AcceptAlert();
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Wait for success message.");
                officeActivities_NotesHelper.WaitForText("Note Permanently Deleted.", 5);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ActivitiesNotesManagement");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Activities Notes Management");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Activities Notes Management", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Activities Notes Management");
                        TakeScreenshot("ActivitiesNotesManagement");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesNotesManagement.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ActivitiesNotesManagement");
                        string id            = loginHelper.getIssueID("Activities Notes Management");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesNotesManagement.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Activities Notes Management"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Activities Notes Management");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ActivitiesNotesManagement");
                executionLog.WriteInExcel("Activities Notes Management", Status, JIRA, "Office Activities");
            }
        }
Пример #16
0
        public void verifyTicketCommentRemoved()
        {
            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 ticket_CreateATicketHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver());

            // Variable
            var    File   = GetPathToFile() + "test.msg";
            String JIRA   = "";
            String Status = "Pass";

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

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

            executionLog.Log("VerifyTicketCommentRemoved", "Redirect To Tickets");
            VisitOffice("tickets");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            VerifyTitle("Tickets");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.ClickElement("ClickOnTicket");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.WaitForElementPresent("AddComment", 10);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.ClickElement("AddComment");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.WaitForElementPresent("CommentDescryption", 10);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.TypeText("CommentDescryption", "This is a test ticket");
            ticket_CreateATicketHelper.WaitForWorkAround(4000);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.UploadFile("//*[@id='DocumentFile']", File);
            ticket_CreateATicketHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.VerifyPageText("test.msg");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.ClickElement("DeleteAttachment");
            ticket_CreateATicketHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify Page title");
            ticket_CreateATicketHelper.VerifyPageText("No File Selected.");
        }