示例#1
0
        public void editPartnerAssociationAgent()
        {
            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 agent_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            //Variable
            var    username1 = "employeeuser" + RandomNumber(111, 99999);
            var    name      = "TestAgent" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("EditPartnerAssociationAgent", "Goto Partner Association");
                VisitOffice("partners/associations");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Click on first check box.");
                agent_PartnerAssociationHelper.ClickElement("ClickOnEditicon");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Clixk on edit icon");
                agent_PartnerAssociationHelper.ClickElement("LastName");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Enter TwitterURL");
                agent_PartnerAssociationHelper.TypeText("TwitterURL", "Twiter.com");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Enter LinkedIn");
                var LinkedIn = "LinkedIn" + GetRandomNumber() + ".com";
                agent_PartnerAssociationHelper.TypeText("LinkedInUrl", LinkedIn);
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Enter FaceBook");
                var Facebook = "Facebook" + GetRandomNumber() + ".com";
                agent_PartnerAssociationHelper.TypeText("FaceBookUrl", Facebook);
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Select eAddressLebel");
                agent_PartnerAssociationHelper.Select("eAddressLebel", "Work");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Enter Username");
                agent_PartnerAssociationHelper.TypeText("UserName", username1);

                executionLog.Log("EditPartnerAssociationAgent", "Select avatar");
                agent_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

                executionLog.Log("EditPartnerAssociationAgent", "Click Save");
                agent_PartnerAssociationHelper.ClickElement("Save");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Wait for element present.");
                agent_PartnerAssociationHelper.WaitForText("Partner Associations", 10);

                executionLog.Log("EditPartnerAssociationAgent", "Verify LinkedIn");
                agent_PartnerAssociationHelper.VerifyText("VerifyTwitter", LinkedIn);
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("EditPartnerAssociationAgent", "Verify FaceBook");
                agent_PartnerAssociationHelper.VerifyText("VerifyFaceBook", Facebook);
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var    Email  = "P.Asso" + RandomNumber(1, 999) + "@yopmail.com";
            var    name   = "PAgent" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Redirect to partner Association page");
                VisitOffice("partners/associations");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify page title.");
                VerifyTitle("Partner Associations");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click On Create button");
                agent_PartnerAssociationHelper.ClickElement("ClickAddNewAgentCode");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify page title..");
                VerifyTitle("Create a Partner Association");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association name");
                agent_PartnerAssociationHelper.TypeText("Birthday", "07/07/1995");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click on save button.");
                agent_PartnerAssociationHelper.ClickElement("ClickSaveBTN");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for association name.");
                agent_PartnerAssociationHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for first name");
                agent_PartnerAssociationHelper.VerifyText("FirstNameErr", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for last name");
                agent_PartnerAssociationHelper.VerifyText("LastNameErr", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for e address type");
                agent_PartnerAssociationHelper.VerifyText("EtypeError", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for eAddress label ");
                agent_PartnerAssociationHelper.VerifyText("ElabelError", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for  eaddress");
                agent_PartnerAssociationHelper.VerifyText("eAddressErrror", "This field is required.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter an invalid eAddress");
                agent_PartnerAssociationHelper.TypeText("eAddress", "1221313");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for invalid eAddress.");
                agent_PartnerAssociationHelper.VerifyText("eAddressErrror", "Please enter a valid email address.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter an invalid eAddress.");
                agent_PartnerAssociationHelper.TypeText("eAddress", "asssas");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify validation for invalid eaddress");
                agent_PartnerAssociationHelper.VerifyText("eAddressErrror", "Please enter a valid email address.");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click on cancel button.");
                agent_PartnerAssociationHelper.ClickElement("Cancel");
                agent_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify page title");
                VerifyTitle("Partner Associations");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click On Create button");
                agent_PartnerAssociationHelper.ClickElement("ClickAddNewAgentCode");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify page title..");
                VerifyTitle("Create a Partner Association");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association name");
                agent_PartnerAssociationHelper.TypeText("Birthday", "07/07/1995");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association name");
                agent_PartnerAssociationHelper.TypeText("Name", "AssociationTester");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association DBAName");
                agent_PartnerAssociationHelper.TypeText("DBAName", "Test DBA");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association Salutation");
                agent_PartnerAssociationHelper.Select("SelectSalutation", "Mr");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association FirstNAME");
                agent_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association LastName");
                agent_PartnerAssociationHelper.TypeText("LastName", "Tester");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association Language");
                agent_PartnerAssociationHelper.Select("SelectLanguage", "English");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association eAddressType");
                agent_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association eAddressLebel");
                agent_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association eAddressType");
                agent_PartnerAssociationHelper.TypeText("eAddress", Email);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association PhoneType");
                agent_PartnerAssociationHelper.Select("SelectPhoneType", "Work");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association Address Type   ");
                agent_PartnerAssociationHelper.Select("AddressType", "Office");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association AddressLine1");
                agent_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association Phone Number");
                agent_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association UserName");
                agent_PartnerAssociationHelper.TypeText("UserName", name);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click On Avatar");
                agent_PartnerAssociationHelper.ClickElement("ClickOnAvatar");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click on Save button.");
                agent_PartnerAssociationHelper.ClickElement("ClickSaveBTN");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify association created by credits.");
                agent_PartnerAssociationHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify Association modified by credits.");
                agent_PartnerAssociationHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click on edit  button.");
                agent_PartnerAssociationHelper.ClickElement("EditLink");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify page title.");
                VerifyTitle("Edit Partner Association");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association FirstNAME");
                agent_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association LastName");
                agent_PartnerAssociationHelper.TypeText("LastName", "Tester");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association Language");
                agent_PartnerAssociationHelper.Select("SelectLanguage", "English");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association eAddressType");
                agent_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association eAddressLebel");
                agent_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association eAddressType");
                agent_PartnerAssociationHelper.TypeText("eAddress", Email);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association PhoneType");
                agent_PartnerAssociationHelper.Select("SelectPhoneType", "Work");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Select Association Address Type   ");
                agent_PartnerAssociationHelper.Select("AddressType", "Office");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association AddressLine1");
                agent_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Enter Association Phone Number");
                agent_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Click on save button.");
                agent_PartnerAssociationHelper.ClickElement("ClickSaveBTN");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify association created by credits");
                agent_PartnerAssociationHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "Verify association modified by credits");
                agent_PartnerAssociationHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyPartnerAssociationCreatedAndModifiedByCredits", "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("VerifyTicketsCreatedAndModifiedByCredits");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Tickets Created And Modified By Credits");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Tickets Created And Modified By Credits", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                        TakeScreenshot("VerifyTicketsCreatedAndModifiedByCredits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTicketsCreatedAndModifiedByCredits");
                        string id            = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTicketsCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Tickets Created And Modified By Credits"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Tickets Created And Modified By Credits");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyTicketsCreatedAndModifiedByCredits");
                executionLog.WriteInExcel("Verify Tickets Created And Modified By Credits", Status, JIRA, "Office tickets");
            }
        }
示例#3
0
        public void verifyPartnerRevenueSharesAlphanumericAssociationCode()
        {
            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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            // Variable
            var    code   = "GDF-" + RandomNumber(111, 99999);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Redirect at Partner Association page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Redirect at Codes and Revenue Share page");
                agents_PartnerAssociationHelper.ClickElement("RevenueSharesBtn");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Add a New Revenue Share button");
                agents_PartnerAssociationHelper.ClickElement("NewRevenueShareBtn");
                agents_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Enter Agent Code");
                agents_PartnerAssociationHelper.TypeText("AgentCode", code);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Enter Revenue Share");
                agents_PartnerAssociationHelper.TypeText("RevenueShare", "15");

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Save button");
                agents_PartnerAssociationHelper.ClickElement("Save");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Search for created Code");
                agents_PartnerAssociationHelper.TypeText("SearchAssCode", code);
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Edit button");
                agents_PartnerAssociationHelper.ClickElement("EditBtn1");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Change Revenue Share Code");
                agents_PartnerAssociationHelper.TypeText("RevenueShareEdit1", "16");
                //agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Save button");
                agents_PartnerAssociationHelper.ClickElement("SaveBtn1");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Edit button");
                agents_PartnerAssociationHelper.ClickElement("EditBtn1");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyPartnerRevenueSharesAlphanumericAssociationCode", "Click on Edit button");
                agents_PartnerAssociationHelper.VerifyTextBoxValue("RevenueShareEdit1", "16");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);
                Console.WriteLine("No error occured");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyPartnerRevenueSharesAlphanumericAssociationCode");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Partner Revenue Shares Alphanumeric Association Code");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Partner Revenue Shares Alphanumeric Association Code", "Bug", "Medium", "Partner Association page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Partner Revenue Shares Alphanumeric Association Code");
                        TakeScreenshot("VerifyPartnerRevenueSharesAlphanumericAssociationCode");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyPartnerRevenueSharesAlphanumericAssociationCode.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyPartnerRevenueSharesAlphanumericAssociationCode");
                        string id            = loginHelper.getIssueID("Verify Partner Revenue Shares Alphanumeric Association Code");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyPartnerRevenueSharesAlphanumericAssociationCode.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Partner Revenue Shares Alphanumeric Association Code"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Partner Revenue Shares Alphanumeric Association Code");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyPartnerRevenueSharesAlphanumericAssociationCode");
                executionLog.WriteInExcel("Verify Partner Revenue Shares Alphanumeric Association Code", Status, JIRA, "Association Codes and Revenue Share Management");
            }
        }
