public void equipmentManagement()
        {
            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 eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver());

            // Variable
            var    name   = "Test" + RandomNumber(1, 999);
            var    Id     = "123" + RandomNumber(1, 999);
            String JIRA   = "";
            String Status = "Pass";

            //try
            //{

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

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

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

            executionLog.Log("EquipmentManagement", "Redirect To URL");
            VisitOffice("equipment");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Verify title");
            VerifyTitle("Equipment");

            executionLog.Log("EquipmentManagement", " Click On Create");
            eqiupment_EquipmentHelper.Clickjs("Create");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Verify title");
            VerifyTitle("Equipment Create");

            executionLog.Log("EquipmentManagement", " Click on Save button ");
            eqiupment_EquipmentHelper.Clickjs("Save");
            //eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", " Verify validation text on page.");
            eqiupment_EquipmentHelper.VerifyPageText("This field is required.");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Enter Equipment Name");
            eqiupment_EquipmentHelper.TypeText("Name", name);
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Select Equipment type");
            eqiupment_EquipmentHelper.Select("Type", "Check Reader");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Enter Equipment Id");
            eqiupment_EquipmentHelper.TypeText("EquipmentId", Id);
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Enter Version");
            eqiupment_EquipmentHelper.TypeText("Version", "6.0.1");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Enter Description");
            eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Select first processor");
            eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");

            executionLog.Log("EquipmentManagement", "Select second processor.");
            eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2");

            executionLog.Log("EquipmentManagement", " Click on Save button ");
            eqiupment_EquipmentHelper.ClickElement("Save");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", " Wait for save equipment text ");
            eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 10);

            executionLog.Log("EquipmentManagement", "Redirect To URL");
            VisitOffice("equipment");
            eqiupment_EquipmentHelper.WaitForWorkAround(4000);

            executionLog.Log("EquipmentManagement", "Verify title");
            VerifyTitle("Equipment");
            //eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Enter ID to search equipment.");
            eqiupment_EquipmentHelper.TypeText("SearchId", Id);
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Click on edit equipment.");
            eqiupment_EquipmentHelper.Clickjs("EditEquipment");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Enter Version");
            eqiupment_EquipmentHelper.TypeText("Version", "");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", " Click on Save button ");
            eqiupment_EquipmentHelper.ClickElement("Save");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", " Verify version error text.");
            eqiupment_EquipmentHelper.VerifyText("VerifyVersionVal", "This field is required.");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Enter Version");
            eqiupment_EquipmentHelper.TypeText("Version", "10.0.1");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", "Click on Add version.");
            eqiupment_EquipmentHelper.ClickElement("ClickAddAnother");
            eqiupment_EquipmentHelper.WaitForWorkAround(1000);

            executionLog.Log("EquipmentManagement", "Enter Version");
            eqiupment_EquipmentHelper.TypeText("AddedVersion", "2");
            //eqiupment_EquipmentHelper.WaitForWorkAround(500);

            executionLog.Log("EquipmentManagement", " Click on Save button ");
            eqiupment_EquipmentHelper.ClickElement("Save");
            eqiupment_EquipmentHelper.WaitForWorkAround(4000);

            executionLog.Log("EquipmentManagement", "Enter ID to search equipment");
            eqiupment_EquipmentHelper.TypeText("SearchId", Id);
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Click On Equipment");
            eqiupment_EquipmentHelper.ClickElement("ClickOneQUIP");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Click On Clone");
            eqiupment_EquipmentHelper.ClickElement("ClickOnClone");
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "wait for success message.");
            eqiupment_EquipmentHelper.WaitForText("Equipment is cloned successfully", 20);

            executionLog.Log("EquipmentManagement", "Redirect To URL");
            VisitOffice("equipment");
            eqiupment_EquipmentHelper.WaitForWorkAround(3000);

            executionLog.Log("EquipmentManagement", "Verify title");
            VerifyTitle("Equipment");
            //eqiupment_EquipmentHelper.WaitForWorkAround(1000);

            executionLog.Log("EquipmentManagement", "Click On first chk box");
            eqiupment_EquipmentHelper.ClickElement("ClickOnFirstCheckBox");

            executionLog.Log("EquipmentManagement", "Click On Bulk Update");
            eqiupment_EquipmentHelper.Clickjs("BulkUpdate");
            eqiupment_EquipmentHelper.WaitForWorkAround(1000);

            executionLog.Log("EquipmentManagement", "Click to Change Status");
            eqiupment_EquipmentHelper.ClickElement("ChangeStatusBU");
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Select Status as active");
            eqiupment_EquipmentHelper.Select("SelectStatus", "1");
            //eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Click on Update button");
            eqiupment_EquipmentHelper.ClickElement("ClickOnSaveBulkPopUp");
            //eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Accept alert message.");
            eqiupment_EquipmentHelper.AcceptAlert();
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Wait for success message.");
            eqiupment_EquipmentHelper.WaitForText("1 Record(s) updated successfully", 10);

            executionLog.Log("EquipmentManagement", "Click on delete Icon");
            eqiupment_EquipmentHelper.ClickElement("ClickDelClone");
            eqiupment_EquipmentHelper.WaitForWorkAround(1000);

            executionLog.Log("EquipmentManagement", "Accept alert message.");
            eqiupment_EquipmentHelper.AcceptAlert();

            executionLog.Log("EquipmentManagement", "Wait for delete success message.");
            eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully.", 10);
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Enter ID to search equipment.");
            eqiupment_EquipmentHelper.TypeText("SearchId", Id);
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Click Delete Icon ");
            eqiupment_EquipmentHelper.Clickjs("DeleteEuipment");
            eqiupment_EquipmentHelper.WaitForWorkAround(1000);

            executionLog.Log("EquipmentManagement", "Accept alert message. ");
            eqiupment_EquipmentHelper.AcceptAlert();
            eqiupment_EquipmentHelper.WaitForWorkAround(2000);

            executionLog.Log("EquipmentManagement", "Wait for delete message. ");
            eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully", 10);

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

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

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
            String JIRA   = "";
            String Status = "Pass";

            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 eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver());

            // Variable
            String name = "Test" + RandomNumber(1, 99);
            String Id   = "12345" + RandomNumber(1, 99);


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

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


                executionLog.Log("VerifyAddAnotherVersionDisplay", "Click on Profile Icon");
                eqiupment_EquipmentHelper.Clickjs("ProfileIcon");

                executionLog.Log("VerifyAddAnotherVersionDisplay", "Click on Admin Button");
                eqiupment_EquipmentHelper.Clickjs("AdminBtn");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyAddAnotherVersionDisplay", "Click on Terminal And Equipment Tab");
                eqiupment_EquipmentHelper.MouseOverAndWait("ClickOnEquipmentTab", 3);

                executionLog.Log("VerifyAddAnotherVersionDisplay", "Click on equipmet button");
                eqiupment_EquipmentHelper.Clickjs("EquipmentBtn");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyAddAnotherVersionDisplay", " Click On Create");
                eqiupment_EquipmentHelper.ClickElement("Create");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyAddAnotherVersionDisplay", "Click on Add Another");
                eqiupment_EquipmentHelper.ClickElement("ClickAddAnother");

                executionLog.Log("VerifyAddAnotherVersionDisplay", "ClickAddAnother");
                eqiupment_EquipmentHelper.ClickElement("ClickAddAnother");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

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

                executionLog.Log("EquipentblankValidation", "Click  On menu icon");
                // eqiupment_EquipmentHelper.ClickElement("MenuIcon");

                executionLog.Log("EquipentblankValidation", "Click on Terminal And Equipment Tab");
                eqiupment_EquipmentHelper.MouseOverAndWait("ClickOnEquipmentTab", 2);

                executionLog.Log("EquipentblankValidation", "Click on equipment button");
                eqiupment_EquipmentHelper.Clickjs("EquipmentBtn");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipentblankValidation", " Click On Create");
                eqiupment_EquipmentHelper.ClickElement("Create");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipentblankValidation", " Click on Save button   ");
                eqiupment_EquipmentHelper.ClickElement("Save");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipentblankValidation", "Verify validation");
                eqiupment_EquipmentHelper.VerifyText("VerifyVersionVal", "This field is required.");

                executionLog.Log("EquipentblankValidation", "Enter Equipment Name");
                eqiupment_EquipmentHelper.TypeText("Name", name);

                executionLog.Log("EquipentblankValidation", "Enter DownloadsIDName");
                eqiupment_EquipmentHelper.Select("Type", "Check Reader");

                executionLog.Log("EquipentblankValidation", "Enter Equipment version");
                eqiupment_EquipmentHelper.TypeText("Version", "1");

                executionLog.Log("EquipentblankValidation", " Click on Save button   ");
                eqiupment_EquipmentHelper.ClickElement("Save");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipentblankValidation", "Wait for success text.");
                eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 10);

                executionLog.Log("EquipentblankValidation", "Enter Name in seacrh field");
                eqiupment_EquipmentHelper.TypeText("SearchEquipment", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipentblankValidation", "Click on delete icon");
                eqiupment_EquipmentHelper.ClickElement("DeleteEuipment");

                executionLog.Log("EquipentblankValidation", "Accept Alert Message.");
                eqiupment_EquipmentHelper.AcceptAlert();

                executionLog.Log("EquipentblankValidation", "Verify text Equipment deleted.");
                eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EquipentblankValidation");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Equipent blank Validation");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Equipent blank Validation", "Bug", "Medium", "Equipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Equipent blank Validation");
                        TakeScreenshot("EquipentblankValidation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipentblankValidation.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EquipentblankValidation");
                        string id            = loginHelper.getIssueID("Equipent blank Validation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipentblankValidation.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Equipent blank Validation"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Equipent blank Validation");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EquipentblankValidation");
                executionLog.WriteInExcel("Equipent blank Validation", Status, JIRA, "Equipment Management");
            }
        }
        public void createEquipments()
        {
            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 eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver());

            // Variable
            var    name   = "Test" + GetRandomNumber();
            var    Id     = "12345" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("CreateEquipments", "Click On  Admin");
                VisitOffice("admin");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Redirect To URL");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateEquipments", " Click On Create");
                eqiupment_EquipmentHelper.Clickjs("Create");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment Create");

                executionLog.Log("CreateEquipments", "Enter Equipment Name");
                eqiupment_EquipmentHelper.TypeText("Name", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Select DownloadsIDName");
                eqiupment_EquipmentHelper.Select("Type", "Check Reader");
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Equipment Id");
                eqiupment_EquipmentHelper.TypeText("EquipmentId", Id);
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Version");
                eqiupment_EquipmentHelper.TypeText("Version", "5.1");
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Description");
                eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", " Click on Save button ");
                eqiupment_EquipmentHelper.Clickjs("Save");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", " Wait for save equipment text ");
                eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 20);

                executionLog.Log("CreateEquipments", "Redirect To URL");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(6000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateEquipments", "Enter Name to search");
                eqiupment_EquipmentHelper.TypeText("SearchId", Id);
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "cLICK Delete btn  ");
                eqiupment_EquipmentHelper.Clickjs("DeleteEuipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEquipments", "Accept alert message. ");
                eqiupment_EquipmentHelper.AcceptAlert();
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEquipments", "Wait for delete message. ");
                eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully", 30);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable

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

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

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Verify Page title");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");
                eqiupment_EquipmentHelper.WaitForWorkAround(6000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Goto Equipments.");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Open Advance filter.");
                eqiupment_EquipmentHelper.ClickElement("AdvanceFilter");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Click on Modifier in Available column.");
                eqiupment_EquipmentHelper.ClickElement("Col_Modifier");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Click on Add Icon to add from  to display column.");
                eqiupment_EquipmentHelper.Clickjs("AddCols");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Click on Medified By in Available column.");
                eqiupment_EquipmentHelper.ClickElement("Col_ModifiedBy");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Click on Add Icon to add from  to display column.");
                eqiupment_EquipmentHelper.Clickjs("AddCols");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Verify Modifier display in Sort by dropdown.");
                eqiupment_EquipmentHelper.OptionPresentInDropdown("Modifier");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Verify Modified by display in Sort by drop down.");
                eqiupment_EquipmentHelper.OptionPresentInDropdown("Modified By");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Open Reset button.");
                eqiupment_EquipmentHelper.ClickElement("ResetAdvnceFilter");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Open Advance filter.");
                eqiupment_EquipmentHelper.ClickElement("AdvanceFilter");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Verify Modifier not display in Sort by dropdown.");
                eqiupment_EquipmentHelper.OptionNotPresentInDropdown("//*[@id='order']/option", "Modifier");

                executionLog.Log("EquipmentSortByAdvanceFilterIssue", "Verify Modified By not display in Sort by dropdown.");
                eqiupment_EquipmentHelper.OptionNotPresentInDropdown("//*[@id='order']/option", "Modified By");
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EquipmentSortByAdvanceFilterIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Equipment SortBy Advance Filter Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Equipment SortBy Advance Filter Issue", "Bug", "Medium", "Amex page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Equipment SortBy Advance Filter Issue");
                        TakeScreenshot("EquipmentSortByAdvanceFilterIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentSortByAdvanceFilterIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EquipmentSortByAdvanceFilterIssue");
                        string id            = loginHelper.getIssueID("Equipment SortBy Advance Filter Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentSortByAdvanceFilterIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Equipment SortBy Advance Filter Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Equipment SortBy Advance Filter Issue");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EquipmentSortByAdvanceFilterIssue");
                executionLog.WriteInExcel("Equipment SortBy Advance Filter Issue", Status, JIRA, "Office Equipments");
            }
        }
