public void setFieldLength()
        {
            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 fieldLength  = new AdminSetFormatFieldsHelper(GetWebDriver());

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

            try
            {
                executionLog.Log("AdminFieldLengthValidation", "WaitForWorkAround");
                //fieldLength.WaitForWorkAround(2000);

                //Logging in
                executionLog.Log("AdminFieldLengthValidation", "Login");
                Login(username[0], password[0]);

                executionLog.Log("AdminFieldLengthValidation", "WaitForWorkAround");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Verify Title Dashboard");
                VerifyTitle("Dashboard");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click on Menu Icon");
                fieldLength.ClickElement("MenuIcon");

                executionLog.Log("AdminFieldLengthValidation", "Click Clients Tab Element");
                fieldLength.MouseHover("ClientsTab");
                fieldLength.ClickJs("ClientBtn");
                fieldLength.WaitForWorkAround(3000);
                //fieldLength.WaitForElementPresent("FirstClient", 20);

                executionLog.Log("AdminFieldLengthValidation", "Click First Client Element");
                fieldLength.ClickElement("FirstClient");
                fieldLength.WaitForWorkAround(3000);
                //fieldLength.WaitForElementPresent("CompanyDetails", 10);

                executionLog.Log("AdminFieldLengthValidation", "Mouse Hover CompanyDetails");
                fieldLength.MouseHover("CompanyDetails");
                //fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", "Click Company Details Element");
                fieldLength.ClickElement("CompanyDetails");
                fieldLength.WaitForWorkAround(3000);

                // Verifying the field exists that will be changed
                executionLog.Log("AdminFieldLengthValidation", "Wait for City Field");
                fieldLength.ElementVisible("CityField");
                //fieldLength.WaitForWorkAround(1000);

                // Going to admin office
                executionLog.Log("AdminFieldLengthValidation", "Visit admin Office");
                //VisitOffice("admin");
                //fieldLength.WaitForWorkAround(1000);

                // Accessing field in field dictionary
                VisitOffice("fields");
                fieldLength.WaitForWorkAround(3000);

                fieldLength.SelectByText("Module", "Clients");
                fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", "Click Search Element");
                fieldLength.ClickElement("Search");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", " type city ");
                fieldLength.TypeText("filter", "city");
                fieldLength.WaitForWorkAround(2000);

                executionLog.Log("AdminFieldLengthValidation", "Click City Element");
                fieldLength.ClickJs("City");
                fieldLength.WaitForWorkAround(4000);

                // setting length limit

                executionLog.Log("AdminFieldLengthValidation", "Click Field Length CheckBox Element");
                fieldLength.checkAndClick("FieldLengthCheckBox");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Type 1");
                fieldLength.TypeText("MinBox", "1");
                //fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", " Type 5 ");
                fieldLength.TypeText("MaxBox", "5");
                //fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", "Click Save Field Manager Element");
                fieldLength.ClickElement("SaveFieldManager");
                //fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", "WaitForWorkAround");
                fieldLength.WaitForWorkAround(3000);

                // visiting office main
                executionLog.Log("AdminFieldLengthValidation", "Visit main office ");
                VisitOffice("clients");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click First Client Element");
                fieldLength.ClickElement("FirstClient");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Hover over CompanyDetails");
                fieldLength.MouseHover("CompanyDetails");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click Company Details Element");
                fieldLength.ClickElement("CompanyDetails");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Type City Goes Here");
                fieldLength.TypeText("CityField", "CityGoesHere");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Verify CityG");
                fieldLength.TypeText("CityField", "CityG");
                //fieldLength.WaitForWorkAround(3000);

                // Going to admin office
                //executionLog.Log("AdminFieldLengthValidation", "Visit admin office ");
                //VisitOffice("admin");

                // Accessing field in field dictionary
                VisitOffice("fields");
                fieldLength.WaitForWorkAround(3000);

                fieldLength.SelectByText("Module", "Clients");
                fieldLength.WaitForWorkAround(1000);

                executionLog.Log("AdminFieldLengthValidation", "Click Search Element");
                fieldLength.ClickElement("Search");
                fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click filter Element");
                fieldLength.ClickElement("filter");

                executionLog.Log("AdminFieldLengthValidation", " type city ");
                fieldLength.TypeText("filter", "city");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click City Element");
                fieldLength.ClickJs("City");
                fieldLength.WaitForWorkAround(3000);

                // restoring to original setting
                executionLog.Log("AdminFieldLengthValidation", "Click Field Length CheckBox Element");
                fieldLength.ClickElement("FieldLengthCheckBox");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Wait For Work Around");
                //fieldLength.WaitForWorkAround(3000);

                executionLog.Log("AdminFieldLengthValidation", "Click Save Field Manager Element");
                fieldLength.ClickElement("SaveFieldManager");
                fieldLength.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            //Random Variable
            String JIRA    = "";
            String Status  = "Pass";
            var    DBAName = "DBA@Company" + RandomNumber(1, 999);

            try
            {
                executionLog.Log("AdminSetValidationDecimal", "Login");
                Login(username[0], password[0]);

                //executionLog.Log("AdminSetValidationDecimal", "Wait");
                //validate.WaitForWorkAround(4000);

                executionLog.Log("AdminSetValidationDecimal", "Verify Title Dashboard");
                VerifyTitle("Dashboard");

                //VisitOffice("clients");
                //validate.WaitForWorkAround(3000);

                //executionLog.Log("AdminSetValidationDecimal", "Click CompanySearchBar");
                //validate.ClickElement("CompanySearchBar");

                //executionLog.Log("AdminSetValidationDecimal", "Ttype Text Client's name");
                //validate.TypeText("CompanySearchBar", "Client's name");

                //executionLog.Log("AdminSetValidationDecimal", "Click FirstClient");
                //validate.ClickElement("FirstClient");

                //executionLog.Log("AdminSetValidationDecimal", "Click Contacts");
                //validate.ClickElement("Contacts");

                //executionLog.Log("AdminSetValidationDecimal", "Wait");
                //validate.WaitForElementPresent("Title", 2);

                //executionLog.Log("AdminSetValidationDecimal", "Click Save");
                //validate.ClickElement("Save");

                //executionLog.Log("AdminSetValidationDecimal", "Visit admin office");
                //VisitOffice("admin");

                //executionLog.Log("AdminSetValidationDecimal", "Wait");
                //validate.WaitForWorkAround(2000);

                VisitOffice("fields");
                validate.WaitForWorkAround(3000);

                validate.SelectByText("Module", "Clients");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Processor as First Data North");
                validate.SelectByText("Processor", "First Data North");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Tab as Contacts");
                validate.SelectByText("Tab", "Contacts");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Section as Contacts");
                validate.SelectByText("Section", "Contacts");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Click Search");
                validate.ClickElement("Search");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Type title");
                validate.TypeText("filter", "Title");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Click TitleField");
                validate.ClickElement("ContactTitle");
                validate.WaitForWorkAround(4000);

                executionLog.Log("AdminSetValidationDecimal", "Click ApplyDataTypeValidation");
                validate.checkAndClick("ProcApplyDataTypeValidation");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select data type as decimal.");
                validate.SelectByText("ProcFieldDataType", "Decimal");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Click SaveFieldManager");
                validate.ClickElement("SaveFieldManager");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Redirect at Create Client");
                VisitOffice("clients/create");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Select Processor");
                office_ClientsHelper.SelectByText("CreateProc", "First Data North");

                executionLog.Log("AdminSetValidationDecimal", "Enter Client Dba Name");
                office_ClientsHelper.TypeText("ClientDBAName", DBAName);

                executionLog.Log("AdminSetValidationDecimal", "Select client status");
                office_ClientsHelper.SelectByText("ClientStatus", "New");

                executionLog.Log("AdminSetValidationDecimal", "Select Client Res[onsibility.");
                office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang");

                executionLog.Log("AdminSetValidationDecimal", "Click on next button");
                office_ClientsHelper.ClickElement("Next");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Wait for confirmation message.");
                office_ClientsHelper.WaitForText("Client saved successfully. ", 10);

                executionLog.Log("AdminSetValidationDecimal", "Click On Contact Tab Clinet");
                office_ClientsHelper.ClickElement("ContactDetails");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Wait ");
                validate.WaitForElementPresent("Title", 1);
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Redirect To clients page. ");
                VisitOffice("clients");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Enter Company Name");
                office_ClientsHelper.TypeText("SearchClient", DBAName);
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select client by check box");
                office_ClientsHelper.ClickForce("ClickOn1stOpp");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Click on delete client");
                office_ClientsHelper.ClickElement("DeleteClient");

                executionLog.Log("AdminSetValidationDecimal", "Accept alert message.");
                office_ClientsHelper.AcceptAlert();

                executionLog.Log("AdminSetValidationDecimal", "Wait for success message.");
                office_ClientsHelper.WaitForText("1 records deleted successfully", 10);

                executionLog.Log("AdminSetValidationDecimal", "Redirect To client recycle bin page. ");
                VisitOffice("clients/recyclebin");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Enter Company Name");
                office_ClientsHelper.TypeText("SearchClient", DBAName);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Click on delete client");
                office_ClientsHelper.ClickElement("DeleteRbin");

                executionLog.Log("AdminSetValidationDecimal", "Accept alert message.");
                office_ClientsHelper.AcceptAlert();

                executionLog.Log("AdminSetValidationDecimal", "Wait for success message.");
                office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10);

                VisitOffice("fields");
                validate.WaitForWorkAround(3000);

                validate.SelectByText("Module", "Clients");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Processor as First Data North");
                validate.SelectByText("Processor", "First Data North");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Tab as Contacts");
                validate.SelectByText("Tab", "Contacts");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Select Section as Contacts");
                validate.SelectByText("Section", "Contacts");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Click Search");
                validate.ClickElement("Search");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Type title");
                validate.TypeText("filter", "Title");
                validate.WaitForWorkAround(3000);

                executionLog.Log("AdminSetValidationDecimal", "Click TitleField");
                validate.ClickElement("ContactTitle");
                validate.WaitForWorkAround(4000);

                executionLog.Log("AdminSetValidationDecimal", "Click ApplyDataTypeValidation");
                validate.checkAndClick("ProcApplyDataTypeValidation");
                validate.WaitForWorkAround(2000);

                executionLog.Log("AdminSetValidationDecimal", "Click SaveFieldManager");
                validate.ClickElement("SaveFieldManager");
                validate.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

            try
            {
                //Logging in

                executionLog.Log("AdminSetFieldAsMandatory", "Login");
                Login(username[0], password[0]);

                executionLog.Log("AdminSetFieldAsMandatory", "VerifyTitle");
                VerifyTitle("Dashboard");

                executionLog.Log("OfficeMainFieldRelationships", " Testing A Client");
                VisitOffice("clients");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement FirstClient");
                mandatory.ClickElement("FirstClient");
                mandatory.WaitForWorkAround(2000);

                //executionLog.Log("AdminSetFieldAsMandatory", "Hover CompanyDetails");
                //mandatory.MouseHover("CompanyDetails");

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement CompanyDetails");
                mandatory.ClickElement("CompanyDetails");
                mandatory.WaitForWorkAround(3000);

                // Verifying the field exists that will be changed

                executionLog.Log("AdminSetFieldAsMandatory", "Wait for element FederalTaxID");
                mandatory.ElementVisible("FederalTaxID");
                mandatory.WaitForWorkAround(4000);

                // Going to admin office

                executionLog.Log("AdminSetFieldAsMandatory", "VisitOffice admin ");
                VisitOffice("admin");
                mandatory.WaitForWorkAround(4000);

                // Accessing field in field dictionary

                VisitOffice("fields");
                mandatory.WaitForWorkAround(3000);

                mandatory.SelectByText("Module", "Clients");
                mandatory.WaitForWorkAround(2000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement Search ");
                mandatory.ClickElement("Search");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "filter Federal Tax ID ");
                mandatory.TypeText("filter", "Federal Tax");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement FederalTax");
                mandatory.ClickElement("FederalTax");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement MandatoryCheckBox");
                mandatory.ClickElement("MandatoryCheckBox");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement SaveFieldManager");
                mandatory.ClickJs("SaveFieldManager");
                mandatory.WaitForWorkAround(3000);

                // Now we will test the mandatory field.

                executionLog.Log("AdminSetFieldAsMandatory", "VisitOffice clients");
                VisitOffice("clients");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "ClickElement");
                mandatory.ClickElement("FirstClient");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "Hover Over CompanyDetails");
                mandatory.MouseHover("CompanyDetails");
                mandatory.WaitForWorkAround(4000);

                executionLog.Log("AdminSetFieldAsMandatory", " ClickElement CompanyDetails");
                mandatory.ClickElement("CompanyDetails");
                mandatory.WaitForWorkAround(2000);

                // Testing field by trying to save data

                executionLog.Log("AdminSetFieldAsMandatory", "TypeText 555555555");
                mandatory.TypeText("FerderalTaxField", "555555555");
                mandatory.WaitForWorkAround(4000);

                executionLog.Log("AdminSetFieldAsMandatory", " Click Save Element");
                mandatory.ClickForce("Save");
                mandatory.WaitForWorkAround(2000);

                //Logging in

                executionLog.Log("AdminSetFieldAsMandatory", "Visit clients Office ");
                VisitOffice("clients");
                mandatory.WaitForWorkAround(3000);

                executionLog.Log("AdminSetFieldAsMandatory", "Click First Client Element");
                mandatory.ClickElement("FirstClient");
                mandatory.WaitForWorkAround(2000);

                executionLog.Log("AdminSetFieldAsMandatory", "Hover Over CompanyDetails");
                mandatory.MouseHover("CompanyDetails");

                executionLog.Log("AdminSetFieldAsMandatory", "Click CompanyDetails Element");
                mandatory.ClickElement("CompanyDetails");
                mandatory.WaitForWorkAround(5000);

                // Verifying the field exists that will be changed

                executionLog.Log("AdminSetFieldAsMandatory", "Check if FederalTaxID visible");
                mandatory.ElementVisible("FederalTax");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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