public void ticketResultsPerPageIssue()
        {
            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 officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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

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

            executionLog.Log("TicketResultsPerPageIssue", "Verify page title.");
            VerifyTitle("Tickets");

            executionLog.Log("TicketResultsPerPageIssue", "Click on advance filter");
            officeTickets_AllTicketsHelper.ClickElement("Advance");

            executionLog.Log("TicketResultsPerPageIssue", "Wait for locator to be present.");
            officeTickets_AllTicketsHelper.WaitForElementPresent("ResultsPerp", 10);

            executionLog.Log("TicketResultsPerPageIssue", "Select results per 20.");
            officeTickets_AllTicketsHelper.Select("ResultsPerp", "20");
            officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

            executionLog.Log("TicketResultsPerPageIssue", "Click on apply button.");
            officeTickets_AllTicketsHelper.ClickElement("Apply");
            officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

            executionLog.Log("TicketResultsPerPageIssue", "Verify that first twenty resords are displayed.");
            officeTickets_AllTicketsHelper.VerifyText("BootomResults", "Showing 1 - 20 ");
            officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
        }
Esempio n. 2
0
        public void ticketComment()
        {
            string[] username = null;
            string[] password = null;
            string[] log      = 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");
            log      = oXMLData.getData("settings/URL", "logout");

            // Initializing the objects
            var    executionLog = new ExecutionLog();
            var    loginHelper  = new LoginHelper(GetWebDriver());
            var    officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());
            string comment = "My Comment " + RandomNumber(1, 9999);



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

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

                executionLog.Log("TicketComment", "Go to Ticket open page");
                VisitOffice("tickets");

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

                executionLog.Log("TicketComment", "Open a ticket");
                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");

                executionLog.Log("TicketComment", "Verify title");
                VerifyTitle("Ticket View");

                executionLog.Log("TicketComment", "wait for 2 seconds");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketComment", "Click on 'Add Comment' button");
                officeTickets_AllTicketsHelper.ClickElement("TicketEdit");

                executionLog.Log("TicketComment", "wait");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketComment", "Type commment");
                officeTickets_AllTicketsHelper.TypeText("TicketComment", comment);

                executionLog.Log("TicketComment", "Click on save button");
                officeTickets_AllTicketsHelper.ClickElement("TicketCommentSave");

                executionLog.Log("TicketComment", "Verify No duplicate comment displayed");
                officeTickets_AllTicketsHelper.verifyCommentCount(comment, 1);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketComment");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Ticket Comment");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Ticket Comment", "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("Ticket Comment");
                        TakeScreenshot("TicketComment");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketComment.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketComment");
                        string id            = loginHelper.getIssueID("Ticketing System");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketComment.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Ticket Comment"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Ticket Comment");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketComment");
                executionLog.WriteInExcel("Ticket Comment", Status, JIRA, "Ticketing System");
            }
        }
Esempio n. 3
0
        public void ticketPopupIssue()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            var Name = "TicketQA" + RandomNumber(10, 100);

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

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

                executionLog.Log("TicketPopupIssue", "Go to Ticket page");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("TicketPopupIssue", "Create the new ticket");
                officeTickets_AllTicketsHelper.ClickElement("CreateBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketPopupIssue", "Enter the name");
                officeTickets_AllTicketsHelper.TypeText("Subject", Name);

                executionLog.Log("TicketPopupIssue", "select the status ");
                officeTickets_AllTicketsHelper.SelectByText("TicketStatus", "New");

                executionLog.Log("TicketPopupIssue", "select the client");
                officeTickets_AllTicketsHelper.ClickElement("SelectClientBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
                officeTickets_AllTicketsHelper.ClickElement("FirstCompany");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketPopupIssue", "Click on Save button");
                officeTickets_AllTicketsHelper.ClickElement("SaveBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketPopupIssue", "search the ticket");
                officeTickets_AllTicketsHelper.TypeText("SearchTicket", Name);
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketPopupIssue", "Select first ticket");
                officeTickets_AllTicketsHelper.ClickElement("Ticket1");

                executionLog.Log("TicketPopupIssue", "Click on Delete button");
                officeTickets_AllTicketsHelper.ClickElement("DelTick");

                executionLog.Log("TicketPopupIssue", "Accept alert");
                officeTickets_AllTicketsHelper.AcceptAlert();

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

                executionLog.Log("TicketPopupIssue", "Verify No Popup displayed");
                Console.WriteLine(officeTickets_AllTicketsHelper.VerifyAlertNotPresent());
                Assert.IsTrue(officeTickets_AllTicketsHelper.VerifyAlertNotPresent());
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketPopupIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Ticket Popup Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Ticket Popup 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 Popup Issue");
                        TakeScreenshot("TicketPopupIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketPopupIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketPopupIssue");
                        string id            = loginHelper.getIssueID("Ticket Popup Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketPopupIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Ticket Popup Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Ticket Popup Issue");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketPopupIssue");
                executionLog.WriteInExcel("Ticket Popup Issue", Status, JIRA, "Ticketing System");
            }
        }