示例#6
0
        public void bulkUpdateEquipmentStatus()
        {
            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 eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver());

            // Variable
            var    name   = "Test" + GetRandomNumber();
            var    Id     = "12345" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("BulkUpdateEquipmentStatus", "Go to office  Admin");
                VisitOffice("admin");

                executionLog.Log("BulkUpdateEquipmentStatus", "Redirect To equipment page");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(1000);

                executionLog.Log("BulkUpdateEquipmentStatus", "Verify title");
                VerifyTitle("Equipment");

                var Loc = "//table[@id='list1']/tbody/tr[2]";
                if (eqiupment_EquipmentHelper.IsElementPresent(Loc))
                {
                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On Equipment");
                    eqiupment_EquipmentHelper.ClickElement("FirstEquip");
                    eqiupment_EquipmentHelper.WaitForWorkAround(1000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On Clone");
                    eqiupment_EquipmentHelper.ClickElement("Clone");
                    eqiupment_EquipmentHelper.WaitForWorkAround(1000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Verify text Equipment is cloned successfully");
                    eqiupment_EquipmentHelper.WaitForText("Equipment is cloned successfully", 10);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Redirect to equipments page.");
                    VisitOffice("equipment");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On first chk box");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnFirstCheckBox");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On Bulk Update");
                    eqiupment_EquipmentHelper.Clickjs("BulkUpdate");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Change Status");
                    eqiupment_EquipmentHelper.ClickElement("ChangeStatusBU");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Select Status as active");
                    eqiupment_EquipmentHelper.Select("SelectStatus", "1");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click on Update button");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnSaveBulkPopUp");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Accept alert message.");
                    eqiupment_EquipmentHelper.AcceptAlert();
                }
                else
                {
                    executionLog.Log("BulkUpdateEquipmentStatus", " Click On Create");
                    eqiupment_EquipmentHelper.ClickElement("Create");
                    eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                    var EquipName = "Bulk Equipment" + GetRandomNumber();
                    executionLog.Log("BulkUpdateEquipmentStatus", "Enter Equipment Name");
                    eqiupment_EquipmentHelper.TypeText("Name", EquipName);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Select equipment type.");
                    eqiupment_EquipmentHelper.Select("Type", "Check Reader");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Enter Equipment Id");
                    eqiupment_EquipmentHelper.TypeText("EquipmentId", Id);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Enter equipment Version");
                    eqiupment_EquipmentHelper.TypeText("Version", "Testing");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Enter Description");
                    eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On First CheckBox");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnFirstCheckBox");

                    executionLog.Log("BulkUpdateEquipmentStatus", " Click on Save button ");
                    eqiupment_EquipmentHelper.ClickElement("Save");
                    eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Enter Name in seacrh field");
                    eqiupment_EquipmentHelper.TypeText("SearchEquipment", EquipName);

                    executionLog.Log("BulkUpdateEquipmentStatus", "ClickOn Equipment");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnEquipChkBox");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click On Bulk Update");
                    eqiupment_EquipmentHelper.Clickjs("ClickBulkUpdateBtn");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Change Status");
                    eqiupment_EquipmentHelper.ClickElement("ChangeStatusBU");
                    eqiupment_EquipmentHelper.WaitForWorkAround(1000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Select Status");
                    eqiupment_EquipmentHelper.Select("SelectStatus", "1");

                    executionLog.Log("BulkUpdateEquipmentStatus", "Click on Update button");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnSaveBulkPopUp");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateEquipmentStatus", "Accept Alert");
                    eqiupment_EquipmentHelper.AcceptAlert();

                    eqiupment_EquipmentHelper.WaitForText("Record(s) updated successfully", 20);
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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