示例#4
0
        public void createAgentsFromExcelSheet()
        {
            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 agents_EmployeesHelper          = new Agents_EmployeesHelper(GetWebDriver());
            var agent_1099SalesAgentHelper      = new Agent_1099SalesAgentHelper(GetWebDriver());
            var agents_PartnerAgentsHelper      = new Agents_PartnerAgentsHelper(GetWebDriver());
            var agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());


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

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

            executionLog.Log("CreateAgentsFromExcelSheet", "Read Data from Excel File and Create Agents");

            Excel.Application xlApp;
            Excel.Workbook    xlWorkBook;
            Excel.Worksheet   xlWorkSheet;
            Excel.Range       xlrange;

            string xlString;
            string xlString1;
            double xlDouble;
            int    xlRowCnt = 0;
            int    xlColCnt = 0;

            xlApp = new Excel.Application();
            //Open Excel file
            var locFile = GetPathToFile() + "OfficeAgents.xlsx";

            //var updated_path = locFile.Replace("Files", "bin");
            xlWorkBook  = xlApp.Workbooks.Open(locFile);
            xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);

            //This gives the used cells in the sheet
            xlrange = xlWorkSheet.UsedRange;
            Console.WriteLine("Row count is  " + xlrange.Rows.Count);

            for (xlRowCnt = 2; xlRowCnt <= xlrange.Rows.Count; xlRowCnt++)
            {
                // Find type of Agent
                xlString = (string)(xlrange.Cells[xlRowCnt, 1] as Excel.Range).Value2;
                if (xlString == "Employee")
                {
                    GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username[0] + "/employees/create");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    //Employee First Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 2] as Excel.Range).Value2;
                    agents_EmployeesHelper.TypeText("FirstNAME", xlString);

                    //Employee Last Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 3] as Excel.Range).Value2;
                    agents_EmployeesHelper.TypeText("LastName", xlString);

                    //Employee Birthday
                    xlString = (string)(xlrange.Cells[xlRowCnt, 4] as Excel.Range).Value2;
                    agents_EmployeesHelper.TypeText("BirthDay", xlString);

                    //Employee eAddress Type
                    xlString = (string)(xlrange.Cells[xlRowCnt, 6] as Excel.Range).Value2;
                    agents_EmployeesHelper.SelectByText("eAddressType", xlString);
                    agents_EmployeesHelper.WaitForWorkAround(1000);

                    //Employee eAddress Label
                    xlString = (string)(xlrange.Cells[xlRowCnt, 7] as Excel.Range).Value2;
                    agents_EmployeesHelper.SelectByText("eAddressLebel", xlString);

                    //Employee eAddress
                    xlString = (string)(xlrange.Cells[xlRowCnt, 8] as Excel.Range).Value2;
                    agents_EmployeesHelper.TypeText("eAddress", xlString);

                    //Employee Username
                    xlString = (string)(xlrange.Cells[xlRowCnt, 9] as Excel.Range).Value2;
                    agents_EmployeesHelper.TypeText("UserName", xlString);

                    //Employee Password
                    agents_EmployeesHelper.ClickElement("AutoGenPswdChkBox");
                    agents_EmployeesHelper.WaitForWorkAround(1000);
                    try
                    {
                        xlDouble = (double)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        xlString = "" + xlDouble;
                        agents_EmployeesHelper.TypeText("Password", xlString);
                    }
                    catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
                    {
                        xlString = (string)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        agents_EmployeesHelper.TypeText("Password", xlString);
                    }

                    //Employee Avatar
                    xlString = (string)(xlrange.Cells[xlRowCnt, 11] as Excel.Range).Value2;
                    int num = agents_EmployeesHelper.XpathCount("//form[@id='EmployeeCreateEmployeeForm']/div[3]/div[5]/div/div/div[2]/div/div[3]/ul/li");
                    Console.WriteLine("num=" + num);
                    for (int i = 1; i <= num; i++)
                    {
                        string name = agents_EmployeesHelper.GetText("//form[@id='EmployeeCreateEmployeeForm']/div[3]/div[5]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/label/span");
                        if (name == xlString)
                        {
                            agents_EmployeesHelper.Click("//form[@id='EmployeeCreateEmployeeForm']/div[3]/div[5]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/input");
                            agents_EmployeesHelper.WaitForWorkAround(1000);
                            break;
                        }
                        else
                        {
                            continue;
                        }
                    }

                    //Click on Save
                    agents_EmployeesHelper.ClickElement("SaveEmployee");
                    agents_EmployeesHelper.WaitForWorkAround(3000);
                    if (GetWebDriver().PageSource.Contains("This username already taken") == true)
                    {
                        continue;
                    }
                }

                else if (xlString == "Sales Agent")
                {
                    GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username[0] + "/sales_agents/create");
                    agent_1099SalesAgentHelper.WaitForWorkAround(3000);

                    //1099 Sales Agent First Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 2] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.TypeText("FirstNAME", xlString);

                    //1099 Sales Agent Last Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 3] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.TypeText("LastName", xlString);

                    //1099 Sales Agent Birthday
                    xlString = (string)(xlrange.Cells[xlRowCnt, 4] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.TypeText("BirthDay", xlString);

                    //1099 Sales Agent eAddress Type
                    xlString = (string)(xlrange.Cells[xlRowCnt, 6] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.SelectByText("eAddressType", xlString);
                    agent_1099SalesAgentHelper.WaitForWorkAround(1000);

                    //1099 Sales Agent eAddress Label
                    xlString = (string)(xlrange.Cells[xlRowCnt, 7] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.SelectByText("eAddressLebel", xlString);

                    //1099 Sales Agent eAddress
                    xlString = (string)(xlrange.Cells[xlRowCnt, 8] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.TypeText("eAddress", xlString);

                    //1099 Sales Agent Username
                    xlString = (string)(xlrange.Cells[xlRowCnt, 9] as Excel.Range).Value2;
                    agent_1099SalesAgentHelper.TypeText("UserName", xlString);

                    //1099 Sales Agent Password
                    agent_1099SalesAgentHelper.ClickElement("AutoGenPswd");
                    agent_1099SalesAgentHelper.WaitForWorkAround(1000);
                    try
                    {
                        xlDouble = (double)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        xlString = "" + xlDouble;
                        agent_1099SalesAgentHelper.TypeText("Password", xlString);
                    }
                    catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
                    {
                        xlString = (string)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        agent_1099SalesAgentHelper.TypeText("Password", xlString);
                    }

                    //1099 Sales Agent Avatar
                    xlString = (string)(xlrange.Cells[xlRowCnt, 11] as Excel.Range).Value2;
                    int num = agent_1099SalesAgentHelper.XpathCount("//form[@id='EmployeeCreateSalesUserForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li");
                    for (int i = 1; i <= num; i++)
                    {
                        string name = agent_1099SalesAgentHelper.GetText("//form[@id='EmployeeCreateSalesUserForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/label/span");
                        if (name == xlString)
                        {
                            agent_1099SalesAgentHelper.Click("//form[@id='EmployeeCreateSalesUserForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/input");
                            break;
                        }
                        else
                        {
                            continue;
                        }
                    }

                    //Click on Save
                    agent_1099SalesAgentHelper.ClickElement("SaveSaleAgent");
                    agent_1099SalesAgentHelper.WaitForWorkAround(3000);
                    if (GetWebDriver().PageSource.Contains("This username already taken") == true)
                    {
                        continue;
                    }
                }

                else if (xlString == "Referral Agent")
                {
                    GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username[0] + "/partners/agent/create");
                    agents_PartnerAgentsHelper.WaitForWorkAround(3000);

                    //Partner Agent First Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 2] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.TypeText("FirstName", xlString);

                    //Partner Agent Last Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 3] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.TypeText("LastName", xlString);

                    //Partner Agent Birthday
                    xlString = (string)(xlrange.Cells[xlRowCnt, 4] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.TypeText("BirthDay", xlString);

                    //Partner Agent eAddress Type
                    xlString = (string)(xlrange.Cells[xlRowCnt, 6] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.SelectByText("eAddressType", xlString);
                    agents_PartnerAgentsHelper.WaitForWorkAround(1000);

                    //Partner Agent eAddress Label
                    xlString = (string)(xlrange.Cells[xlRowCnt, 7] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.SelectByText("eAddressLebel", xlString);

                    //Partner Agent eAddress
                    xlString = (string)(xlrange.Cells[xlRowCnt, 8] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.TypeText("eAddress", xlString);

                    //Partner Agent Username
                    xlString = (string)(xlrange.Cells[xlRowCnt, 9] as Excel.Range).Value2;
                    agents_PartnerAgentsHelper.TypeText("UserName", xlString);

                    //Partner Agent Password
                    agents_PartnerAgentsHelper.ClickElement("AutoGenPassword");
                    agents_PartnerAgentsHelper.WaitForWorkAround(1000);
                    try
                    {
                        xlDouble = (double)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        xlString = "" + xlDouble;
                        agents_PartnerAgentsHelper.TypeText("UserPassword", xlString);
                    }
                    catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
                    {
                        xlString = (string)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        agents_PartnerAgentsHelper.TypeText("UserPassword", xlString);
                    }

                    //Partner Agent Avatar
                    xlString = (string)(xlrange.Cells[xlRowCnt, 11] as Excel.Range).Value2;
                    int num = agents_PartnerAgentsHelper.XpathCount("//div[@id='user_data']/div/div[3]/ul/li");
                    for (int i = 1; i <= num; i++)
                    {
                        string name = agents_PartnerAgentsHelper.GetText("//div[@id='user_data']/div/div[3]/ul/li[" + i + "]/label/span");
                        if (name == xlString)
                        {
                            agents_PartnerAgentsHelper.Click("//div[@id='user_data']/div/div[3]/ul/li[" + i + "]/input");
                            break;
                        }
                        else
                        {
                            continue;
                        }
                    }

                    //Click on Save
                    agents_PartnerAgentsHelper.ClickElement("ClickSave");
                    agents_PartnerAgentsHelper.WaitForWorkAround(3000);
                    if (GetWebDriver().PageSource.Contains("This username already taken") == true)
                    {
                        continue;
                    }
                }

                else if (xlString == "Referral Association")
                {
                    GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username[0] + "/partners/association/create");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                    //Partner Association First Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 2] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("FirstNAME", xlString);

                    //Partner Association Last Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 3] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("LastName", xlString);

                    //Partner Association Birthday
                    xlString = (string)(xlrange.Cells[xlRowCnt, 4] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("Birthday", xlString);

                    //Partner Association Name
                    xlString = (string)(xlrange.Cells[xlRowCnt, 5] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("Name", xlString);

                    //Partner Association eAddress Type
                    xlString = (string)(xlrange.Cells[xlRowCnt, 6] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.SelectByText("eAddressType", xlString);
                    agents_PartnerAssociationHelper.WaitForWorkAround(1000);

                    //Partner Association eAddress Label
                    xlString = (string)(xlrange.Cells[xlRowCnt, 7] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.SelectByText("eAddressLebel", xlString);

                    //Partner Association eAddress
                    xlString = (string)(xlrange.Cells[xlRowCnt, 8] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("eAddress", xlString);

                    //Partner Association Username
                    xlString = (string)(xlrange.Cells[xlRowCnt, 9] as Excel.Range).Value2;
                    agents_PartnerAssociationHelper.TypeText("UserName", xlString);

                    //Partner Association Password
                    agents_PartnerAssociationHelper.ClickElement("AutoGenPswd");
                    agents_PartnerAssociationHelper.WaitForWorkAround(1000);
                    try
                    {
                        xlDouble = (double)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        xlString = "" + xlDouble;
                        agents_PartnerAssociationHelper.TypeText("Password", xlString);
                    }
                    catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)
                    {
                        xlString = (string)(xlrange.Cells[xlRowCnt, 10] as Excel.Range).Value2;
                        agents_PartnerAssociationHelper.TypeText("Password", xlString);
                    }

                    //Partner Association Avatar
                    xlString = (string)(xlrange.Cells[xlRowCnt, 11] as Excel.Range).Value2;
                    int num = agents_PartnerAssociationHelper.XpathCount("//form[@id='PartnerAssociationAssociationCreateForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li");
                    for (int i = 1; i <= num; i++)
                    {
                        string name = agents_PartnerAssociationHelper.GetText("//form[@id='PartnerAssociationAssociationCreateForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/label/span");
                        if (name == xlString)
                        {
                            agents_PartnerAssociationHelper.Click("//form[@id='PartnerAssociationAssociationCreateForm']/div[3]/div[3]/div/div/div[2]/div/div[3]/ul/li[" + i + "]/input");
                            break;
                        }
                        else
                        {
                            continue;
                        }
                    }

                    //Click on Save
                    agents_PartnerAssociationHelper.ClickElement("ClickSaveBTN");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);
                    if (GetWebDriver().PageSource.Contains("This username already taken") == true)
                    {
                        continue;
                    }
                }
                else
                {
                    continue;
                }
            }
        }
示例#5
0
        public void partnerAssoLeadEaddressIssue()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agent_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

            try
            {
                executionLog.Log("PartnerAssoLeadEaddressIssue", "Login with valid username and password");
                Login("testpartnerassociation", "test1qaz!QAZ");

                executionLog.Log("PartnerAssoLeadEaddressIssue", "Verify Page title");
                VerifyTitle("test association - Details");

                executionLog.Log("PartnerAssoLeadEaddressIssue", "Click on lead tab.");
                agent_PartnerAssociationHelper.ClickElement("LeadTab");

                executionLog.Log("PartnerAssoLeadEaddressIssue", "Clci on creat lead button.");
                agent_PartnerAssociationHelper.ClickElement("CreateLead");

                executionLog.Log("PartnerAssoLeadEaddressIssue", "Select e address type as e-mail.");
                agent_PartnerAssociationHelper.Select("LeadEType", "E-Mail");

                executionLog.Log("PartnerAssoLeadEaddressIssue", "Verify no alert message present.");
                agent_PartnerAssociationHelper.VerifyAlertNotPresent();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("PartnerAssoLeadEaddressIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Partner Asso Lead Eaddress Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Partner Asso Lead Eaddress Issue", "Bug", "Medium", "Partner Association page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Partner Asso Lead Eaddress Issue");
                        TakeScreenshot("PartnerAssoLeadEaddressIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssoLeadEaddressIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("PartnerAssoLeadEaddressIssue");
                        string id            = loginHelper.getIssueID("Partner Asso Lead Eaddress Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssoLeadEaddressIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Partner Asso Lead Eaddress Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Partner Asso Lead Eaddress Issue");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("PartnerAssoLeadEaddressIssue");
                executionLog.WriteInExcel("Partner Asso Lead Eaddress Issue", Status, JIRA, "Agents Portal");
            }
        }
示例#6
0
        public void revenueShareButtonForPartnerAssociation()
        {
            string[] username = null;
            string[] password = null;
            String   JIRA     = "";
            String   Status   = "Pass";

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            // Variable
            var name = "TestAgent" + GetRandomNumber();

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

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

                executionLog.Log("RevenueShareButtonForPartnerAssociation", "Redirect at partner association page.");
                VisitOffice("partners/associations");

                executionLog.Log("RevenueShareButtonForPartnerAssociation", "Click On Revenue Share button");
                agents_PartnerAssociationHelper.ClickElement("RevenueSahrnepartneragent");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("RevenueShareButtonForPartnerAssociation", "Verify  partner association available");
                agents_PartnerAssociationHelper.VerifyPageText("Partner Associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("RevenueShareButtonForPartnerAssociation");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Revenue Share Button For Partner Association");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Revenue Share Button For Partner Association", "Bug", "Medium", "Partner Association page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Revenue Share Button For Partner Association");
                        TakeScreenshot("RevenueShareButtonForPartnerAssociation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\RevenueShareButtonForPartnerAssociation.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("RevenueShareButtonForPartnerAssociation");
                        string id            = loginHelper.getIssueID("Revenue Share Button For Partner Association");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\RevenueShareButtonForPartnerAssociation.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Revenue Share Button For Partner Association"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Revenue Share Button For Partner Association");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("RevenueShareButtonForPartnerAssociation");
                executionLog.WriteInExcel("Revenue Share Button For Partner Association", Status, JIRA, "Agent Portal");
            }
        }
示例#7
0
        public void verifyEditPartnerAssociationConnectUsername()
        {
            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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            // Variable
            var    assname = "TestAssociate" + GetRandomNumber();
            var    name    = "TestAgent" + RandomNumber(111, 999999);
            var    user    = "******" + RandomNumber(111, 9999999);
            String JIRA    = "";
            String Status  = "Pass";


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

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

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to Partner Agent page.");
                VisitOffice("partners/association/create");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify page title.");
                VerifyTitle("Create a Partner Association");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter  Association name");
                agents_PartnerAssociationHelper.TypeText("Name", assname);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter FirstNAME");
                agents_PartnerAssociationHelper.TypeText("FirstNAME", name);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter LastName");
                agents_PartnerAssociationHelper.TypeText("LastName", "Tester");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Date Of Birth");
                agents_PartnerAssociationHelper.TypeText("Birthday", "08/08/1992");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressType");
                agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressLebel");
                agents_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter eAddressType");
                var Email = "P.Ass" + GetRandomNumber() + "@yopmail.com";
                agents_PartnerAssociationHelper.TypeText("eAddress", Email);

                //executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select User Account Check Box");
                //agents_PartnerAssociationHelper.ClickElement("UserAccChkBox");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Username");
                agents_PartnerAssociationHelper.TypeText("UserName", user);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select PartnerUser Avatar Check Box");
                agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Click Save Agent btn");
                agents_PartnerAssociationHelper.ClickElement("AssSave");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify success message. ");
                agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 05);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to All Partner Association");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter association name to be searched");
                agents_PartnerAssociationHelper.TypeText("SearchAssociation", assname);
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Edit association");
                agents_PartnerAssociationHelper.ClickElement("EditAssociation1");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify username box is not present anymore");
                Assert.IsFalse(agents_PartnerAssociationHelper.IsElementPresent("//*[@id='UserUserName']"));
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable

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

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

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

                executionLog.Log("PartnerAssociationCallThisPhone", "Goto Opportinuties");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationCallThisPhone", "Open Partner Association");
                agents_PartnerAssociationHelper.ClickElement("ClickOnPartnerAssociation");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationCallThisPhone", "Edit Partner Association");
                agents_PartnerAssociationHelper.clickJS("EditPartnerAssociation");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationCallThisPhone", "Enter Phone Number.");
                agents_PartnerAssociationHelper.TypeText("PhoneNum", "8533327453");

                executionLog.Log("PartnerAssociationCallThisPhone", "Click On Save Button");
                agents_PartnerAssociationHelper.clickJS("AssSave");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationCallThisPhone", "Click on Phone Icon.");
                agents_PartnerAssociationHelper.clickJS("PhoneIcon");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("PartnerAssociationCallThisPhone");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Partner Association Call This Phone");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Partner Association Call This Phone", "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("Partner Association Call This Phone");
                        TakeScreenshot("PartnerAssociationCallThisPhone");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationCallThisPhone.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("PartnerAssociationCallThisPhone");
                        string id            = loginHelper.getIssueID("Partner Association Call This Phone");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationCallThisPhone.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Partner Association Call This Phone"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Partner Association Call This Phone");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("PartnerAssociationCallThisPhone");
                executionLog.WriteInExcel("Partner Association Call This Phone", Status, JIRA, "Corp Master Data");
            }
        }
        public void verifyTypoInZipCodeAutoCityPopulate()
        {
            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 agents_EmployeesHelper = new Agents_EmployeesHelper(GetWebDriver());
            var agent_PartnerAgentHelper = new Agents_PartnerAgentsHelper(GetWebDriver());
            var agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

            try
            {
                //Verify typo on create employee page

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

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

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Redirect at Create employee page.");
                VisitOffice("employees/create");
                agents_EmployeesHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Enter zip code");
                agents_EmployeesHelper.TypeText("PostalCode", "20001");
                agents_EmployeesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_EmployeesHelper.VerifyFieldValue("City", "Washington");

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_EmployeesHelper.selectedOption("State", "DC");

                //Verify typo on create partner agent page

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Redirect at Create partner agent page.");
                VisitOffice("partners/agent/create");
                agent_PartnerAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Enter zip code");
                agent_PartnerAgentHelper.TypeText("PostalCode", "20001");
                agent_PartnerAgentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agent_PartnerAgentHelper.VerifyFieldValue("City", "Washington");

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agent_PartnerAgentHelper.selectedOption("State", "DC");

                //Verify typo on edit partner agent page

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Redirect at All partner agent page.");
                VisitOffice("partners/agents");
                agent_PartnerAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Edit a partner agent");
                agent_PartnerAgentHelper.ClickElement("FirstEditIcon");
                agent_PartnerAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Enter zip code");
                agent_PartnerAgentHelper.TypeText("PostalCode", "20001");
                agent_PartnerAgentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agent_PartnerAgentHelper.VerifyFieldValue("City", "Washington");

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agent_PartnerAgentHelper.selectedOption("State", "DC");

                //Verify typo on create partner association page

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Redirect at Create partner agent page.");
                VisitOffice("partners/association/create");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Enter zip code");
                agents_PartnerAssociationHelper.TypeText("PostalCode", "20001");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_PartnerAssociationHelper.VerifyFieldValue("City", "Washington");

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_PartnerAssociationHelper.selectedOption("State", "DC");

                //Verify typo on edit partner association page

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Redirect at All partner agent page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Edit a partner agent");
                agents_PartnerAssociationHelper.ClickElement("EditAssociation1");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Enter zip code");
                agents_PartnerAssociationHelper.TypeText("PostalCode", "20001");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_PartnerAssociationHelper.VerifyFieldValue("City", "Washington");

                executionLog.Log("VerifyTypoInZipCodeAutoCityPopulate", "Verify City populated");
                agents_PartnerAssociationHelper.selectedOption("State", "DC");

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

                String counter = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyTypoInZipCodeAutoCityPopulate");
                String Error = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Typo In Zip Code Auto City Populate");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Typo In Zip Code Auto City Populate", "Bug", "Medium", "Partner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Typo In Zip Code Auto City Populate");
                        TakeScreenshot("VerifyTypoInZipCodeAutoCityPopulate");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var location = directoryName + "\\VerifyTypoInZipCodeAutoCityPopulate.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTypoInZipCodeAutoCityPopulate");
                        string id = loginHelper.getIssueID("Verify Typo In Zip Code Auto City Populate");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var location = directoryName + "\\VerifyTypoInZipCodeAutoCityPopulate.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Typo In Zip Code Auto City Populate"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Typo In Zip Code Auto City Populate");
             //   executionLog.DeleteFile("Error");
                throw;

            }
            finally
            {
                executionLog.DeleteFile("VerifyTypoInZipCodeAutoCityPopulate");
                executionLog.WriteInExcel("Verify Typo In Zip Code Auto City Populate", Status, JIRA, "Agents Portal");
            }
        }
