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 verifyEquipmentCreatedAndByModifiedByCredits()
        {
            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("VerifyEquipmentCreatedAndByModifiedByCredits", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2");

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

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Redirect at equipments.");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Verify page title as equipments.");
                VerifyTitle("Equipment");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Enter Name in seacrh field");
                eqiupment_EquipmentHelper.TypeText("EnterName", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Click on any equipment");
                eqiupment_EquipmentHelper.ClickElement("FirstEquip");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify equipment created by credits.");
                eqiupment_EquipmentHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify equipment created by credits.");
                eqiupment_EquipmentHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Redirect at eqipments page.");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify page title as equipments.");
                VerifyTitle("Equipment");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Enter Name in seacrh field");
                eqiupment_EquipmentHelper.TypeText("EnterName", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Click on edit button.");
                eqiupment_EquipmentHelper.ClickElement("EditEquipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify title");
                VerifyTitle("Equipment Edit:");

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

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

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

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

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

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Click on Save button");
                eqiupment_EquipmentHelper.ClickElement("Save");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Wait for edit message.");
                eqiupment_EquipmentHelper.WaitForText("The Equipment is edited successfully", 10);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Redirect at equipments.");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", " Verify page title as equipments.");
                VerifyTitle("Equipment");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Enter Name in seacrh field");
                eqiupment_EquipmentHelper.TypeText("EnterName", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Click on any equipment");
                eqiupment_EquipmentHelper.ClickElement("FirstEquip");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify equipment created by credits.");
                eqiupment_EquipmentHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "Verify equipment created by credits.");
                eqiupment_EquipmentHelper.VerifyText("ModifiedBy", "Howard Tang");

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

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

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

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "cLICK Delete btn  ");
                eqiupment_EquipmentHelper.ClickElement("DeleteEuipment");

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

                executionLog.Log("VerifyEquipmentCreatedAndByModifiedByCredits", "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("VerifyEquipmentCreatedAndByModifiedByCredits");
                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("VerifyEquipmentCreatedAndByModifiedByCredits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEquipmentCreatedAndByModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyEquipmentCreatedAndByModifiedByCredits");
                        string id            = loginHelper.getIssueID("Create Equipments");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEquipmentCreatedAndByModifiedByCredits.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("VerifyEquipmentCreatedAndByModifiedByCredits");
                executionLog.WriteInExcel("Create Equipments", Status, JIRA, "Equipment Management");
            }
        }
示例#3
0
        public void equepmentDeleteError()
        {
            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());
            String Status = "Pass";
            String JIRA   = "";
            var    eqname = "testequip" + RandomNumber(11, 99999);

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

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

                executionLog.Log("EquepmentDeleteError", "Redirect Create Equipment page");
                VisitOffice("equipment/create");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquepmentDeleteError", "Enter Name");
                eqiupment_EquipmentHelper.TypeText("Name", eqname);

                executionLog.Log("EquepmentDeleteError", "Select Type");
                eqiupment_EquipmentHelper.SelectByText("Type", "Terminal");

                executionLog.Log("EquepmentDeleteError", "Enter Version");
                eqiupment_EquipmentHelper.TypeText("Version", "2");

                executionLog.Log("EquepmentDeleteError", "Select Applicable Processor");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");

                executionLog.Log("EquepmentDeleteError", "Click on Save button");
                eqiupment_EquipmentHelper.ClickElement("Save");
                eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 10);
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquepmentDeleteError", "Search Equipment by Name");
                eqiupment_EquipmentHelper.TypeText("SearchEquipment", eqname);
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquepmentDeleteError", "Click on checkbox.");
                eqiupment_EquipmentHelper.ClickElement("SectEquip");

                executionLog.Log("EquepmentDeleteError", "Delete second equipment");
                eqiupment_EquipmentHelper.ClickElement("Deleteeqp");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

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

                executionLog.Log("EquepmentDeleteError", "navigate to other tab");
                VisitCorp("newthemeoffice");

                executionLog.Log("EquepmentDeleteError", "Redirect To equipment");
                VisitOffice("equipment");
            }

            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EquepmentDeleteError");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Equepment Delete Error");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Equepment Delete Error", "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("Equepment Delete Error");
                        TakeScreenshot("EquepmentDeleteError");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquepmentDeleteError.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EquepmentDeleteError");
                        string id            = loginHelper.getIssueID("Equepment Delete Error");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquepmentDeleteError.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Equepment Delete Error"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Equepment Delete Error");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EquepmentDeleteError");
                executionLog.WriteInExcel("Equepment Delete Error", 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");
            }
        }
