Exemple #1
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");
            }
        }
Exemple #2
0
        public void adminEquipmentEquipmentURLChange()
        {
            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
            var    FirstName = "Test" + GetRandomNumber();
            var    LastName  = "Tester" + GetRandomNumber();
            var    Number    = "12345678" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("AdminEquipmentEquipmentURLChange", "Goto User Admin Product >> Product  ");
                VisitOffice("equipment");

                executionLog.Log("AdminEquipmentEquipmentURLChange", "Click On any Product >> Product");
                eqiupment_EquipmentHelper.ClickElement("ClickOneQUIP");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminEquipmentEquipmentURLChange", "Change the url with the url number of another office");
                VisitOffice("equipment/view/616");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("AdminEquipmentEquipmentURLChange", "Verify Validation");
                eqiupment_EquipmentHelper.VerifyPageText("oops something went wrong");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

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

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify manufacturer name column is visible on the page.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadManufacturer");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify model column is visible on the page.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadModel");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify modified column is visible on the page.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadModified");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Select manufacturer name in displayed columns.");
                eqiupment_EquipmentHelper.SelectByText("DisplayedCols", "Manufacturer Name");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Select Model in displayed columns.");
                eqiupment_EquipmentHelper.SelectByText("DisplayedCols", "Model");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Select modified in displayed columns.");
                eqiupment_EquipmentHelper.SelectByText("DisplayedCols", "Modified");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify manufacturer name not present on page.");
                eqiupment_EquipmentHelper.IsElementNotPresent("HeadManufacturer");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify model not present on page.");
                eqiupment_EquipmentHelper.IsElementNotPresent("HeadModel");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify modified not present on page.");
                eqiupment_EquipmentHelper.IsElementNotPresent("HeadModified");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Redirect at leads page.");
                VisitOffice("leads");

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify page title as leads.");
                VerifyTitle("Leads");

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

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify default position of manufacturer name column.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadManufacturer5");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify default position of model column.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadModel6");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Select manufacturer name in displayed column.");
                eqiupment_EquipmentHelper.SelectByText("DisplayedCols", "Manufacturer Name");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Move manufacturer name 1 step up.");
                eqiupment_EquipmentHelper.ClickElement("MoveUp");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Move manufacturer name 1 step up.");
                eqiupment_EquipmentHelper.ClickElement("MoveUp");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Move manufacturer name 1 step up.");
                eqiupment_EquipmentHelper.ClickElement("MoveUp");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Select model in displayed column.");
                eqiupment_EquipmentHelper.SelectByText("DisplayedCols", "Model");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Move model 1 step down.");
                eqiupment_EquipmentHelper.ClickElement("MoveDown");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify changed position of manufacturer name column.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadManufacturer3");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentsAdvanceFilterColumnOrder", "Verify changed position of model column.");
                eqiupment_EquipmentHelper.IsElementPresent("HeadModel7");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

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


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

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

                executionLog.Log("EquipmentChangeHistoryFilter", "Redirecte to admin");
                VisitOffice("admin");

                executionLog.Log("EquipmentChangeHistoryFilter", "Redirect at equipment page.");
                VisitOffice("equipment");

                executionLog.Log("EquipmentChangeHistoryFilter", "Click on any equipment.");
                eqiupment_EquipmentHelper.ClickElement("ClickOneQUIP");

                executionLog.Log("EquipmentChangeHistoryFilter", "Wait for change history text box to be present.");
                eqiupment_EquipmentHelper.WaitForElementPresent("ChangeHistory", 06);

                executionLog.Log("EquipmentChangeHistoryFilter", "Scroll to change history field.");
                eqiupment_EquipmentHelper.ScrollToElement("ChangeHistory");

                executionLog.Log("EquipmentChangeHistoryFilter", "Enter id in chngr history.");
                //eqiupment_EquipmentHelper.TypeText("ChangeHistory", "id");

                executionLog.Log("EquipmentChangeHistoryFilter", "Wait for locator to be present.");
                eqiupment_EquipmentHelper.WaitForElementPresent("VerifyID", 06);

                executionLog.Log("EquipmentChangeHistoryFilter", "Verify id on the page.");
                eqiupment_EquipmentHelper.VerifyText("VerifyID", "id");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EquipmentChangeHistoryFilter");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Equipment Change History Filter");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Equipment Change History Filter", "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("EquipmentChangeHistoryFilter");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentChangeHistoryFilter.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EquipmentChangeHistoryFilter");
                        string id            = loginHelper.getIssueID("Equipment Change History Filter");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentChangeHistoryFilter.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Equipment Change History Filter"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Equipment Change History Filter");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EquipmentChangeHistoryFilter");
                executionLog.WriteInExcel("Equipment Change History Filter", Status, JIRA, "Admin Equipments");
            }
        }
        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");
            }
        }
Exemple #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");
            }
        }
Exemple #8
0
        public void equipmentsAdvanceFilterResultsPP()
        {
            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("EquipmentsAdvanceFilterResultsPP", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

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

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

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Verify page title.");
                VerifyTitle("Equipment");
                eqiupment_EquipmentHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Select number of records to 10.");
                eqiupment_EquipmentHelper.SelectByText("ResultsPerPage", "10");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                // eqiupment_EquipmentHelper.VerifyText("No.ofRecords", "Showing 1 - 10 of");
                eqiupment_EquipmentHelper.ShowResult(10);
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Select number of records to 20.");
                eqiupment_EquipmentHelper.SelectByText("ResultsPerPage", "20");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                //   eqiupment_EquipmentHelper.VerifyText("No.ofRecords", "Showing 1 - 20 of");
                eqiupment_EquipmentHelper.ShowResult(20);
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Select number of records to 50.");
                eqiupment_EquipmentHelper.SelectByText("ResultsPerPage", "50");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                //   eqiupment_EquipmentHelper.VerifyText("No.ofRecords", "Showing 1 - 50 of");
                eqiupment_EquipmentHelper.ShowResult(50);
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Select number of records to 100.");
                eqiupment_EquipmentHelper.SelectByText("ResultsPerPage", "100");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Click on Apply button.");
                eqiupment_EquipmentHelper.ClickElement("Apply");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("EquipmentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                //   eqiupment_EquipmentHelper.VerifyText("No.ofRecords", "Showing 1 - 100 of");
                eqiupment_EquipmentHelper.ShowResult(100);
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

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

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