Esempio n. 4
0
        public void one000Added()
        {
            string[] username = null;
            string[] password = null;
            string[] log      = null;
            var      oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog                   = new ExecutionLog();
            var loginHelper                    = new LoginHelper(GetWebDriver());
            var office_ClientsHelper           = new Office_ClientsHelper(GetWebDriver());
            var office_ContactsHelper          = new Office_ContactsHelper(GetWebDriver());
            var officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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

                executionLog.Log("One000Added", "Go to client page");
                VisitOffice("clients");

                executionLog.Log("One000Added", "Verify title");
                VerifyTitle();

                executionLog.Log("One000Added", "Click on Advance filter");
                office_ClientsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                office_ClientsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "Go to contact page");
                VisitOffice("contacts");

                executionLog.Log("One000Added", "Verify title");
                VerifyTitle("Contacts");

                executionLog.Log("One000Added", "Click on Advance filter");
                office_ContactsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                office_ContactsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "Go to Tickets page");
                VisitOffice("tickets");

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

                executionLog.Log("One000Added", "Click on Advance filter");
                officeTickets_AllTicketsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                officeTickets_AllTicketsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "Logout from the application");
                VisitOffice("logout");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("One000Added");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("One 000 Added");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("One 000 Added", "Bug", "Medium", "Advance filter page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("One 000 Added");
                        TakeScreenshot("One000Added");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\One000Added.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("One000Added");
                        string id            = loginHelper.getIssueID("One 000 Added");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\One000Added.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("One 000 Added"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("One 000 Added");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("One000Added");
                executionLog.WriteInExcel("One 000 Added", Status, JIRA, "Client Management");
            }
        }
        public void ticketsAdvanceFilterResultsPP()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Verify page title.");
                VerifyTitle("Tickets");

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("Advance");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Select number of records to 10.");
                officeTickets_AllTicketsHelper.SelectByText("ResultsPerp", "10");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
                officeTickets_AllTicketsHelper.WaitForElementPresent("BootomResults", 10);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeTickets_AllTicketsHelper.ShowResult(10);
                // officeTickets_AllTicketsHelper.VerifyText("BootomResults", "Showing 1 - 10 of");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("Advance");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Select number of records to 20.");
                officeTickets_AllTicketsHelper.SelectByText("ResultsPerp", "20");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
                officeTickets_AllTicketsHelper.WaitForElementPresent("BootomResults", 10);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeTickets_AllTicketsHelper.ShowResult(20);
                //officeTickets_AllTicketsHelper.VerifyText("BootomResults", "Showing 1 - 20 of");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("Advance");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Select number of records to 50.");
                officeTickets_AllTicketsHelper.SelectByText("ResultsPerp", "50");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
                officeTickets_AllTicketsHelper.WaitForElementPresent("BootomResults", 10);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeTickets_AllTicketsHelper.ShowResult(50);
                //officeTickets_AllTicketsHelper.VerifyText("BootomResults", "Showing 1 - 50 of");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("Advance");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Select number of records to 100.");
                officeTickets_AllTicketsHelper.SelectByText("ResultsPerp", "100");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
                officeTickets_AllTicketsHelper.WaitForElementPresent("BootomResults", 10);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeTickets_AllTicketsHelper.ShowResult(100);
                // officeTickets_AllTicketsHelper.VerifyText("BootomResults", "Showing 1 - 100 of");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterResultsPP", "Logout from the application.");
                VisitOffice("logout");
            }

            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketsAdvanceFilterResultsPP");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Tickets Advance Filter ResultsPP");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Tickets Advance Filter ResultsPP", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Tickets Advance Filter ResultsPP");
                        TakeScreenshot("TicketsAdvanceFilterResultsPP");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketsAdvanceFilterResultsPP.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketsAdvanceFilterResultsPP");
                        string id            = loginHelper.getIssueID("Tickets Advance Filter ResultsPP");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketsAdvanceFilterResultsPP.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Tickets Advance Filter ResultsPP"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Tickets Advance Filter ResultsPP");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketsAdvanceFilterResultsPP");
                executionLog.WriteInExcel("Tickets Advance Filter ResultsPP", Status, JIRA, "Opportunities Management");
            }
        }