示例#10
0
        public void verifyPartnerAssociationAdvanceFilterColumnOrder()
        {
            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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Page title as dash board");
                VerifyTitle("Dashboard");
                Console.WriteLine("Redirected at Dashboard screen.");

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect To partner association page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify page title as partner association");
                VerifyTitle("Partner Associations");

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify E-Mail column is visible on the page.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadEmail");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Phone column is visible on the page.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadPhone");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Modified column is visible on the page.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadModified");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on advance filter button.");
                agents_PartnerAssociationHelper.ClickElement("AdvanceFilter");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select E-Mail in displayed columns.");
                agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "E-Mail");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Phone in displayed columns.");
                agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Phone");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Modified in displayed columns.");
                agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Modified");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on Apply button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify status column not present on page.");
                agents_PartnerAssociationHelper.IsElementNotPresent("HeadStatus");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify E-Mail column not present on page.");
                agents_PartnerAssociationHelper.IsElementNotPresent("HeadEmail");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Phone column not present on page.");
                agents_PartnerAssociationHelper.IsElementNotPresent("HeadPhone");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Modified column not present on page.");
                agents_PartnerAssociationHelper.IsElementNotPresent("HeadModified");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect at partner associations page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify page title as partner association.");
                VerifyTitle("Partner Associations");

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify default position of E-Mail column.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadEmail5");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify default position of Phone column.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadPhone6");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect at partner associations page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on advance filter button.");
                agents_PartnerAssociationHelper.ClickElement("AdvanceFilter");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select E-Mail in displayed column.");
                agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "E-Mail");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up.");
                agents_PartnerAssociationHelper.ClickElement("MoveUp");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up.");
                agents_PartnerAssociationHelper.ClickElement("MoveUp");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up.");
                agents_PartnerAssociationHelper.ClickElement("MoveUp");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Phone in displayed column.");
                agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Phone");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move phone 1 step down.");
                agents_PartnerAssociationHelper.ClickElement("MoveDown");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on Apply button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify changed position of E-Mail column.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadEmail3");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify changed position of Phone column.");
                agents_PartnerAssociationHelper.IsElementPresent("HeadPhone7");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            // Variable
            var name         = "TestAgent" + GetRandomNumber();
            var Agentcode    = "1" + RandomNumber(99, 999);
            var RevenueShare = "22." + RandomNumber(1, 99);


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

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

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Click on Click On Partner Agent");
                VisitOffice("partners/associations");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "verify title");
                VerifyTitle("Partner Associations");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "ClickOnRevenueShare");
                agents_PartnerAssociationHelper.ClickElement("RevenueSahrnepartneragent");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Verify title");
                VerifyTitle("Partner Associations Revenue Shares");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Click on Revenue Share Partner Agnet");
                agents_PartnerAssociationHelper.ClickElement("RevenueSahrnepartnerasso");
                agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "SelectPartnerAgnetRS");
                agents_PartnerAssociationHelper.SelectByText("AgentNameSelect", "AssociationTester");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Select processor");
                agents_PartnerAssociationHelper.SelectByText("ProcessorSelect", "First Data Omaha");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "EnterPartnerCode");
                agents_PartnerAssociationHelper.TypeText("ProcessorCodePAss", Agentcode);

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "EnterPartnerCode");
                agents_PartnerAssociationHelper.TypeText("RevenueShareps", RevenueShare);

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "ClickOnSaveRS");
                agents_PartnerAssociationHelper.ClickElement("SaveRS");
                agents_PartnerAssociationHelper.WaitForWorkAround(8000);

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "verify message Partner agent code & revenue share saved successfully.");
                // agents_PartnerAssociationHelper.ver("Partner association code & revenue share saved successfully.");

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Enter Deciaml value");
                agents_PartnerAssociationHelper.TypeText("SearchDeciaml", RevenueShare);
                agents_PartnerAssociationHelper.WaitForWorkAround(4000);

                executionLog.Log("RevenueShareInDecimalPartnerAssociation", "Verify value oin decimal");
                agents_PartnerAssociationHelper.VerifyText("VerifyValueInDecimal", RevenueShare);
                agents_PartnerAssociationHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Verify Page title");
                VerifyTitle("Dashboard");
                //agent_PartnerAssociationHelper.WaitForWorkAround(4000);

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Redirect to create user page");
                VisitOffice("users/create");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Select User type");
                agent_PartnerAssociationHelper.Select("SElectUserType", "Partner Association");
                agent_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Click radio button");
                agent_PartnerAssociationHelper.ClickElement("SelectRadioNewBtn");
                agent_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Click On ToolBox");
                agent_PartnerAssociationHelper.CheckAndClick("AddConctInfo");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

                executionLog.Log("PartnerAssociationUserAdditionalInfo", "Enter User eAddress");
                agent_PartnerAssociationHelper.TypeText("UserEaDDRESS", "*****@*****.**");
                agent_PartnerAssociationHelper.WaitForWorkAround(1000);

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

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

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

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

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

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Redirect at employee page.");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Verify page title.");
                VerifyTitle("Partner Associations");

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

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Select number of records to 10.");
                agents_PartnerAssociationHelper.SelectByText("ResultsPerPage", "10");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Click on Apply button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Verify number of records displayed.");
                agents_PartnerAssociationHelper.ShowResult(10);
                //agents_PartnerAssociationHelper.VerifyText("BottomResults", "Showing 1 - 10 of");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Click on Apply button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Verify number of records displayed.");
                agents_PartnerAssociationHelper.ShowResult(20);
                //agents_PartnerAssociationHelper.VerifyText("BottomResults", "Showing 1 - 20 of");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Click on ApplyButton button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Verify number of records displayed.");
                agents_PartnerAssociationHelper.ShowResult(50);
                //agents_PartnerAssociationHelper.VerifyText("BottomResults", "Showing 1 - 50 of");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Click on ApplyButton button.");
                agents_PartnerAssociationHelper.ClickElement("ApplyButton");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "Verify number of records displayed.");
                agents_PartnerAssociationHelper.ShowResult(100);
                //agents_PartnerAssociationHelper.VerifyText("BottomResults", "Showing 1 - 100 of");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationAdvanceFilterResultsPP", "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("PartnerAssociationAdvanceFilterResultsPP");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Partner Association Advance Filter ResultsPP");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Partner Association 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("Partner Association Advance Filter ResultsPP");
                        TakeScreenshot("PartnerAssociationAdvanceFilterResultsPP");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationAdvanceFilterResultsPP.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("PartnerAssociationAdvanceFilterResultsPP");
                        string id            = loginHelper.getIssueID("Partner Association Advance Filter ResultsPP");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationAdvanceFilterResultsPP.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Partner Association Advance Filter ResultsPP"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Partner Association Advance Filter ResultsPP");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("PartnerAssociationAdvanceFilterResultsPP");
                executionLog.WriteInExcel("Partner Association Advance Filter ResultsPP", Status, JIRA, "Opportunities Management");
            }
        }