示例#5
0
        public void cloneEquipment()
        {
            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("CloneEquipment", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("CloneEquipment", "Login with valid username and password");
                VerifyTitle("Dashboard");

                executionLog.Log("CloneEquipment", "Visit equipment page.");
                VisitOffice("equipment");

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

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

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

                    executionLog.Log("CloneEquipment", "Verify Confirmation");
                    eqiupment_EquipmentHelper.VerifyPageText("Equipment is cloned successfully");

                    executionLog.Log("CloneEquipment", "Click on delete Clone");
                    eqiupment_EquipmentHelper.ClickElement("ClickDelClone");

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

                    executionLog.Log("CloneEquipment", "Wait for delete success message.");
                    eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully.", 30);
                }
                else
                {
                    executionLog.Log("CloneEquipment", " Click On Create");
                    VisitOffice("equipment/create");
                    eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                    executionLog.Log("CloneEquipment", "Enter Equipment Name");
                    eqiupment_EquipmentHelper.TypeText("Name", "Clone Equipment");

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

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

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

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

                    executionLog.Log("CloneEquipment", " Click on Save button");
                    eqiupment_EquipmentHelper.ClickElement("Save");
                    eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                    executionLog.Log("CloneEquipment", "Click On Equipment");
                    eqiupment_EquipmentHelper.ClickElement("FirstEquip");

                    executionLog.Log("CloneEquipment", "Click On Clone");
                    eqiupment_EquipmentHelper.ClickElement("ClickOnClone");

                    executionLog.Log("CloneEquipment", "Verify Equipment is cloned successfully");
                    eqiupment_EquipmentHelper.VerifyPageText("Equipment is cloned successfully");
                    eqiupment_EquipmentHelper.VerifyPageText("Clone of Equipment");

                    executionLog.Log("CloneEquipment", "Click on delete clone");
                    eqiupment_EquipmentHelper.ClickElement("ClickDelClone");

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

                    executionLog.Log("CloneEquipment", "Verify Equipment is deleted successfully");
                    eqiupment_EquipmentHelper.VerifyPageText("Equipment deleted successfully.");
                    eqiupment_EquipmentHelper.WaitForWorkAround(3000);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CloneEquipment");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Clone Equipment");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Clone Equipment", "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("Clone Equipment");
                        TakeScreenshot("CloneEquipment");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CloneEquipment.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CloneEquipment");
                        string id            = loginHelper.getIssueID("Clone Equipment");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CloneEquipment.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Clone Equipment"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Clone Equipment");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CloneEquipment");
                executionLog.WriteInExcel("Clone Equipment", Status, JIRA, "Admin Equipments");
            }
        }
        public void clickEditEquipmentAfterConfirmDelete()
        {
            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     = GetRandomNumber().ToString();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", "Go to Admin page");
                VisitOffice("admin");

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", "Go to equipments page.");
                VisitOffice("equipment");

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", "Click On Create");
                eqiupment_EquipmentHelper.ClickElement("Create");

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

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

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

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

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

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

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", " Click on Save button");
                eqiupment_EquipmentHelper.ClickElement("Save");

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

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", "SearchEquipmenmt");
                eqiupment_EquipmentHelper.TypeText("SearchEquipment", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

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

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

                executionLog.Log("ClickEditEquipmentAfterConfirmDelete", "Click edit equipment.");
                eqiupment_EquipmentHelper.ClickElement("DeleteEuipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ClickEditEquipmentAfterConfirmDelete");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Click Edit Equipment After Confirm Delete");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Click Edit Equipment After Confirm Delete", "Bug", "Medium", "Eqipment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Click Edit Equipment After Confirm Delete");
                        TakeScreenshot("ClickEditEquipmentAfterConfirmDelete");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ClickEditEquipmentAfterConfirmDelete.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ClickEditEquipmentAfterConfirmDelete");
                        string id            = loginHelper.getIssueID("Click Edit Equipment After Confirm Delete");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ClickEditEquipmentAfterConfirmDelete.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Click Edit Equipment After Confirm Delete"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Click Edit Equipment After Confirm Delete");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ClickEditEquipmentAfterConfirmDelete");
                executionLog.WriteInExcel("Click Edit Equipment After Confirm Delete", Status, JIRA, "Equipment Management");
            }
        }
示例#7
0
        public void validationForAlreadyExistingEquipment()
        {
            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());

            // Random Variables
            var    IdNum  = "5" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("ValidationForAlreadyExistingEquipment", "Redirect at equipment page.");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                var loc = "//table[@id='list1']/tbody/tr[2]/td[4]/a[text()='Test246']";
                if (eqiupment_EquipmentHelper.IsElementPresent(loc))
                {
                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Click on Edit equipment");
                    eqiupment_EquipmentHelper.ClickElement("EditEquipment3");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Enter equipment name.");
                    eqiupment_EquipmentHelper.TypeText("Name", "Test246");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Click on Save button.");
                    eqiupment_EquipmentHelper.ClickElement("Save");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Wait for exisiting equipment alert.");
                    eqiupment_EquipmentHelper.WaitForText("The Equipment name is already exist.", 10);
                }
                else
                {
                    executionLog.Log("EditEquipment", " Click On Create");
                    eqiupment_EquipmentHelper.ClickElement("Create");

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

                    var name = "Equipment" + RandomNumber(11, 999);
                    executionLog.Log("EditEquipment", "Enter Equipment Name");
                    eqiupment_EquipmentHelper.TypeText("Name", name);

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

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

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

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

                    executionLog.Log("EditEquipment", "Click On First CheckBox");
                    eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");

                    executionLog.Log("EditEquipment", "Click On First CheckBox");
                    eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2");

                    executionLog.Log("EditEquipment", " Click on Save button ");
                    eqiupment_EquipmentHelper.ClickElement("Save");

                    executionLog.Log("EditEquipment", "Wait for save message.");
                    eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 30);

                    executionLog.Log("EditEquipment", "Enter Name in seacrh field");
                    eqiupment_EquipmentHelper.TypeText("EnterName", name);
                    eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Click on Edit equipment");
                    eqiupment_EquipmentHelper.ClickElement("EditEquipment");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Enter equipment name.");
                    eqiupment_EquipmentHelper.TypeText("Name", "Test246");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Click on Save button.");
                    eqiupment_EquipmentHelper.ClickElement("Save");

                    executionLog.Log("ValidationForAlreadyExistingEquipment", "Wait for exisiting equipment alert.");
                    eqiupment_EquipmentHelper.WaitForText("The Equipment name is already exist.", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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