Esempio n. 6
0
        public void deleteTicket()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("DeleteTicket", "Go to Ticket page");
                VisitOffice("tickets");

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

                executionLog.Log("DeleteTicket", "Select first ticket");
                officeTickets_AllTicketsHelper.ClickElement("FirstCheckBox");

                executionLog.Log("DeleteTicket", "Click on Delete button");
                officeTickets_AllTicketsHelper.ClickElement("DelTick");

                executionLog.Log("DeleteTicket", "Accept alert");
                officeTickets_AllTicketsHelper.AcceptAlert();

                executionLog.Log("DeleteTicket", "Verify success message");
                officeTickets_AllTicketsHelper.WaitForText("0 Records deleted successfully and 1 don't have permissions", 30);

                executionLog.Log("DeleteTicket", "Verify No error message displayed");
                officeTickets_AllTicketsHelper.VerifyTextNotPresent("An Internal Error Occurred");

                VisitOffice("logout");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("DeleteTicket");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Delete Ticket");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Delete Ticket", "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("Delete Ticket");
                        TakeScreenshot("DeleteTicket");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DeleteTicket.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("DeleteTicket");
                        string id            = loginHelper.getIssueID("Delete Ticket");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DeleteTicket.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Delete Ticket"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Delete Ticket");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("DeleteTicket");
                executionLog.WriteInExcel("Delete Ticket", Status, JIRA, "Office Ticket");
            }
        }
Esempio n. 7
0
        public void labelDoubleClickToAddTopicTicket()
        {
            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 officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            // Random Variables
            String JIRA   = "";
            String Status = "Pass";
            var    Name   = "Ticket" + RandomNumber(1, 500);


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

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

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Redirect at opportunities task");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "create a ticket");
                officeTickets_AllTicketsHelper.ClickElement("CreateBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Enter the ticket name");
                officeTickets_AllTicketsHelper.TypeText("Subject", Name);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Select a Client");
                officeTickets_AllTicketsHelper.ClickElement("SelectClientBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Select the Company");
                officeTickets_AllTicketsHelper.ClickElement("FirstCompany");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on 'Save' button");
                officeTickets_AllTicketsHelper.ClickElement("SaveBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(7000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Verify label for ticket displayed.");
                officeTickets_AllTicketsHelper.VerifyText("TOpicVerify", "Double click to add");

                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Search the ticket");
                officeTickets_AllTicketsHelper.TypeText("SearchTicket", Name);
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on check box");
                officeTickets_AllTicketsHelper.ClickElement("TicketInputIcon");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on delete button");
                officeTickets_AllTicketsHelper.ClickElement("DeleteIcon");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);
                officeTickets_AllTicketsHelper.AcceptAlert();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("LabelDoubleClickToAddTopicTicket");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Label Double Click To Add Topic");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Label Double Click To Add Topic", "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("Label Double Click To Add Topic");
                        TakeScreenshot("LabelDoubleClickToAddTopicTicket");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LabelDoubleClickToAddTopicTicket.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("LabelDoubleClickToAddTopicTicket");
                        string id            = loginHelper.getIssueID("Label Double Click To Add Topic");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LabelDoubleClickToAddTopicTicket.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Label Double Click To Add Topic"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Label Double Click To Add Topic");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("LabelDoubleClickToAddTopicTicket");
                executionLog.WriteInExcel("Label Double Click To Add Topic", Status, JIRA, "Office Tickets");
            }
        }
Esempio n. 8
0
        public void ticketIssue()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

                executionLog.Log("TicketIssue", "Go to open Ticket page");
                VisitOffice("ticket-search/open");

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

                executionLog.Log("TicketIssue", "Get first ticket id");
                string id = officeTickets_AllTicketsHelper.getText("TickID");

                executionLog.Log("TicketIssue", "Go to closed Ticket page");
                VisitOffice("ticket-search/closed");

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

                executionLog.Log("TicketIssue", "Verify ticket not available");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketIssue", "Go to resolved Ticket page");
                VisitOffice("ticket-search/resolved");

                executionLog.Log("TicketIssue", "Verify title");
                VerifyTitle("Tickets");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Ticket Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Ticket 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 Issue");
                        TakeScreenshot("TicketIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketIssue");
                        string id            = loginHelper.getIssueID("Ticket Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Ticket Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Ticket Issue");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketIssue");
                executionLog.WriteInExcel("Ticket Issue", Status, JIRA, "Ticketing System");
            }
        }