示例#14
0
        public void createPartnerIssue()
        {
            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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

            // Variable
            var    Name      = "Testagent" + RandomNumber(111, 99999);
            var    FirstName = "AgentQa" + RandomNumber(11, 99999);
            var    Id        = "12345" + RandomNumber(11, 999);
            var    username1 = "testinguser" + RandomNumber(111, 999999);
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("CreatePartnerIssue", "Go To Create Partner association page");
                VisitOffice("partners/associations");
                agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("CreatePartnerIssue", "Search the name");
                agents_PartnerAssociationHelper.TypeText("SearchAssociation", "AssociationTester");
                agents_PartnerAssociationHelper.WaitForWorkAround(2000);

                var loc = "//table[@id='list1']//tr[2]//td[6]/a";
                if (agents_PartnerAssociationHelper.IsElementPresent(loc))
                {
                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Click On Create");
                    agents_PartnerAssociationHelper.clickJS("CreateAsso");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Salutation");
                    agents_PartnerAssociationHelper.Select("SelectSalutation", "Mr");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter the name");
                    agents_PartnerAssociationHelper.TypeText("Name", Name);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FirstNAME");
                    agents_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LastName");
                    agents_PartnerAssociationHelper.TypeText("LastName", "Tester");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Date Of Birth");
                    agents_PartnerAssociationHelper.TypeText("Assobirth", "08/08/1994");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter DBAName");
                    agents_PartnerAssociationHelper.TypeText("DBAName", "Test DBA");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LinkedInUrl");
                    agents_PartnerAssociationHelper.TypeText("LinkedInUrl", "LinkedIn.con");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FaceBook Url");
                    agents_PartnerAssociationHelper.TypeText("FaceBookUrl", "Facebook.com");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter TwitterURL");
                    agents_PartnerAssociationHelper.TypeText("TwitterURL", "Twitter.com");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select language.");
                    agents_PartnerAssociationHelper.Select("SelectLanguage", "English");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressType");
                    agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressLebel");
                    agents_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter eAddressType");
                    var Email = "P.Agent" + GetRandomNumber() + "@yopmail.com";
                    agents_PartnerAssociationHelper.TypeText("eAddress", Email);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select SelectPhoneType");
                    agents_PartnerAssociationHelper.Select("SelectPhoneType", "Work");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter PhoneNumber");
                    agents_PartnerAssociationHelper.TypeText("PhoneNumber", "1212121212");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Address Type  ");
                    agents_PartnerAssociationHelper.Select("AddressType", "Office");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter AddressLine1");
                    agents_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Postal code");
                    agents_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Username");
                    agents_PartnerAssociationHelper.TypeText("UserName", username1);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Avatar");
                    agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Click Save Agent btn");
                    agents_PartnerAssociationHelper.ClickElement("AssSave");
                    agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Verify success message. ");
                    agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 30);
                }
                else
                {
                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Click On Create");
                    agents_PartnerAssociationHelper.clickJS("CreateAsso");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Salutation");
                    agents_PartnerAssociationHelper.Select("SelectSalutation", "Mr");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter the name");
                    agents_PartnerAssociationHelper.TypeText("Name", "AssociationTester");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FirstNAME");
                    agents_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LastName");
                    agents_PartnerAssociationHelper.TypeText("LastName", "Tester");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Date Of Birth");
                    agents_PartnerAssociationHelper.TypeText("Assobirth", "08/08/1994");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter DBAName");
                    agents_PartnerAssociationHelper.TypeText("DBAName", "Test DBA");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LinkedInUrl");
                    agents_PartnerAssociationHelper.TypeText("LinkedInUrl", "LinkedIn.con");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FaceBook Url");
                    agents_PartnerAssociationHelper.TypeText("FaceBookUrl", "Facebook.com");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter TwitterURL");
                    agents_PartnerAssociationHelper.TypeText("TwitterURL", "Twitter.com");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select language.");
                    agents_PartnerAssociationHelper.Select("SelectLanguage", "English");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressType");
                    agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressLebel");
                    agents_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter eAddressType");
                    var Email = "P.Agent" + GetRandomNumber() + "@yopmail.com";
                    agents_PartnerAssociationHelper.TypeText("eAddress", Email);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select SelectPhoneType");
                    agents_PartnerAssociationHelper.Select("SelectPhoneType", "Work");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter PhoneNumber");
                    agents_PartnerAssociationHelper.TypeText("PhoneNumber", "1212121212");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Address Type  ");
                    agents_PartnerAssociationHelper.Select("AddressType", "Office");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter AddressLine1");
                    agents_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Postal code");
                    agents_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                    agents_PartnerAssociationHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Username");
                    agents_PartnerAssociationHelper.TypeText("UserName", username1);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Avatar");
                    agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Click Save Agent btn");
                    agents_PartnerAssociationHelper.ClickElement("AssSave");
                    agents_PartnerAssociationHelper.WaitForWorkAround(5000);

                    executionLog.Log("CreatePartnerAgentAndUserAccount", "Verify success message. ");
                    agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 30);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agent_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

            //      try
            //      {
            executionLog.Log("PartnerAssoAddEmailIssue", "Login with valid username and password");
            Login("testpartnerassociation", "test1qaz!QAZ");

            executionLog.Log("PartnerAssoAddEmailIssue", "Verify Page title");
            VerifyTitle("test association - Details");

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on edit button.");
            agent_PartnerAssociationHelper.ClickElement("EditAsso");
            agent_PartnerAssociationHelper.WaitForWorkAround(2000);

            agent_PartnerAssociationHelper.WaitForElementPresent("RemoveEmail", 20);

            agent_PartnerAssociationHelper.ClickElement("RemoveEmail");

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on add email..");
            agent_PartnerAssociationHelper.ClickElement("AddEmail");

            executionLog.Log("PartnerAssoAddEmailIssue", "Select eAddress type.");
            agent_PartnerAssociationHelper.Select("EmailType2", "E-Mail");

            executionLog.Log("PartnerAssoAddEmailIssue", "Enter added email.");
            agent_PartnerAssociationHelper.TypeText("EmailAdd2", "*****@*****.**");

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on save button.");
            agent_PartnerAssociationHelper.ClickElement("Save");

            executionLog.Log("PartnerAssoAddEmailIssue", "Verify added email present on page.");
            agent_PartnerAssociationHelper.VerifyeLabel("VerifyEmail");
            agent_PartnerAssociationHelper.WaitForWorkAround(2000);

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on edit button.");
            agent_PartnerAssociationHelper.ClickElement("EditAsso");

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on remove icon.");
            agent_PartnerAssociationHelper.ClickElement("RemoveEmail");

            executionLog.Log("PartnerAssoAddEmailIssue", "Click on save button.");
            agent_PartnerAssociationHelper.ClickElement("Save");
        }