Esempio n. 9
0
        public void ticketsUrlChange()
        {
            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_TicketHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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

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

                executionLog.Log("TicketsUrlChange", "Click On any Ticket");
                office_TicketHelper.ClickElement("ClickOnTickets");
                office_TicketHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsUrlChange", "Change the url with the url number of another office");
                VisitOffice("tickets/view/1297");

                executionLog.Log("TicketsUrlChange", "Verify Validation");
                office_TicketHelper.WaitForText("You don't have privileges to view this ticket.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketsUrlChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Tickets Url Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Tickets Url Change", "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 Url Change");
                        TakeScreenshot("TicketsUrlChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketsUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketsUrlChange");
                        string id            = loginHelper.getIssueID("Tickets Url Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketsUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Tickets Url Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Tickets Url Change");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketsUrlChange");
                executionLog.WriteInExcel("Tickets Url Change", Status, JIRA, "Office Tickets");
            }
        }
        public void verifyTicketDocMultipleAttachment()
        {
            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 officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            // Variable
            var    name   = "Ticket" + RandomNumber(1, 999);
            var    File1  = GetPathToFile() + "2.pdf";
            var    File2  = GetPathToFile() + "1.pdf";
            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", "Click on any ticket.");
            officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");

            executionLog.Log("VerifyTicketCommentRemoved", "Wait for locator to be present.");
            officeTickets_AllTicketsHelper.WaitForElementPresent("AddDoc", 10);

            executionLog.Log("VerifyTicketCommentRemoved", "Click on add document.");
            officeTickets_AllTicketsHelper.ClickElement("AddDoc");

            executionLog.Log("VerifyTicketCommentRemoved", "Wait for locator to be present.");
            officeTickets_AllTicketsHelper.WaitForElementPresent("DocName", 10);

            executionLog.Log("VerifyTicketCommentRemoved", "Enter document name.");
            officeTickets_AllTicketsHelper.TypeText("DocName", name);

            executionLog.Log("VerifyTicketCommentRemoved", "Browse first file.");
            officeTickets_AllTicketsHelper.UploadFile("//*[@id='DocumentFiles']", File1);
            officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyTicketCommentRemoved", "Browse second file.");
            officeTickets_AllTicketsHelper.UploadFile("//*[@id='DocumentFiles']", File2);
            officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

            executionLog.Log("VerifyTicketCommentRemoved", "Click on save button.");
            officeTickets_AllTicketsHelper.ClickElement("SaveDoc");

            executionLog.Log("VerifyTicketCommentRemoved", "Redirect at documents page.");
            VisitOffice("documents");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify page title as documents.");
            VerifyTitle("Documents");

            executionLog.Log("VerifyTicketCommentRemoved", "Wait for locator to be present.");
            //         officeTickets_AllTicketsHelper.WaitForElementPresent("File1", 10);

            officeTickets_AllTicketsHelper.TypeText("SearchDoc", name);
            officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

            executionLog.Log("VerifyTicketCommentRemoved", "Verify first attachment.");
            officeTickets_AllTicketsHelper.VerifyText("File1", "1.pdf");

            executionLog.Log("VerifyTicketCommentRemoved", "Verify second attachment.");
            officeTickets_AllTicketsHelper.VerifyText("File2", "2.pdf");
        }
Esempio n. 11
0
        public void bulkUpdatePopup()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            // VARIABLE
            var    name   = "TestEmployee" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("BulkUpdatePopup", "Go to ticket page");
                VisitOffice("tickets");

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

                executionLog.Log("BulkUpdatePopup", "Select First ticket");
                officeTickets_AllTicketsHelper.ClickElement("Ticket1");

                executionLog.Log("BulkUpdatePopup", "Click on Bulk Update button");
                officeTickets_AllTicketsHelper.ClickElement("BulkUpdate");

                executionLog.Log("BulkUpdatePopup", "Click on Change status");
                officeTickets_AllTicketsHelper.ClickElement("ChangeStatus");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdatePopup", "Click on Update button");
                officeTickets_AllTicketsHelper.ClickElement("UpdateBulk");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdatePopup", "Verify permission popup displayed");
                Assert.IsTrue(officeTickets_AllTicketsHelper.VerifyAlertPresent());
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);
            }

            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("BulkUpdatePopup");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Bulk Update Popup");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Bulk Update Popup", "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("Bulk Update Popup");
                        TakeScreenshot("BulkUpdatePopup");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\BulkUpdatePopup.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("BulkUpdatePopup");
                        string id            = loginHelper.getIssueID("Bulk Update Popup");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\BulkUpdatePopup.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Bulk Update Popup"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Bulk Update Popup");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("BulkUpdatePopup");
                executionLog.WriteInExcel("Bulk Update Popup", Status, JIRA, "Office ticket");
            }
        }