示例#16
0
        public void partnerAssoSave()
        {
            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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

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

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

                executionLog.Log("PartnerAssoSave", "Redirect  to Create parnter association page");
                VisitOffice("partners/association/create");

                executionLog.Log("PartnerAssoSave", "Verify title");
                VerifyTitle("Create a Partner Association");

                executionLog.Log("PartnerAssoSave", "Click on Save button");
                agents_PartnerAssociationHelper.ClickElement("Save");

                executionLog.Log("PartnerAssoSave", "Verify the validation for birthday");
                agents_PartnerAssociationHelper.WaitForText("Age should be greater than 18.", 5);

                executionLog.Log("PartnerAssoSave", "Enter the date of birth");
                agents_PartnerAssociationHelper.TypeText("PartnerAssoBirthday", "01/02/1990");

                executionLog.Log("PartnerAssoSave", "Click on Save button");
                agents_PartnerAssociationHelper.ClickElement("Save");

                executionLog.Log("PartnerAssoSave", "Verify the validation for the field's ");
                agents_PartnerAssociationHelper.WaitForText("This field is required.", 5);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var    name      = "TestAgent" + GetRandomNumber();
            var    username1 = "testuser" + RandomNumber(111, 99999);
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("PartnerAssociationWithoutUser", "Redirect to create partner agent");
                VisitOffice("partners/association/create");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationWithoutUser", "Enter Association name");
                agent_PartnerAssociationHelper.TypeText("Name", "AssociationTester");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter DBAName");
                agent_PartnerAssociationHelper.TypeText("DBAName", "Test DBA");

                executionLog.Log("PartnerAssociationWithoutUser", "Select Salutation");
                agent_PartnerAssociationHelper.Select("SelectSalutation", "Mr");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter FirstNAME");
                agent_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter LastName");
                agent_PartnerAssociationHelper.TypeText("LastName", "Tester");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter the DOB");
                agent_PartnerAssociationHelper.TypeText("PartnerAssoBirthday", "12/04/1992");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter TwitterURL");
                agent_PartnerAssociationHelper.TypeText("TwitterURL", "Twitter.com");

                executionLog.Log("PartnerAssociationWithoutUser", "Select Language");
                agent_PartnerAssociationHelper.Select("SelectLanguage", "English");

                executionLog.Log("PartnerAssociationWithoutUser", "Select eAddressType");
                agent_PartnerAssociationHelper.Select("eAddressType", "E-Mail");

                executionLog.Log("PartnerAssociationWithoutUser", "Select eAddressLebel");
                agent_PartnerAssociationHelper.Select("eAddressLebel", "Work");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter eAddressType");
                agent_PartnerAssociationHelper.TypeText("eAddress", "*****@*****.**");

                executionLog.Log("PartnerAssociationWithoutUser", "Select SelectPhoneType");
                agent_PartnerAssociationHelper.Select("SelectPhoneType", "Work");

                executionLog.Log("PartnerAssociationWithoutUser", "Select Address Type ");
                agent_PartnerAssociationHelper.Select("AddressType", "Office");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter AddressLine1");
                agent_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89");

                executionLog.Log("PartnerAssociationWithoutUser", "Enter Zip  Code");
                agent_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                agent_PartnerAssociationHelper.WaitForWorkAround(2000);

                executionLog.Log("PartnerAgentBirthDateVerifySave", "Enter Username");
                agent_PartnerAssociationHelper.TypeText("UserName", username1);

                executionLog.Log("PartnerAgentBirthDateVerifySave", "Select Avatar Check Box");
                agent_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

                executionLog.Log("PartnerAssociationWithoutUser", "Click on Save btn");
                agent_PartnerAssociationHelper.ClickElement("ClickSaveBTN");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("PartnerAssociationWithoutUser", "Verify tex.");
                agent_PartnerAssociationHelper.VerifyText("VerifyTextPresent", "Partner Associations");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("PartnerAssociationWithoutUser");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Partner Association Without User");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Partner Association Without User", "Bug", "Medium", "Partner Association page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Partner Association Without User");
                        TakeScreenshot("PartnerAssociationWithoutUser");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationWithoutUser.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("PartnerAssociationWithoutUser");
                        string id            = loginHelper.getIssueID("Partner Association Without User");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\PartnerAssociationWithoutUser.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Partner Association Without User"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Partner Association Without User");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("PartnerAssociationWithoutUser");
                executionLog.WriteInExcel("Partner Association Without User", Status, JIRA, "Agents Portal");
            }
        }
        public void verifyValidationNotPresent()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var agent_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver());

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

            try
            {
                executionLog.Log("VerifyValidationNotPresent", "Login with valid username and password");
                Login("testpartnerassociation", "test1qaz!QAZ");

                executionLog.Log("VerifyValidationNotPresent", "Verify Page title");
                VerifyTitle("test association - Details");

                executionLog.Log("VerifyValidationNotPresent", "Click on edit button.");
                agent_PartnerAssociationHelper.ClickElement("EditAsso");

                executionLog.Log("VerifyValidationNotPresent", "Enter a valid 10 digit phone number.");
                agent_PartnerAssociationHelper.TypeText("PhoneNum", "1111112222");

                executionLog.Log("VerifyValidationNotPresent", "Click on save button.");
                agent_PartnerAssociationHelper.ClickElement("Save");

                executionLog.Log("VerifyValidationNotPresent", "Verify success message for details updation");
                agent_PartnerAssociationHelper.WaitForText("Partner details has been updated.", 10);

                executionLog.Log("VerifyValidationNotPresent", "Verify error message not present.");
                agent_PartnerAssociationHelper.VerifyTextNot("Please enter no more than 10 characters.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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