Esempio n. 12
0
        public void ticketsAdvanceFilterRelatedTo()
        {
            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_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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



                // Verify tickets with notes.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketswithNotes");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as notes.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Notes");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify note present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Notes");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                //Verify tickets with documents.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithDocs");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as documents .");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Documents");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify ticket present has document.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Documents");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                //Verify ticket with meetings.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketsWithMeetings");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as meetings");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Meetings");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify meeting present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Meeting");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                // Verify ticket with tasks .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithTasks");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as tasks.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Tasks");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify task present for the ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Task");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                // Verify ticket with calls .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithCalls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as calls.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Calls");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify calls present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Calls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                // Verify tickets with attachments .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithCalls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify document present is related to clients");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Calls");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify document present is related to clients");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Calls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify page title.");
                VerifyTitle("Tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify status column is visible on the page..");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadStatus");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify priority column is visible on the page.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadPriority");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify age column is visible on the page.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadAge");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify category column is visible on the page.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadCategory");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select status in displayed columns.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Status");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols.");
                officeTickets_AllTicketsHelper.ClickElement("RemoveCols");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select priority in displayed columns.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Priority");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols");
                officeTickets_AllTicketsHelper.ClickElement("RemoveCols");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select age in displayed columns.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Age");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols");
                officeTickets_AllTicketsHelper.ClickElement("RemoveCols");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select category in displayed columns.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Category");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click arrow to move column to avail cols");
                officeTickets_AllTicketsHelper.ClickElement("RemoveCols");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify status not present on page.");
                officeTickets_AllTicketsHelper.IsElementNotPresent("HeadStatus");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify priority not present on page.");
                officeTickets_AllTicketsHelper.IsElementNotPresent("HeadPriority");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify age not present on page.");
                officeTickets_AllTicketsHelper.IsElementNotPresent("HeadAge");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify category not present on page.");
                officeTickets_AllTicketsHelper.IsElementNotPresent("HeadCategory");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Redirect at tickets page.");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify page title as tickets");
                VerifyTitle("Tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify default status of status column.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadStatus4");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify default position of prority column.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadPriority5");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Redirect at tickets page.");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click on advance filter.");
                officeTickets_AllTicketsHelper.ClickElement("AdvanceFilter");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select status in displayed column.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Status");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeTickets_AllTicketsHelper.ClickElement("MoveUp");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeTickets_AllTicketsHelper.ClickElement("MoveUp");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeTickets_AllTicketsHelper.ClickElement("MoveUp");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Select priority in displayed column.");
                officeTickets_AllTicketsHelper.SelectByText("DisplayedCols", "Priority");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Move priority 1 step down.");
                officeTickets_AllTicketsHelper.ClickElement("MoveDown");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Click on apply button.");
                officeTickets_AllTicketsHelper.ClickElement("Apply");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify changed position of status column.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadStatus2");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Verify changed position of priority column.");
                officeTickets_AllTicketsHelper.IsElementPresent("HeadPriority6");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTicketsAdvanceFilerColumnOrder", "Logout from the application.");
                VisitCorp("logout");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog        = new ExecutionLog();
            var loginHelper         = new LoginHelper(GetWebDriver());
            var office_TicketHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            // Variable
            var    TicketName = "Test" + RandomNumber(1, 99);
            string Loc        = "//a[text()=" + "[']" + TicketName + "[']" + "]";
            String JIRA       = "";
            String Status     = "Pass";

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

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

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

                executionLog.Log("TicketCorpVerifyPermisionInBulkUpdate", "Wait for element to present.");
                office_TicketHelper.WaitForElementPresent("BulkUpdate", 08);

                executionLog.Log("TicketCorpVerifyPermisionInBulkUpdate", "Click on Bulk Update button");
                office_TicketHelper.ClickElement("BulkUpdate");
                office_TicketHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketCorpVerifyPermisionInBulkUpdate", "Verify Permissions");
                office_TicketHelper.VerifyText("ClickOnPermision", "Change Permissions");
                office_TicketHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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