Exemple #1
0
        public void verifyResetBtnOfSummaryReportsOfficePayouts()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

            //Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var residualIncome_OfficePayoutHelper = new ResidualIncome_OfficePayoutHelper(GetWebDriver());

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

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

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

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

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Go to Create Call page");
                VisitOffice("rir/summary_reports");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Observe Total records");
                string txt = residualIncome_OfficePayoutHelper.GetText("//td[@id='list1_pager_left']/div");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Filters");
                residualIncome_OfficePayoutHelper.ClickElement("FiltersBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Processor drop down");
                residualIncome_OfficePayoutHelper.ClickElement("Processordrpdwn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Select First Data North");
                residualIncome_OfficePayoutHelper.ClickElement("Proc3Optn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Apply Button");
                residualIncome_OfficePayoutHelper.ClickElement("ApplyBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Filters");
                residualIncome_OfficePayoutHelper.ClickElement("FiltersBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Click on Reset Button");
                residualIncome_OfficePayoutHelper.ClickElement("ResetBtn");
                residualIncome_OfficePayoutHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyResetBtnOfSummaryReportsOfficePayouts", "Verify Reset button works");
                residualIncome_OfficePayoutHelper.VerifyText("NoOfRecrdsTxt", txt);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyResetBtnOfSummaryReportsOfficePayouts");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Reset Btn Of Summary Reports Office Payouts");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Reset Btn Of Summary Reports Office Payouts", "Bug", "Medium", "Summary Reports page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Reset Btn Of Summary Reports Office Payouts");
                        TakeScreenshot("VerifyResetBtnOfSummaryReportsOfficePayouts");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyResetBtnOfSummaryReportsOfficePayouts.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyResetBtnOfSummaryReportsOfficePayouts");
                        string id            = loginHelper.getIssueID("Verify Reset Btn Of Summary Reports Office Payouts");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyResetBtnOfSummaryReportsOfficePayouts.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Reset Btn Of Summary Reports Office Payouts"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Reset Btn Of Summary Reports Office Payouts");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyResetBtnOfSummaryReportsOfficePayouts");
                executionLog.WriteInExcel("Verify Reset Btn Of Summary Reports Office Payouts", Status, JIRA, "Residual Income Office Payouts");
            }
        }
Exemple #2
0
        public void residualAdjustmentTool()
        {
            string[] username = null;
            string[] password = null;
            string[] log      = null;
            String   JIRA     = "";
            String   Status   = "Pass";

            var oXMLData = new XMLParse();

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

            username = oXMLData.getData("settings/Credentials", "username_corp");
            password = oXMLData.getData("settings/Credentials", "password");
            log      = oXMLData.getData("settings/URL", "logout");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var corpResidualIncome_Masterdata_AdjustmentToolHelper = new CorpResidualIncome_Masterdata_AdjustmentToolHelper(GetWebDriver());

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

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

                executionLog.Log("ResidualAdjustmentTool", "Go to Create Residual Adjustment Tool page");
                VisitCorp("rir/create");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustmentTool", "Verify title");
                VerifyTitle("Residual Master Rules - Create Adjustments");

                executionLog.Log("ResidualAdjustmentTool", "Click on 'Save' button without filling any field");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("Save");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(2000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error message");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPProcessorError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error message");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPSetNameError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Select Processor");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.SelectByText("RMPProcessor", "First Data Omaha");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on 'Save' button after selecting Processor");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("Save");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error ");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPSetNameError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Select Rule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.SelectByText("RMPRule", "Amount");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter amount in alphabets");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "Alpha");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on anywhere");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error displayed");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPRuleError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter amount in numeric");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "123");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on anywhere");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Select Percantage");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.SelectByText("RMPRule", "Percentage");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter Percantage in alphabets");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "Alpha");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on anywher");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error displayed");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPRuleError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter Percantage in numeric");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "13");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on anywehe");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Select Ammount");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.SelectByText("RMPRule", "Amount");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter Ammount upto 3 decimal");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "123.234");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click anywhere in the application.");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error displayed");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPRuleError");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Select Percantage");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.SelectByText("RMPRule", "Percentage");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Enter Percantage more than 100");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.TypeText("RMPRuleField", "1234");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustmentTool", "Click on any");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(2000);

                executionLog.Log("ResidualAdjustmentTool", "Verify error displayed");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPRuleError");

                executionLog.Log("ResidualAdjustmentTool", "Click on Add another button.");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.ClickElement("RMPAddRule");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.WaitForWorkAround(2000);

                executionLog.Log("ResidualAdjustmentTool", "Verify Field added");
                corpResidualIncome_Masterdata_AdjustmentToolHelper.verifyElementPresent("RMPRuleError");

                executionLog.Log("ResidualAdjustmentTool", "Log out from the application");
                VisitCorp("logout");
            }

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

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

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

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

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

                executionLog.Log("TicketSettingAdmin", "Redirect To Admin");
                VisitOffice("admin");

                executionLog.Log("TicketSettingAdmin", "Redirect to Ticket settings page.");
                VisitOffice("tickets/settings");
                tickets_SettingHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketSettingAdmin", "Select Ticket Created Status");
                tickets_SettingHelper.SelectByText("SelectTicketCreatedStatus", "New");
                tickets_SettingHelper.WaitForWorkAround(2000);

                executionLog.Log("TicketSettingAdmin", "Select Ticket Status");
                tickets_SettingHelper.SelectByText("ResolvedTicketStatus", "Resolved");

                executionLog.Log("TicketSettingAdmin", "Wait for element to present.");
                tickets_SettingHelper.WaitForElementPresent("ClosedTicketStatus", 10);

                executionLog.Log("TicketSettingAdmin", "Select Ticket Status");
                tickets_SettingHelper.SelectByText("ClosedTicketStatus", "Closed");

                executionLog.Log("TicketSettingAdmin", "Click Save");
                tickets_SettingHelper.ClickElement("ClickOnAddBtn");
                tickets_SettingHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("TicketSettingAdmin");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Ticket Setting Admin");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Ticket Setting Admin", "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("Ticket Setting Admin");
                        TakeScreenshot("TicketSettingAdmin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketSettingAdmin.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("TicketSettingAdmin");
                        string id            = loginHelper.getIssueID("Ticket Setting Admin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\TicketSettingAdmin.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Ticket Setting Admin"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Ticket Setting Admin");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("TicketSettingAdmin");
                executionLog.WriteInExcel("Ticket Setting Admin", Status, JIRA, "Admin Tickets");
            }
        }
Exemple #4
0
        public void residualAdjustment()
        {
            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 residualIncome_MasterDataHelper = new ResidualIncome_MasterDataHelper(GetWebDriver());

            // Variable random
            var    usernme = "Sysprins" + RandomNumber(44, 799999977);
            var    name    = "Test" + GetRandomNumber();
            String JIRA    = "";
            String Status  = "Pass";

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

                executionLog.Log("ResidualAdjustment", "Verify Page title");
                VerifyTitle("Dashboard");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Goto Residual Incomwe Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on save button.");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for confirmation.");
                residualIncome_MasterDataHelper.WaitForText("Master Adjustment Rules Created Successfully.", 10);

                executionLog.Log("ResidualAdjustment", "Goto Residual Income Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on cancel button.");
                residualIncome_MasterDataHelper.ClickElement("CancelResidualAdjustment");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Verify page text.");
                residualIncome_MasterDataHelper.VerifyText("ClickOnAdjustmentToolRI", "Adjustments Tool");

                executionLog.Log("ResidualAdjustment", "Goto Residual Income Adjustment tool create");
                VisitOffice("rir/adjustments_tool/create");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Enter Adjustment NAME");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentName", name);

                executionLog.Log("ResidualAdjustment", "Select Adjustment for");
                residualIncome_MasterDataHelper.SelectByText("SelectAdjustmentFor", "Office");

                executionLog.Log("ResidualAdjustment", "Adjustment Type");
                residualIncome_MasterDataHelper.SelectByText("AdjustmentType", "Transaction");

                executionLog.Log("ResidualAdjustment", "Reporting Period");
                residualIncome_MasterDataHelper.SelectByText("SelectReportingPeriod", "Any");

                executionLog.Log("ResidualAdjustment", "Select Processor");
                residualIncome_MasterDataHelper.SelectByText("SelectProcessor", "First Data Omaha");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Select RuleType");
                residualIncome_MasterDataHelper.SelectByText("SelectRuleType", "Percentage");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "TEST AMOUNT");

                executionLog.Log("ResidualAdjustment", " Select Add / Remove");
                residualIncome_MasterDataHelper.Select("AddRemove", "Add");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for confirmation.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a valid number.", 10);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "-22");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for validation message.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a value greater than or equal to 0.", 10);

                executionLog.Log("ResidualAdjustment", "Enter Amount RA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "500");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");

                executionLog.Log("ResidualAdjustment", "Wait for validation.");
                residualIncome_MasterDataHelper.WaitForText("Please enter a value less than or equal to 100.", 10);

                executionLog.Log("ResidualAdjustment", "Select Rule Type");
                residualIncome_MasterDataHelper.SelectByText("SelectRuleType", "Flat Amount");
                residualIncome_MasterDataHelper.WaitForWorkAround(1000);

                executionLog.Log("ResidualAdjustment", "EnterAmountRA");
                residualIncome_MasterDataHelper.TypeText("EnterAmount", "44.2343");

                executionLog.Log("ResidualAdjustment", "Click on Save");
                residualIncome_MasterDataHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Redirect at adjustment tools page.");
                VisitOffice("rir/adjustments_tool");
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Verify page title.");
                VerifyTitle("Adjustments Tool");

                executionLog.Log("ResidualAdjustment", "Enter adjustment to be deleted.");
                residualIncome_MasterDataHelper.TypeText("EnterAdjustmentNameSrch", name);
                residualIncome_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("ResidualAdjustment", "Click on delete icon.");
                residualIncome_MasterDataHelper.ClickElement("DeleteAdjtmnt");

                executionLog.Log("ResidualAdjustment", "Accept alert message.");
                residualIncome_MasterDataHelper.AcceptAlert();

                executionLog.Log("ResidualAdjustment", "Wait for delete success.");
                residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var eqiupment_EquipmentHelper = new Eqiupment_EquipmentHelper(GetWebDriver());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var corpPDFTemplate_ImportWizardHelper = new CorpPDFTemplate_ImportWizardHelper(GetWebDriver());


            // Variable random
            var name = "TESTCLIENT" + RandomNumber(1, 999);


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

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

                executionLog.Log("RestorePDFTemplateCorp", "Redirect To Import");
                VisitCorp("pdf_templates/import");

                executionLog.Log("RestorePDFTemplateCorp", "Select Module");
                corpPDFTemplate_ImportWizardHelper.Select("SelectModule", "20");

                var path = GetPathToFile() + "2.pdf";
                executionLog.Log("RestorePDFTemplateCorp", "Uplaod file");
                corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path);

                executionLog.Log("RestorePDFTemplateCorp", "Click import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");
                corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(4000);

                executionLog.Log("RestorePDFTemplateCorp", "Wait for text to hide.");
                corpPDFTemplate_ImportWizardHelper.WaitForTextHide("Your request is being processed.", 10);

                executionLog.Log("RestorePDFTemplateCorp", "ClickOnNext");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Next");
                corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(3000);

                executionLog.Log("RestorePDFTemplateCorp", "Select Category");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectCatory", "Other");

                executionLog.Log("RestorePDFTemplateCorp", "Click On Save");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Save");

                executionLog.Log("RestorePDFTemplateCorp", "Verify messge");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10);

                executionLog.Log("RestorePDFTemplateCorp", "Enter PDF TO sEARCH");
                corpPDFTemplate_ImportWizardHelper.TypeText("EnterPDFToSearch", "2.pdf");
                corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(2000);

                executionLog.Log("RestorePDFTemplateCorp", "Select Module To Search");
                corpPDFTemplate_ImportWizardHelper.Select("SelectModuleToSearch", "clients");
                corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(2000);

                executionLog.Log("RestorePDFTemplateCorp", "Click on pdf");
                corpPDFTemplate_ImportWizardHelper.ClickElement("PDF1");

                executionLog.Log("RestorePDFTemplateCorp", "Click on Delete");
                corpPDFTemplate_ImportWizardHelper.ClickElement("DeletePDF");

                executionLog.Log("RestorePDFTemplateCorp", "Accept alert message");
                corpPDFTemplate_ImportWizardHelper.AcceptAlert();

                executionLog.Log("RestorePDFTemplateCorp", "Wait for delete message.");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template Deleted Successfully.", 10);

                executionLog.Log("RestorePDFTemplateCorp", "Redirect template");
                VisitCorp("pdf_templates");

                executionLog.Log("RestorePDFTemplateCorp", "Click on recycle bin");
                corpPDFTemplate_ImportWizardHelper.ClickElement("ClickOnReCycleBin");

                executionLog.Log("RestorePDFTemplateCorp", "Click on restore icon ");
                corpPDFTemplate_ImportWizardHelper.ClickElement("RestoreThisTemplateCorp");

                executionLog.Log("RestorePDFTemplateCorp", "PDF Template Restored Successfully.");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template Restored Successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

            // Initializing the objects
            var executionLog                   = new ExecutionLog();
            var loginHelper                    = new LoginHelper(GetWebDriver());
            var office_ClientsHelper           = new Office_ClientsHelper(GetWebDriver());
            var office_ContactsHelper          = new Office_ContactsHelper(GetWebDriver());
            var officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

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

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

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

                executionLog.Log("One000Added", "Go to client page");
                VisitOffice("clients");

                executionLog.Log("One000Added", "Verify title");
                VerifyTitle();

                executionLog.Log("One000Added", "Click on Advance filter");
                office_ClientsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                office_ClientsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "Go to contact page");
                VisitOffice("contacts");

                executionLog.Log("One000Added", "Verify title");
                VerifyTitle("Contacts");

                executionLog.Log("One000Added", "Click on Advance filter");
                office_ContactsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                office_ContactsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "Go to Tickets page");
                VisitOffice("tickets");

                executionLog.Log("One000Added", "Verify title");
                VerifyTitle("Tickets");

                executionLog.Log("One000Added", "Click on Advance filter");
                officeTickets_AllTicketsHelper.ClickElement("Advance");

                executionLog.Log("One000Added", "Veirfy website is available under the filter");
                officeTickets_AllTicketsHelper.verifyElementPresent("PegResult");

                executionLog.Log("One000Added", "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("One000Added");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("One 000 Added");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("One 000 Added", "Bug", "Medium", "Advance filter page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("One 000 Added");
                        TakeScreenshot("One000Added");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\One000Added.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("One000Added");
                        string id            = loginHelper.getIssueID("One 000 Added");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\One000Added.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("One 000 Added"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("One 000 Added");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("One000Added");
                executionLog.WriteInExcel("One 000 Added", Status, JIRA, "Client Management");
            }
        }
Exemple #8
0
        public void verifyClientMerchantNumberIssue()
        {
            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 office_ClientsHelper = new Office_ClientsHelper(GetWebDriver());

            // Variable
            var    DBA    = "Client" + RandomNumber(1222, 99999);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyClientMerchantNumberIssue", "Create Client");
                VisitOffice("clients/create");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Verify page title");
                VerifyTitleMerchantClient();

                executionLog.Log("VerifyClientMerchantNumberIssue", "Enter Client Dba Name");
                office_ClientsHelper.TypeText("ClientDBAName", DBA);

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

                executionLog.Log("VerifyClientMerchantNumberIssue", "Select Client Res[onsibility.");
                office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Verify label for merchant number text box.");
                office_ClientsHelper.IsElementPresent("LabelMerchantNumber");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Verify presence of merchant number text box.");
                office_ClientsHelper.IsElementVisible("//*[@id='ClientDetailMerchID']");
                //office_ClientsHelper.WaitForWorkAround(3000);

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

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

                //executionLog.Log("VerifyClientMerchantNumberIssue", "Wait for element to be visible.");
                //office_ClientsHelper.WaitForElementPresent("MerchantNumber", 10);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Goto Company details tab.");
                office_ClientsHelper.ClickElement("MerchantNumber");

                executionLog.Log("VerifyClientMerchantNumberIssue", "Verify label for merchant number text box.");
                office_ClientsHelper.IsElementPresent("LabelMerchantNumber");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Verify presence of merchant number text box.");
                office_ClientsHelper.IsElementVisible("//*[@id='ClientDetailMerchID']");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientMerchantNumberIssue", "Redirect at clients page.");
                VisitOffice("clients");
                office_ClientsHelper.WaitForWorkAround(3000);

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

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

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

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

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

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

                executionLog.Log("VerifyClientMerchantNumberIssue", "Enter Company Name");
                office_ClientsHelper.TypeText("SearchClient", DBA);
                office_ClientsHelper.WaitForWorkAround(2000);
                office_ClientsHelper.selectOwner("//*[@id='gs_first_name']");
                office_ClientsHelper.WaitForWorkAround(2000);

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

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

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

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

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

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

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

                executionLog.Log("DocumentUpdateVersion", "Redirect to URL");
                VisitOffice("documents");

                executionLog.Log("DocumentUpdateVersion", "Wait for element to present");
                officeActivities_DocumentHelper.WaitForElementPresent("EditDoc", 10);

                executionLog.Log("DocumentUpdateVersion", " Click On Edit Icon");
                officeActivities_DocumentHelper.ClickElement("EditDoc");

                executionLog.Log("DocumentUpdateVersion", "Verify page title");
                VerifyTitle("Edit Document");

                executionLog.Log("DocumentUpdateVersion", "ClickOnAddNewVesion");
                officeActivities_DocumentHelper.ClickElement("NewVersion");

                string value = officeActivities_DocumentHelper.GetAtrributeByLocator("//*[@id='DocumentVersion']", "value");
                Console.WriteLine("Value in string = " + value);

                executionLog.Log("DocumentUpdateVersion", "upload file");
                var path = GetPathToFile() + "1.pdf";
                officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", path);

                executionLog.Log("DocumentUpdateVersion", "Enter coment");
                officeActivities_DocumentHelper.TypeText("DocCommnet", "Test Comment");

                executionLog.Log("DocumentUpdateVersion", "Click Save");
                officeActivities_DocumentHelper.ClickDisplayed("//input[@title='Save']");
                officeActivities_DocumentHelper.WaitForWorkAround(1000);

                executionLog.Log("DocumentUpdateVersion", "New Version File Uploaded successfully.");
                officeActivities_DocumentHelper.WaitForText("New Version File Uploaded successfully.", 8);

                double intValue = double.Parse(value);
                Console.WriteLine("Value in int = " + intValue);
                officeActivities_DocumentHelper.WaitForWorkAround(5000);
                value = officeActivities_DocumentHelper.GetAtrributeByLocator("//*[@id='DocumentVersion']", "value");
                Assert.IsTrue(intValue + 1 == double.Parse(value));
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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


            // Variable
            var    FirstName = "Test" + GetRandomNumber();
            var    LastName  = "Tester" + GetRandomNumber();
            var    Number    = "12345678" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("AdminCorpNotesURLChange", "Goto User ");
                VisitOffice("mycorp");
                officeActivities_NotesHelper.WaitForWorkAround(1000);

                executionLog.Log("AdminCorpNotesURLChange", "Select Activity >> Notes");
                officeActivities_NotesHelper.Select("SelectActivityType", "Notes");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminCorpNotesURLChange", "Click On Notes ");
                officeActivities_NotesHelper.ClickElement("OpenNotes");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminCorpNotesURLChange", "Change the url with the url number of another office");
                VisitOffice("viewactivity/note/16");
                officeActivities_NotesHelper.WaitForWorkAround(1000);

                executionLog.Log("AdminCorpNotesURLChange", "Verify Validation");
                officeActivities_NotesHelper.WaitForText("You don't have privileges to view this office activity.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdminCorpNotesURLChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Admin Corp Notes URL Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Admin Corp Notes URL Change", "Bug", "Medium", "Corporate page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Admin Corp Notes URL Change");
                        TakeScreenshot("AdminCorpNotesURLChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminCorpNotesURLChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdminCorpNotesURLChange");
                        string id            = loginHelper.getIssueID("Admin Corp Notes URL Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminCorpNotesURLChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Admin Corp Notes URL Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Admin Corp Notes URL Change");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdminCorpNotesURLChange");
                executionLog.WriteInExcel("Admin Corp Notes URL Change", Status, JIRA, "My Corp");
            }
        }
Exemple #11
0
        public void labelDoubleClickToAddTopicTicket()
        {
            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 officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver());

            // Random Variables
            String JIRA   = "";
            String Status = "Pass";
            var    Name   = "Ticket" + RandomNumber(1, 500);


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

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

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Redirect at opportunities task");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(5000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "create a ticket");
                officeTickets_AllTicketsHelper.ClickElement("CreateBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Enter the ticket name");
                officeTickets_AllTicketsHelper.TypeText("Subject", Name);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Select a Client");
                officeTickets_AllTicketsHelper.ClickElement("SelectClientBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Select the Company");
                officeTickets_AllTicketsHelper.ClickElement("FirstCompany");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on 'Save' button");
                officeTickets_AllTicketsHelper.ClickElement("SaveBtn");
                officeTickets_AllTicketsHelper.WaitForWorkAround(7000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Verify label for ticket displayed.");
                officeTickets_AllTicketsHelper.VerifyText("TOpicVerify", "Double click to add");

                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Search the ticket");
                officeTickets_AllTicketsHelper.TypeText("SearchTicket", Name);
                officeTickets_AllTicketsHelper.WaitForWorkAround(4000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on check box");
                officeTickets_AllTicketsHelper.ClickElement("TicketInputIcon");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);

                executionLog.Log("LabelDoubleClickToAddTopicTicket", "Click on delete button");
                officeTickets_AllTicketsHelper.ClickElement("DeleteIcon");
                officeTickets_AllTicketsHelper.WaitForWorkAround(2000);
                officeTickets_AllTicketsHelper.AcceptAlert();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("LabelDoubleClickToAddTopicTicket");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Label Double Click To Add Topic");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Label Double Click To Add Topic", "Bug", "Medium", "Tickets page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Label Double Click To Add Topic");
                        TakeScreenshot("LabelDoubleClickToAddTopicTicket");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LabelDoubleClickToAddTopicTicket.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("LabelDoubleClickToAddTopicTicket");
                        string id            = loginHelper.getIssueID("Label Double Click To Add Topic");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LabelDoubleClickToAddTopicTicket.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Label Double Click To Add Topic"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Label Double Click To Add Topic");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("LabelDoubleClickToAddTopicTicket");
                executionLog.WriteInExcel("Label Double Click To Add Topic", Status, JIRA, "Office Tickets");
            }
        }
Exemple #12
0
        public void disabledPartnerAgentIssue()
        {
            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_AllAgentHelper       = new Agents_PartnerAgentsHelper(GetWebDriver());
            var    office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";


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

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

                executionLog.Log("DisabledPartnerAgentIssue", "Redirect at partner agents page.");
                VisitOffice("partners/agents");
                agent_AllAgentHelper.WaitForWorkAround(3000);

                executionLog.Log("DisabledPartnerAgentIssue", "Verify Page title");
                VerifyTitle("Partner Agents");

                executionLog.Log("DisabledPartnerAgentIssue", "Search mark matthews");
                agent_AllAgentHelper.TypeText("AgentName", "Mark Menu");
                agent_AllAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("DisabledPartnerAgentIssue", "Check the active agent");
                agent_AllAgentHelper.CheckAndClick("InActiveIcon");
                agent_AllAgentHelper.WaitForWorkAround(4000);

                executionLog.Log("DisabledPartnerAgentIssue", "Redirect at create opportunities page.");
                VisitOffice("opportunities/create");

                executionLog.Log("DisabledPartnerAgentIssue", "Wait for locator to be present.");
                office_OpportunitiesHelper.WaitForElementPresent("Responsibility", 10);

                executionLog.Log("DisabledPartnerAgentIssue", "Verify disabled Partner agent not present for selection.");
                office_OpportunitiesHelper.PAgentNotAvail();

                executionLog.Log("DisabledPartnerAgentIssue", "Redirect at partner agents page.");
                VisitOffice("partners/agents");
                agent_AllAgentHelper.WaitForWorkAround(3000);

                executionLog.Log("DisabledPartnerAgentIssue", "Verify Page title");
                VerifyTitle("Partner Agents");

                executionLog.Log("DisabledPartnerAgentIssue", "Enter partner name to be search");
                agent_AllAgentHelper.TypeText("AgentName", "Mark Menu");
                agent_AllAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("DisabledPartnerAgentIssue", "Verify partner status as inactive.");
                agent_AllAgentHelper.VerifyText("VerifyStatus", "Inactive");
                //agent_AllAgentHelper.WaitForWorkAround(3000);

                executionLog.Log("DisabledPartnerAgentIssue", "Click to make partner agent active.");
                agent_AllAgentHelper.ClickJava("MakeActiveIcon");
                agent_AllAgentHelper.WaitForWorkAround(1000);
                agent_AllAgentHelper.AcceptAlert();

                executionLog.Log("DisabledPartnerAgentIssue", "Wait for success text.");
                agent_AllAgentHelper.WaitForText("Partner Agent is Activated.", 10);
                //agent_AllAgentHelper.WaitForWorkAround(3000);

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


            // var DBA = "ClientDBA" + RandomNumber(111, 99999);
            var Code = "" + RandomNumber(1, 999);

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

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

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

                executionLog.Log("TSYSMCCDescription", "Go to All Processors");
                VisitOffice("processor_types");
                all_ProcessorsHelper.WaitForWorkAround(2000);

                executionLog.Log("TSYSMCCDescription", "Enter Processor Name In Search field");
                all_ProcessorsHelper.TypeText("SearchProcName", "TSYS");
                all_ProcessorsHelper.WaitForWorkAround(3000);

                var loc = "//table[@id='list1']/tbody[1]/tr[2]/td[@title='TSYS']";

                if (all_ProcessorsHelper.IsElementPresent(loc))
                {
                    Console.WriteLine("TSYS Processor found");
                    executionLog.Log("TSYSMCCDescription", "Go to All Merchants");
                    VisitOffice("clients");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Click on First Client");
                    office_ClientsHelper.ClickElement("Client1");
                    office_ClientsHelper.WaitForWorkAround(3000);

                    executionLog.Log("TSYSMCCDescription", "Go to Business Details Tab");
                    office_ClientsHelper.ClickElement("BusinessDetailsTab");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Select TSYS Processor");
                    office_ClientsHelper.Select("Processor", "TSYS");
                    office_ClientsHelper.WaitForWorkAround(3000);

                    executionLog.Log("TSYSMCCDescription", "Select and Option in MCC/SIC Code drop down");
                    office_ClientsHelper.SelectByText("MCC_SICCode", "1731 - Electrical Contractors");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Verify MCC Description populated");
                    office_ClientsHelper.VerifyTextBoxValue("MCCDescription", "Electrical Contractors");
                    Console.WriteLine("MCC Description populated");
                }

                else
                {
                    Console.WriteLine("TSYS Processor not found. Hence creating one");
                    executionLog.Log("TSYSMCCDescription", "Click on Create button");
                    all_ProcessorsHelper.ClickElement("Create");
                    all_ProcessorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Enter Processor Name");
                    all_ProcessorsHelper.TypeText("ProcName", "TSYS");

                    executionLog.Log("TSYSMCCDescription", "Select Processor to fetch field from");
                    all_ProcessorsHelper.Select("FetchField", "TSYS");

                    executionLog.Log("TSYSMCCDescription", "Enter Processor Code");
                    all_ProcessorsHelper.TypeText("ProcCode", Code);

                    executionLog.Log("TSYSMCCDescription", "Click on Create button");
                    all_ProcessorsHelper.ClickElement("SaveBtn");
                    all_ProcessorsHelper.WaitForWorkAround(3000);

                    executionLog.Log("TSYSMCCDescription", "Go to All Merchants");
                    VisitOffice("clients");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Click on First Client");
                    office_ClientsHelper.ClickElement("Client1");
                    office_ClientsHelper.WaitForWorkAround(3000);

                    executionLog.Log("TSYSMCCDescription", "Go to Business Details Tab");
                    office_ClientsHelper.ClickElement("BusinessDetailsTab");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Select TSYS Processor");
                    office_ClientsHelper.Select("Processor", "TSYS");
                    office_ClientsHelper.WaitForWorkAround(3000);

                    executionLog.Log("TSYSMCCDescription", "Select and Option in MCC/SIC Code drop down");
                    office_ClientsHelper.SelectByText("MCC_SICCode", "1731 - Electrical Contractors");
                    office_ClientsHelper.WaitForWorkAround(2000);

                    executionLog.Log("TSYSMCCDescription", "Verify MCC Description populated");
                    office_ClientsHelper.VerifyTextBoxValue("MCCDescription", "Electrical Contractors");
                    Console.WriteLine("MCC Description populated");
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Redirect at admin page.");
                VisitOffice("admin");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " verify title");
                VerifyTitle("Calls");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on create button.");
                officeActivities_CallsHelper.ClickElement("Create");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on save button.");
                officeActivities_CallsHelper.ClickElement("Save");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "verify validation for call type");
                officeActivities_CallsHelper.VerifyText("CallTypeError", "This field is required.");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "verify validation for call name.");
                officeActivities_CallsHelper.VerifyText("CallNameError", "This field is required.");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "verify validation for call to.");
                officeActivities_CallsHelper.VerifyText("CallToNameError", "This field is required.");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "verify validation for from number.");
                officeActivities_CallsHelper.VerifyText("FromNumError", "This field is required.");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "verify validation for to number.");
                officeActivities_CallsHelper.VerifyText("ToNumError", "This field is required.");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Select call type");
                officeActivities_CallsHelper.Select("CallType", "Personal");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Select call related to.");
                officeActivities_CallsHelper.Select("Relatedto", "20");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on find list icon.");
                officeActivities_CallsHelper.ClickElement("Findlist");
                officeActivities_CallsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on first client.");
                officeActivities_CallsHelper.ClickElement("Client1");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Enter call from name.");
                officeActivities_CallsHelper.TypeText("CallFrom", "Howard Tang");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call to name");
                officeActivities_CallsHelper.TypeText("CallToName", "Randy Jackson");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call from number.");
                officeActivities_CallsHelper.TypeText("FromNumber", "1221221122");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call to number.");
                officeActivities_CallsHelper.TypeText("CallTONumber", "1221221122");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on start button.");
                officeActivities_CallsHelper.ClickElement("Start");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for some time.");
                officeActivities_CallsHelper.WaitForWorkAround(20000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on stop button.");
                officeActivities_CallsHelper.ClickElement("Stop");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on save button.");
                officeActivities_CallsHelper.ClickElement("Save");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for success text.");
                officeActivities_CallsHelper.WaitForText("Call logged successfully.", 10);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify page title as calls.");
                VerifyTitle("Calls");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on created call.");
                officeActivities_CallsHelper.ClickElement("Call1");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify call created by credits.");
                officeActivities_CallsHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify call modified by credits.");
                officeActivities_CallsHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on edit button.");
                officeActivities_CallsHelper.ClickElement("EditLink");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Select call related to.");
                officeActivities_CallsHelper.Select("Relatedto", "14");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on find list icon.");
                officeActivities_CallsHelper.ClickElement("Findlist");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on first lead.");
                officeActivities_CallsHelper.ClickElement("Client1");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Enter call from name.");
                officeActivities_CallsHelper.TypeText("CallFrom", "Howard Tang");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call to name");
                officeActivities_CallsHelper.TypeText("CallToName", "Randy Jackson");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call from number.");
                officeActivities_CallsHelper.TypeText("FromNumber", "1221221122");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " Enter call to number.");
                officeActivities_CallsHelper.TypeText("CallTONumber", "1221221122");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on start button.");
                officeActivities_CallsHelper.ClickElement("Start");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for some time.");
                officeActivities_CallsHelper.WaitForWorkAround(20000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on stop button.");
                officeActivities_CallsHelper.ClickElement("Stop");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on save button.");
                officeActivities_CallsHelper.ClickElement("Save");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for updation success message.");
                officeActivities_CallsHelper.WaitForText("Updated Successfully.", 10);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify page title as calls.");
                VerifyTitle("Calls");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on created call.");
                officeActivities_CallsHelper.ClickElement("Call1");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify call created by credits.");
                officeActivities_CallsHelper.VerifyText("CreatedBy", "Howard Tang");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify call modified by credits.");
                officeActivities_CallsHelper.VerifyText("ModifiedBy", "Howard Tang");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", " verify title");
                VerifyTitle("Calls");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for next element to present.");
                officeActivities_CallsHelper.WaitForElementPresent("Call1", 10);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on first check box");
                officeActivities_CallsHelper.ClickElement("ChkBox1");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on delete button.");
                officeActivities_CallsHelper.ClickElement("Delete");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on OK to accept alert message.");
                officeActivities_CallsHelper.AcceptAlert();
                officeActivities_CallsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for text call deleted.");
                officeActivities_CallsHelper.WaitForText("Call deleted successfully.", 20);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Redirect at call recycle bin page.");
                VisitOffice("calls/recyclebin");

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Verify page title..");
                VerifyTitle("Recycled Calls");
                officeActivities_CallsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Click on delete icon.");
                officeActivities_CallsHelper.ClickElement("DeleteRecycle");
                officeActivities_CallsHelper.AcceptAlert();

                executionLog.Log("VerifyCallsCreatedAndModifiedByCredits", "Wait for deletion success text.");
                officeActivities_CallsHelper.WaitForText("Call Permanently Deleted.", 30);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var    FirstName = "Test" + GetRandomNumber();
            var    LastName  = "Tester" + GetRandomNumber();
            var    Number    = "12345678" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("ValidationforContactPrimaryEmail", "Go to contacts page");
                VisitOffice("contacts");
                contact_Helper.WaitForWorkAround(3000);

                //contact_Helper.TypeText("SearchName", "aslam ");
                //contact_Helper.WaitForWorkAround(4000);

                executionLog.Log("ValidationforContactPrimaryEmail", "Click On Any  Contact");
                contact_Helper.ClickElement("CheckTheFirstContact");
                contact_Helper.WaitForWorkAround(2000);

                executionLog.Log("ValidationforContactPrimaryEmail", "Click On Edit icon");
                contact_Helper.ClickElement("EditContactNewSkin");
                contact_Helper.WaitForWorkAround(3000);

                executionLog.Log("ValidationforContactPrimaryEmail", "Click On Save Button");
                contact_Helper.ClickElement("SaveContactN");

                executionLog.Log("ValidationforContactPrimaryEmail", "Wait for success message");
                contact_Helper.WaitForText("Contact has been updated.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ValidationforContactPrimaryEmail");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Validation for Contact Primary Email");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Validation for Contact Primary Email", "Bug", "Medium", "Contact page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Validation for Contact Primary Email");
                        TakeScreenshot("ValidationforContactPrimaryEmail");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ValidationforContactPrimaryEmail.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ValidationforContactPrimaryEmail");
                        string id            = loginHelper.getIssueID("Validation for Contact Primary Email");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ValidationforContactPrimaryEmail.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Validation for Contact Primary Email"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Validation for Contact Primary Email");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ValidationforContactPrimaryEmail");
                executionLog.WriteInExcel("Validation for Contact Primary Email", Status, JIRA, "Contact Management");
            }
        }
Exemple #16
0
        public void bulkUpdateVendorStatus()
        {
            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    equipment_VendorsHelper = new Equipment_VendorsHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("BulkUpdateVendorStatus", "Redirect To Vander");
                VisitOffice("vendors");

                executionLog.Log("BulkUpdateVendorStatus", "Verify Page title");
                VerifyTitle("Vendors");

                var Loc = "//table[@id='list1']/tbody/tr[2]";
                if (equipment_VendorsHelper.IsElementPresent(Loc))
                {
                    executionLog.Log("BulkUpdateVendorStatus", "Click on first check box.");
                    equipment_VendorsHelper.ClickElement("SelectFirstCheckBox");

                    executionLog.Log("BulkUpdateVendorStatus", "Click on Bulk Update");
                    equipment_VendorsHelper.ClickJs("ClickOnBulkUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Click on change status");
                    equipment_VendorsHelper.ClickJs("ChangeStatusBulkUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Click on Update");
                    equipment_VendorsHelper.ClickElement("StatusUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Accept alert messsage");
                    equipment_VendorsHelper.AcceptAlert();

                    executionLog.Log("BulkUpdateVendorStatus", "Wait for success message.");
                    equipment_VendorsHelper.WaitForText("Vendor status updated successfully.", 10);
                    equipment_VendorsHelper.WaitForWorkAround(2000);
                }
                else
                {
                    executionLog.Log("BulkUpdateVendorStatus", " Click On Create");
                    VisitOffice("vendors/create");

                    executionLog.Log("BulkUpdateVendorStatus", " Verify title");
                    VerifyTitle("Create a New Vendor");

                    executionLog.Log("BulkUpdateVendorStatus", "Select vendor type.");
                    equipment_VendorsHelper.SelectDropDownByText("//*[@id='VendorType']", "Online");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter vendor name.");
                    equipment_VendorsHelper.TypeText("Name", "Bulk Vendor");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter DBA name");
                    equipment_VendorsHelper.TypeText("DBAName", "Test123");

                    executionLog.Log("BulkUpdateVendorStatus", "Select Salutation");
                    equipment_VendorsHelper.Select("Salutation", "Mr");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter First Name");
                    equipment_VendorsHelper.TypeText("FirstName", "Test");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter Last Name");
                    equipment_VendorsHelper.TypeText("LastName", "Bulk");

                    executionLog.Log("BulkUpdateVendorStatus", "Select eAddress");
                    equipment_VendorsHelper.Select("eAddessType", "E-Mail");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter eAddress Label");
                    equipment_VendorsHelper.Select("EAddressLabel", "Work");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter Eaddress");
                    equipment_VendorsHelper.TypeText("eAddress", "*****@*****.**");

                    executionLog.Log("BulkUpdateVendorStatus", "Phone Type");
                    equipment_VendorsHelper.Select("PhoneType", "Work");

                    executionLog.Log("BulkUpdateVendorStatus", "Enter Zip Code");
                    equipment_VendorsHelper.TypeText("ZipCodeVendor", "60601");

                    executionLog.Log("BulkUpdateVendorStatus", " Click on Save button");
                    equipment_VendorsHelper.Click("//button[@title='Save']");
                    equipment_VendorsHelper.WaitForWorkAround(5000);

                    executionLog.Log("BulkUpdateVendorStatus", " Select first vendor");
                    equipment_VendorsHelper.ClickElement("SelectFirstCheckBox");

                    executionLog.Log("BulkUpdateVendorStatus", "Click on bulk update.");
                    equipment_VendorsHelper.ClickJs("ClickOnBulkUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", " Click on Cahnge status");
                    equipment_VendorsHelper.ClickJs("ChangeStatusBulkUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Click on Update");
                    equipment_VendorsHelper.ClickElement("StatusUpdate");
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Accept alert message.");
                    equipment_VendorsHelper.AcceptAlert();
                    equipment_VendorsHelper.WaitForWorkAround(2000);

                    executionLog.Log("BulkUpdateVendorStatus", "Wait for success message");
                    equipment_VendorsHelper.WaitForText("Vendor status updated successfully.", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var dashBoard_CreateDashboardHelper = new DashBoard_CreateDashboardHelper(GetWebDriver());

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

            // Variable
            var    DashBoard = "Dash" + RandomNumber(99, 99999);
            var    LName     = "Test" + RandomNumber(99, 99999);
            var    CDBA      = "New" + RandomNumber(99, 99999);
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("Dashboard", "Goto Create Dashboard");
                VisitOffice("dashboards/create");

                executionLog.Log("Dashboard", "Enter Dashboard Name");
                dashBoard_CreateDashboardHelper.TypeText("EnterDashboardName", DashBoard);

                executionLog.Log("Dashboard", "Click on Report Dashlest");
                dashBoard_CreateDashboardHelper.ClickElement("ClientReportDashlest");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Click Next Button");
                dashBoard_CreateDashboardHelper.ClickElement("ClickNextButton");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Save Dashboard");
                dashBoard_CreateDashboardHelper.ClickElement("ClickDashboardSaveBtn");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Goto Dashboard");
                VisitOffice("dashboards");

                executionLog.Log("Dashboard", "Search Name");
                dashBoard_CreateDashboardHelper.TypeText("SearchDeshboard", DashBoard);
                dashBoard_CreateDashboardHelper.selectOwner("//*[@name='owner']");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Click on Edit Dashboard");
                dashBoard_CreateDashboardHelper.ClickElement("ClickOnEditDashboard");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Click on Cancel button.");
                dashBoard_CreateDashboardHelper.ClickElement("ClickCancelDasEdit");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Dashboard Verify");
                dashBoard_CreateDashboardHelper.VerifyText("VerifyTextDeshboard", "Dashboards");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Goto Dashbord");
                VisitOffice("dashboards");

                executionLog.Log("Dashboard", "Search Dashboard");
                dashBoard_CreateDashboardHelper.TypeText("SearchDeshboard", DashBoard);
                dashBoard_CreateDashboardHelper.selectOwner("//*[@name='owner']");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Click on Edit");
                dashBoard_CreateDashboardHelper.ClickElement("ClickOnEditDashboard");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Click on Next");
                dashBoard_CreateDashboardHelper.ClickElement("ClickNextButton");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Click  on Save Dashboard");
                dashBoard_CreateDashboardHelper.ClickElement("ClickDashboardSaveBtn");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Goto Dashboard");
                VisitOffice("dashboards");

                executionLog.Log("Dashboard", "Search Dashboard");
                dashBoard_CreateDashboardHelper.TypeText("SearchDeshboard", DashBoard);
                dashBoard_CreateDashboardHelper.selectOwner("//*[@name='owner']");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Delete Dashboard");
                dashBoard_CreateDashboardHelper.ClickElement("ClickDeleteDashboard");
                dashBoard_CreateDashboardHelper.AcceptAlert();

                executionLog.Log("Dashboard", "Wait for confirmation.");
                dashBoard_CreateDashboardHelper.WaitForText("Dashboard deleted successfully.", 10);

                executionLog.Log("Dashboard", "Goto Dashbord");
                VisitOffice("dashboards");

                executionLog.Log("Dashboard", "Click on dashboard.");
                dashBoard_CreateDashboardHelper.ClickElement("ClickOnDashBoard");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Click on Edit Icon");
                dashBoard_CreateDashboardHelper.ClickElement("ClickEditDashboardButton");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("Dashboard", "Click on Next");
                dashBoard_CreateDashboardHelper.ClickElement("ClickNextButton");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);

                executionLog.Log("Dashboard", "Save Dashboard");
                dashBoard_CreateDashboardHelper.ClickElement("ClickDashboardSaveBtn");
                dashBoard_CreateDashboardHelper.WaitForWorkAround(3000);
            }



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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("Dashboard");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Dashboard");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Dashboard", "Bug", "Medium", "Dashboard page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Dashboard");
                        TakeScreenshot("Dashboard");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Dashboard.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("Dashboard");
                        string id            = loginHelper.getIssueID("Dashboard");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\Dashboard.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Dashboard"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Dashboard");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("Dashboard");
                executionLog.WriteInExcel("Dashboard", Status, JIRA, "Office Reports&DashBoards");
            }
        }
        public void verifyingPartnerAssociationModiifedCredentials()
        {
            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 = "testinguser" + RandomNumber(111, 99999);
            String JIRA      = "";
            String Status    = "Pass";

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyingPartnerAssociationModiifedCredentials", "Enter the DOB");
                agent_PartnerAssociationHelper.TypeText("PartnerAssoBirthday", "12/14/1993");

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

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

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

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

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

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

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

                executionLog.Log("VerifyingPartnerAssociationModiifedCredentials", "Enter PhoneNumber");
                agent_PartnerAssociationHelper.TypeText("PostalCode", "60601");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyingPartnerAssociationModiifedCredentials", "Select Avatar");
                agent_PartnerAssociationHelper.ClickElement("ClickOnAvatar");

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

                agent_PartnerAssociationHelper.VerifyText("VerifyTextPresent", "Partner Associations");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyingPartnerAssociationModiifedCredentials", "Verify Modified By credentials");
                agent_PartnerAssociationHelper.VerifyText("ModifiedOn", "By Howard Tang");
                agent_PartnerAssociationHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyingPartnerAssociationModiifedCredentials");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verifying Partner Association Modiifed Credentials");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verifying Partner Association Modiifed Credentials", "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("Verifying Partner Association Modiifed Credentials");
                        TakeScreenshot("VerifyingPartnerAssociationModiifedCredentials");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingPartnerAssociationModiifedCredentials.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyingPartnerAssociationModiifedCredentials");
                        string id            = loginHelper.getIssueID("Verifying Partner Association Modiifed Credentials");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingPartnerAssociationModiifedCredentials.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verifying Partner Association Modiifed Credentials"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verifying Partner Association Modiifed Credentials");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyingPartnerAssociationModiifedCredentials");
                executionLog.WriteInExcel("Verifying Partner Association Modiifed Credentials", Status, JIRA, "Agents Portal");
            }
        }
Exemple #19
0
        public void corporatePortal2()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var corpFieldDictionary_SectionsHelper = new CorpFieldDictionary_SectionsHelper(GetWebDriver());
            var corpFieldDictionary_TabsHelper     = new CorpFieldDictionary_TabsHelper(GetWebDriver());
            var corpSystem_SettingsHelper          = new CorpSystem_SettingsHelper(GetWebDriver());
            var corp_ProfileHelper                = new Corp_ProfileHelper(GetWebDriver());
            var corpSystem_AuditTrialsHelper      = new CorpSystem_AuditTrialsHelper(GetWebDriver());
            var corpSystem_EmailTemplatesHelper   = new CorpSystem_EmailTemplatesHelper(GetWebDriver());
            var corpMasterdata_RatesAndFeesHelper = new CorpMasterdata_RatesAndFeesHelper(GetWebDriver());

            // Variable random
            var usernme = "Sysprins" + RandomNumber(44, 799999977);
            var name    = "Test" + GetRandomNumber();
            var FDNAME  = "TEST" + GetRandomNumber();

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

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

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

                executionLog.Log("CorporatePortal2", "Visit rates and fee page.");
                VisitCorp("masterdata/manage_rates_fees");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Enter template name.");
                corpMasterdata_RatesAndFeesHelper.TypeText("PricingTemplateName", name);

                executionLog.Log("CorporatePortal2", "Select Processor Type");
                corpMasterdata_RatesAndFeesHelper.SelectByText("ProcessorType", "First Data Omaha");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Select Merchant Type");
                corpMasterdata_RatesAndFeesHelper.SelectByText("SelectMerchanType", "Ecommerce");
                //corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Methos Of Accepting");
                corpMasterdata_RatesAndFeesHelper.SelectByText("MethodOfAcceptingCards", "Manually Swiped");
                //corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Click on Save button.");
                corpMasterdata_RatesAndFeesHelper.ClickElement("ClickRateAndFeesSave");
                //corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Wait for confirmation.");
                corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully created!!", 10);
                //corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal2", "Goto masterdata/rates_fees");
                VisitCorp("masterdata/rates_fees");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Edit Icon");
                corpMasterdata_RatesAndFeesHelper.ClickElement("EditRateAndFeesIcon");
                //corpMasterdata_RatesAndFeesHelper.WaitForElementPresent("ClickRateAndFeesSave", 10);
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Click on Save");
                corpMasterdata_RatesAndFeesHelper.ClickElement("ClickRateAndFeesSave");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Goto masterdata/rates_fees");
                VisitCorp("masterdata/rates_fees");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Enter Rate and Fess TEMPLATE NAME");
                corpMasterdata_RatesAndFeesHelper.TypeText("SearchTemp", name);
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal2", "Delete icon");
                corpMasterdata_RatesAndFeesHelper.ClickElement("ClickOnDelete");
                corpMasterdata_RatesAndFeesHelper.AcceptAlert();

                executionLog.Log("CorporatePortal2", "Wait for Confirmation");
                corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully deleted!!", 10);
                //corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "email_templates");
                VisitCorp("email_templates");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Click on Edit");
                corpSystem_EmailTemplatesHelper.ClickElement("EditEmailTemplateIcon");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Save");
                corpSystem_EmailTemplatesHelper.ClickElement("ClickOnSaveEmailTemp");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Wait for Confirmation");
                corpSystem_EmailTemplatesHelper.WaitForText("The email management has been saved", 10);

                executionLog.Log("CorporatePortal2", "Goto Audit trial");
                VisitCorp("audit-trails");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Click on Audit Trail name");
                corpSystem_AuditTrialsHelper.ClickElement("ClickOnAuditTrialMame");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Audit trial Save button");
                corpSystem_AuditTrialsHelper.ClickElement("AduiltTrialSaveBtn");

                executionLog.Log("CorporatePortal2", "Wait for Confirmation");
                corpSystem_AuditTrialsHelper.WaitForText("Options Saved.", 10);

                executionLog.Log("CorporatePortal2", "got to my profile");
                VisitCorp("myprofile");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Click Edit");
                corp_ProfileHelper.ClickElement("EditProfile");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Click on Save");
                corp_ProfileHelper.ClickElement("Save");
                corpMasterdata_RatesAndFeesHelper.AcceptAlert();

                executionLog.Log("CorporatePortal2", "Wait for Confirmation");
                corp_ProfileHelper.WaitForText("Your profile has been successfully updated", 10);

                executionLog.Log("CorporatePortal2", "Redirect at settings");
                VisitCorp("settings");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Click Save Edit Profile");
                corpSystem_SettingsHelper.ClickElement("ClickSaveEditProfile");

                executionLog.Log("CorporatePortal2", "Wait for confirmation");
                corpSystem_SettingsHelper.WaitForText("Settings updated successfully", 20);

                executionLog.Log("CorporatePortal2", "go to tabs");
                VisitCorp("tabs");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Create");
                corpFieldDictionary_TabsHelper.ClickElement("AddNewTabs");
                corpFieldDictionary_TabsHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Tab Name");
                corpFieldDictionary_TabsHelper.TypeText("TabName", name);

                executionLog.Log("CorporatePortal2", "Click on Save");
                corpFieldDictionary_TabsHelper.ClickOnDisplayed("FDSaveButton");
                corpFieldDictionary_TabsHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Wait for Confirmation");
                corpFieldDictionary_TabsHelper.WaitForText("Tab Created Successfully", 10);

                executionLog.Log("CorporatePortal2", "Go to Sections");
                VisitCorp("sections");
                corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal2", "Create Button");
                corpFieldDictionary_SectionsHelper.ClickElement("ClickCreateButton");
                corpFieldDictionary_SectionsHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal2", "Select tab");
                corpFieldDictionary_SectionsHelper.SelectByText("TabNameFieldDicSevtion", name);

                executionLog.Log("CorporatePortal2", "Section Name");
                corpFieldDictionary_SectionsHelper.TypeText("FDSectionName", FDNAME);

                executionLog.Log("CorporatePortal2", "Save");
                corpFieldDictionary_SectionsHelper.ClickOnDisplayed("FDSaveButton");

                executionLog.Log("CorporatePortal2", "Confirmation");
                corpFieldDictionary_SectionsHelper.VerifyAlertText("Section Created Successfully");
                corpFieldDictionary_SectionsHelper.AcceptAlert();
                corpFieldDictionary_SectionsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // VARIABLE
            var    Company = "My Company" + GetRandomNumber();
            var    name    = "TestEmployee" + GetRandomNumber();
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("LeadSave", "Redirect To ");
                VisitOffice("leads/create");

                executionLog.Log("LeadSave", "Verify page title. ");
                VerifyTitle("Create a Lead");
                Office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadSave", "Click on Assignments");
                Office_LeadsHelper.ClickElement("Assignments");

                executionLog.Log("LeadSave", "Wait for element to be visible.");
                Office_LeadsHelper.WaitForElementPresent("LeadStatus", 10);

                executionLog.Log("LeadSave", "Select Lead Status");
                Office_LeadsHelper.Select("LeadStatus", "New");

                executionLog.Log("LeadSave", "LeadResponsibility");
                Office_LeadsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("LeadSave", "Enter First Name ");
                Office_LeadsHelper.TypeText("FirstNameLead", "Test Lead");

                executionLog.Log("LeadSave", "Enter Last Name");
                Office_LeadsHelper.TypeText("LastName", "Tester");

                executionLog.Log("LeadSave", "Enter Company Name");
                Office_LeadsHelper.TypeText("CompanyName", Company);

                executionLog.Log("LeadSave", "Click on Save");
                Office_LeadsHelper.ClickElement("SaveLeadButton");
                Office_LeadsHelper.WaitForWorkAround(1000);

                var LocDub = "//button[text()='Create Duplicate']";
                if (Office_LeadsHelper.IsElementPresent(LocDub))
                {
                    Office_LeadsHelper.WaitForWorkAround(4000);

                    executionLog.Log("LeadSave", "Click on duplicate btn");
                    Office_LeadsHelper.Click(LocDub);
                    Office_LeadsHelper.WaitForWorkAround(3000);

                    executionLog.Log("LeadSave", "Verify text.");
                    Office_LeadsHelper.WaitForText("Lead saved successfully.", 10);
                    Office_LeadsHelper.WaitForWorkAround(1000);

                    executionLog.Log("LeadSave", "Redirect To create lead page. ");
                    VisitOffice("leads");

                    executionLog.Log("LeadSave", "Enter Company Name");
                    Office_LeadsHelper.TypeText("CompanySearch", Company);
                    Office_LeadsHelper.WaitForWorkAround(2000);

                    executionLog.Log("LeadSave", "Select lead by check box");
                    Office_LeadsHelper.ClickElement("CheckDocToDel");
                    Office_LeadsHelper.WaitForWorkAround(2000);

                    executionLog.Log("LeadSave", "Click on delete lead");
                    Office_LeadsHelper.ClickElement("DeleteLead");

                    executionLog.Log("LeadSave", "Accept alert message.");
                    Office_LeadsHelper.AcceptAlert();

                    executionLog.Log("LeadSave", "Wait for success message.");
                    Office_LeadsHelper.WaitForText("1 records deleted successfully", 10);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

            // Initializing the objects
            var executionLog         = new ExecutionLog();
            var loginHelper          = new LoginHelper(GetWebDriver());
            var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver());

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

            // Variable
            var    Oppname = "Test" + RandomNumber(99, 99999);
            var    DBA     = "New" + RandomNumber(99, 99999);
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("VerifyQuickLookLabelsForClients", "Goto Create Client");
                VisitOffice("clients/create");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Enter Client Dba Name");
                office_ClientsHelper.TypeText("ClientDBAName", DBA);

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

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

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

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

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for client type.");
                office_ClientsHelper.VerifyText("ClientType", "Click to edit");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for status.");
                office_ClientsHelper.VerifyText("Status1", "New");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for source.");
                office_ClientsHelper.VerifyText("Source", "Select");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for category");
                office_ClientsHelper.VerifyText("Category", "Select");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for responsibility");
                office_ClientsHelper.VerifyText("Responsibilityl", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for account manager.");
                office_ClientsHelper.VerifyText("AccountManager", "Select");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for partner agent.");
                office_ClientsHelper.VerifyText("PartnerAgentl", "Select");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Save Button");
                office_ClientsHelper.VerifyText("PartnerAssociationl", "Select Partner Association");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Save Button");
                office_ClientsHelper.VerifyText("SalesManager", "Select");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Click on company details tab.");
                office_ClientsHelper.ClickElement("CompanyDetails");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Enter the Ferderal tax id");
                office_ClientsHelper.TypeText("FederalTaxID", "123432232");
                //office_ClientsHelper.WaitForWorkAround(3000);

                //executionLog.Log("VerifyQuickLookLabelsForClients", "Click on assignments.");
                //office_ClientsHelper.ClickElement("EditAssignments");
                //office_ClientsHelper.WaitForWorkAround(3000);

                //executionLog.Log("VerifyQuickLookLabelsForClients", "Wait for locator to be present.");
                //office_ClientsHelper.WaitForElementPresent("Clientt", 10);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client type.");
                office_ClientsHelper.Select("SelectClientT", "Processing");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client refferal source.");
                office_ClientsHelper.Select("SelectSource", "Campaign");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client category.");
                office_ClientsHelper.SelectByText("SelectCategory", "Other");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select account manager.");
                office_ClientsHelper.SelectByText("SelectAcc.Mger", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client user group.");
                office_ClientsHelper.SelectByText("Ugroup", "Primary Group");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select sales manager.");
                office_ClientsHelper.SelectByText("SelectSalesManager", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client responsibility");
                office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select partner agent.");
                office_ClientsHelper.SelectByText("ClientPartnerAgent", "Mark Menu");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select partner association.");
                office_ClientsHelper.SelectByText("ClientPartnerAssociation", "Aslam Associate");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "click on save client");
                office_ClientsHelper.ClickElement("SaveButtonByTitle");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "click on info tab.");
                office_ClientsHelper.ClickElement("InfoTab");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for client type.");
                office_ClientsHelper.VerifyText("ClientType", "Processing");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for status.");
                office_ClientsHelper.VerifyText("Status1", "New");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for source.");
                office_ClientsHelper.VerifyText("Source", "Campaign");
                //office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for category.");
                office_ClientsHelper.VerifyText("Category", "Other");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for responsibility.");
                office_ClientsHelper.VerifyText("Responsibilityl", "Howard Tang");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for account manager.");
                office_ClientsHelper.VerifyText("AccountManager", "Howard Tang");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for partner agent.");
                office_ClientsHelper.VerifyText("PartnerAgentl", "Mark Menu");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for partner association.");
                office_ClientsHelper.VerifyText("PartnerAssociationl", "Aslam Associate");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForClients", "Verify label for partner association.");
                office_ClientsHelper.VerifyText("SalesManager", "Howard Tang");
                office_ClientsHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyQuickLookLabelsForClients", "Select client by check box");
                office_ClientsHelper.ClickElement("ClickOn1stOpp");
                //office_ClientsHelper.WaitForWorkAround(2000);

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

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

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

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

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

                executionLog.Log("VerifyQuickLookLabelsForClients", "Selcet All in responsibility field");
                office_ClientsHelper.SelectByText("ClientResponsibityRecycle", "All");
                office_ClientsHelper.WaitForWorkAround(2000);

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

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

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

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

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

            // VARIABLE
            var name = "TestEmployee" + GetRandomNumber();

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

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

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

                executionLog.Log("ClientSSNIssue", "Go to client page");
                VisitOffice("clients");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ClientSSNIssue", "Verify title");
                VerifyTitle("Clients");

                executionLog.Log("ClientSSNIssue", "Open a client");
                office_ClientsHelper.ClickElement("Client1");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ClientSSNIssue", "Click on 'Owner' tab");
                office_ClientsHelper.ClickForce("OwnerTab");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ClientSSNIssue", "Enter the title of owner");
                office_ClientsHelper.TypeText("TitleOwner", "President");

                executionLog.Log("ClientSSNIssue", "Enter SSN");
                office_ClientsHelper.TypeText("SSN", "877656756");

                executionLog.Log("ClientSSNIssue", "Click on Save button");
                office_ClientsHelper.ClickElement("OwnerSave");

                executionLog.Log("ClientSSNIssue", "Wait for success message");
                office_ClientsHelper.WaitForText("Client data updated successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var tab = "tab" + RandomNumber(111, 999);

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

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

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

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify page title.");
                VerifyTitle("Iframe Apps");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", " Click On Create button.");
                integration_IframeAppsHelper.ClickElement("Create");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify page title.");
                VerifyTitle("Create Iframe");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on Save button.");
                integration_IframeAppsHelper.ClickElement("Save");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for mandatoryness.");
                integration_IframeAppsHelper.VerifyText("TabNameErr", "This field is required.");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for mandatoryness.");
                integration_IframeAppsHelper.VerifyText("UserNameErr", "This field is required.");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for mandatoryness.");
                integration_IframeAppsHelper.VerifyText("PasswrdErr", "This field is required.");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for mandatoryness.");
                integration_IframeAppsHelper.VerifyText("URLErr", "This field is required.");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on cancel button.");
                integration_IframeAppsHelper.ClickElement("Cancel");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify Page title.");
                VerifyTitle("Iframe Apps");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", " Click On Create button.");
                integration_IframeAppsHelper.ClickElement("Create");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify page title.");
                VerifyTitle("Create Iframe");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter Tab Name");
                integration_IframeAppsHelper.TypeText("TabName", tab);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter user Name");
                integration_IframeAppsHelper.TypeText("UserNameInputFieldName", "User");
                //integration_IframeAppsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter Password");
                integration_IframeAppsHelper.TypeText("PasswordInputFieldNmae", "1qaz!QAZ");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter an invalid alphabetical url.");
                integration_IframeAppsHelper.TypeText("LoginURL", "sadada");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for invalid url.");
                integration_IframeAppsHelper.VerifyText("URLErr2", "Invalid URL");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter an invalid numerical url.");
                integration_IframeAppsHelper.TypeText("LoginURL", "12222");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for invalid url.");
                integration_IframeAppsHelper.VerifyText("URLErr2", "Invalid URL");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter an invalid web address.");
                integration_IframeAppsHelper.TypeText("LoginURL", "www.google.com");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify validation for invalid url.");
                integration_IframeAppsHelper.VerifyText("URLErr2", "Invalid URL");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter a valid Login Url");
                integration_IframeAppsHelper.TypeText("LoginURL", _office + "login");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on client portal check box.");
                integration_IframeAppsHelper.ClickElement("ClientPortal");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on Save button");
                integration_IframeAppsHelper.ClickElement("Save");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Wait for creation success text.");
                integration_IframeAppsHelper.WaitForText("Iframe created successfully.", 10);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Logout from the application.");
                VisitOffice("logout");

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify page title.");
                VerifyTitle("Dashboard");
                integration_IframeAppsHelper.WaitForWorkAround(5000);

                var loc = "//span[text()='" + tab + "']";
                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Wait for locator to be present.");
                integration_IframeAppsHelper.WaitForElementPresent(loc, 10);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify created iframe present in client user portal.");
                integration_IframeAppsHelper.IsElementPresent(loc);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Logout fron the partner portal.");
                VisitOffice("logout");

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

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

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter iframe name to be searched.");
                integration_IframeAppsHelper.TypeText("SearchTabName", tab);
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on edit icon.");
                integration_IframeAppsHelper.ClickElement("Edit");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify Page title.");
                VerifyTitle("Edit Iframe");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Uncheck the client user check box.");
                integration_IframeAppsHelper.ClickElement("ClientPortal");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on Save button.");
                integration_IframeAppsHelper.ClickElement("Save");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Wait for iframe updation success text.");
                integration_IframeAppsHelper.WaitForText("Iframe updated Successfully.", 10);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Logout from the application.");
                VisitOffice("logout");

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify page title.");
                VerifyTitle("Dashboard");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Wait for locator to be present.");
                integration_IframeAppsHelper.WaitForElementPresent(loc, 10);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify created iframe not present in client user portal.");
                integration_IframeAppsHelper.ElementNotAvailable(loc);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Logout from client user portal.");
                VisitOffice("logout");

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

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

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Verify page title.");
                VerifyTitle("Iframe Apps");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Enter iframe name to  be searched.");
                integration_IframeAppsHelper.TypeText("SearchTabName", tab);
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click on delete button.");
                integration_IframeAppsHelper.ClickElement("ClickOnDelete");

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Click ok to accept alert message.");
                integration_IframeAppsHelper.AcceptAlert();

                executionLog.Log("VerifyOfficeCreatedIframeOnClientUserPage", "Wait for deletion success message.");
                integration_IframeAppsHelper.WaitForText("Iframe deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyOfficeCreatedIframeOnClientUserPage");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Office Created Iframe On Client User Page");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Office Created Iframe On Client User Page", "Bug", "Medium", "Iframe Intergration page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Office Created Iframe On Client User Page");
                        TakeScreenshot("VerifyOfficeCreatedIframeOnClientUserPage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyOfficeCreatedIframeOnClientUserPage.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyOfficeCreatedIframeOnClientUserPage");
                        string id            = loginHelper.getIssueID("Verify Office Created Iframe On Client User Page");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyOfficeCreatedIframeOnClientUserPage.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Office Created Iframe On Client User Page"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Office Created Iframe On Client User Page");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyOfficeCreatedIframeOnClientUserPage");
                executionLog.WriteInExcel("Verify Office Created Iframe On Client User Page", Status, JIRA, "IFrame");
            }
        }
Exemple #24
0
        public void editMeetingValiationForAlphabet()
        {
            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 officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            // Variable
            var    name   = "Subject" + RandomNumber(1, 9999);
            var    email  = "Test" + GetRandomNumber() + "@gmail.com";
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditMeetingValiationForAlphabet", " Go to create meeting page.");
                VisitOffice("meetings/create");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Verify title");
                VerifyTitle("Create a Meeting");

                executionLog.Log("EditMeetingValiationForAlphabet", "Enter Subject");
                officeActivities_MeetingHelper.TypeText("Subject", name);

                executionLog.Log("EditMeetingValiationForAlphabet", "Enter Meeting location");
                officeActivities_MeetingHelper.TypeText("Location", "Test Meeting");

                executionLog.Log("EditMeetingValiationForAlphabet", "Select Priority");
                officeActivities_MeetingHelper.Select("Priority", "Low");

                executionLog.Log("EditMeetingValiationForAlphabet", "select Module");
                officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client");

                executionLog.Log("EditMeetingValiationForAlphabet", "Click on find list icon");
                officeActivities_MeetingHelper.ClickElement("FindListIcon");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Select a client");
                officeActivities_MeetingHelper.ClickElement("SelectedClient");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Enter start date");
                officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Enter an alphabet in end date");
                officeActivities_MeetingHelper.TypeText("EndDate", "07/07/2018");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Click on Save  ");
                officeActivities_MeetingHelper.ClickElement("Save");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("EditMeetingValiationForAlphabet", "Verify alert message for valid date.");
                //GetWebDriver().SwitchTo().Alert();
                string poptxt = GetWebDriver().SwitchTo().Alert().Text;
                Assert.AreEqual("Start Date & Time should lesser than or equal to Due Date & Time.", poptxt);

                //executionLog.Log("EditMeetingValiationForAlphabet", "Verify the field validation");
                //officeActivities_MeetingHelper.VerifyPageText("Enter a valid end date");

                executionLog.Log("EditMeetingValiationForAlphabet", "Verify 500 error not occured.");
                officeActivities_MeetingHelper.VerifyTextNotPresent("500 Internal server error.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            var    name   = "Task" + RandomNumber(111, 999999);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyTaskPriorityOnEdit", "Redirect at Create Task page.");
                VisitOffice("tasks/create");
                officeActivities_TasksHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Verify page title as tasks");
                VerifyTitle("Create a Task");

                executionLog.Log("VerifyTaskPriorityOnEdit", "Enter task Subject");
                officeActivities_TasksHelper.TypeText("Subjuct1", name);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Enter task start date");
                officeActivities_TasksHelper.TypeText("StartDate", "11/11/2017");

                executionLog.Log("VerifyTaskPriorityOnEdit", "Enter task Due date");
                officeActivities_TasksHelper.TypeText("DueDate", "11/11/2017");

                executionLog.Log("VerifyTaskPriorityOnEdit", "Select Priority >> High");
                officeActivities_TasksHelper.SelectByText("SelPriority", "High");

                executionLog.Log("VerifyTaskPriorityOnEdit", "Click on Save button. ");
                officeActivities_TasksHelper.ClickElement("Save");
                officeActivities_TasksHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Wait for creation success message. ");
                officeActivities_TasksHelper.WaitForText("Task saved successfully.", 05);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Enter Subject in Search field");
                officeActivities_TasksHelper.TypeText("EnterSubject", name);
                officeActivities_TasksHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Select All in owner field");
                officeActivities_TasksHelper.SelectByText("OwnerField", "All");
                officeActivities_TasksHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Click on the edit icon.");
                officeActivities_TasksHelper.ClickElement("Edit");
                officeActivities_TasksHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyTaskPriorityOnEdit", "Verify selected priority.");
                officeActivities_TasksHelper.VerifySelectdOptn("SelPriority", "High");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyTaskPriorityOnEdit");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Task Priority On Edit");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Task Priority On Edit", "Bug", "Medium", "Task page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Task Priority On Edit");
                        TakeScreenshot("VerifyTaskPriorityOnEdit");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTaskPriorityOnEdit.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyTaskPriorityOnEdit");
                        string id            = loginHelper.getIssueID("Verify Task Priority On Edit");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyTaskPriorityOnEdit.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Task Priority On Edit"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Task Priority On Edit");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyTaskPriorityOnEdit");
                executionLog.WriteInExcel("Verify Task Priority On Edit", Status, JIRA, "Office Activities");
            }
        }
        public void sendEmailFromActivity()
        {
            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    officeActivities_EmailHelper = new OfficeActivities_EmailsHelper(GetWebDriver());
            var    SendTo = "Test" + RandomNumber(1, 99) + "@yopmail.com";
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("SendEmailFromActivity", "Redirect to URL");
                VisitOffice("mails/compose");
                officeActivities_EmailHelper.WaitForWorkAround(3000);

                executionLog.Log("SendEmailFromActivity", "Enter email in 'To' Field");
                officeActivities_EmailHelper.TypeText("To", SendTo);

                executionLog.Log("SendEmailFromActivity", "Enter CC");
                officeActivities_EmailHelper.TypeText("EnterCCMuliple", "[email protected],[email protected],[email protected]");
                //officeActivities_EmailHelper.WaitForWorkAround(1000);

                executionLog.Log("SendEmailFromActivity", "Enter Subject ");
                officeActivities_EmailHelper.TypeText("Subject", "This is Subject");
                //officeActivities_EmailHelper.WaitForWorkAround(1000);

                executionLog.Log("SendEmailFromActivity", "Click send Button");
                officeActivities_EmailHelper.ClickElement("ClickSendBtn");

                executionLog.Log("SendEmailFromActivity", "Verify Email sent successfully");
                officeActivities_EmailHelper.WaitForText("E-Mail Sent Successfully.", 15);

                executionLog.Log("SendEmailFromActivity", "Redirect to URL");
                VisitOffice("mails/sent");
                officeActivities_EmailHelper.WaitForWorkAround(3000);

                executionLog.Log("SendEmailFromActivity", "Verify page title");
                VerifyTitle("Sent");

                executionLog.Log("SendEmailFromActivity", "Enter Send to in search ");
                officeActivities_EmailHelper.TypeText("SearchMailInput", SendTo);

                executionLog.Log("SendEmailFromActivity", "Click on search btn");
                officeActivities_EmailHelper.ClickElement("SearchBtn");
                officeActivities_EmailHelper.WaitForWorkAround(2000);

                executionLog.Log("SendEmailFromActivity", "Select searched email.");
                officeActivities_EmailHelper.ClickElement("CheckBox1");

                executionLog.Log("SendEmailFromActivity", "Click on delete btn");
                officeActivities_EmailHelper.ClickElement("Delete");
                officeActivities_EmailHelper.WaitForWorkAround(1000);

                executionLog.Log("SendEmailFromActivity", "Verify Email Deleted successfully");
                officeActivities_EmailHelper.WaitForText("E-Mail has been moved to the Recycle Bin.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

            var corp_EmployeeHelper = new Corp_EmployeeHelper(GetWebDriver());

            username1 = oXMLData.getData("settings/Credentials", "username_corp");
            password1 = oXMLData.getData("settings/Credentials", "password2");

            // Variable random
            var    username = "******" + GetRandomNumber();
            var    email    = "Test" + RandomNumber(44, 999) + "@gmail.com";
            var    email2   = "test1" + RandomNumber(1, 99) + "@gmail.com";
            var    phone    = "12345" + RandomNumber(11111, 99999);
            String JIRA     = "";
            String Status   = "Pass";

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

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

                executionLog.Log("EmployeeEadressLabelIssue", "Go to Employee page");
                VisitCorp("employees");

                executionLog.Log("EmployeeEadressLabelIssue", "Verify Page title");
                VerifyTitle("Employees");

                executionLog.Log("EmployeeEadressLabelIssue", "Go to Create employee page");
                VisitCorp("employees/create");

                executionLog.Log("EmployeeEadressLabelIssue", "Verify Page title");
                VerifyTitle("Employees");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter Name");
                corp_EmployeeHelper.TypeText("UserName", username);

                executionLog.Log("EmployeeEadressLabelIssue", "Enter PrimaryEmail");
                corp_EmployeeHelper.TypeText("PrimaryEmail", email);

                executionLog.Log("EmployeeEadressLabelIssue", "Enter Salutation");
                corp_EmployeeHelper.Select("Salutation", "Mr");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter First name");
                corp_EmployeeHelper.TypeText("FirstName", "Test Name");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter Last Name");
                corp_EmployeeHelper.TypeText("LastName", "Test LastName");

                executionLog.Log("EmployeeEadressLabelIssue", "  Click Corporate Admin Avatar");
                corp_EmployeeHelper.ClickElement("AvtarCorporateAdmin");

                executionLog.Log("EmployeeEadressLabelIssue", "Select Phone Country");
                corp_EmployeeHelper.Select("PhoneSelectCountry", "1");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter PhoneNumber");
                corp_EmployeeHelper.TypeText("PhoneNumber", "9898398438");

                executionLog.Log("EmployeeEadressLabelIssue", "Select Primary Phone Number");
                corp_EmployeeHelper.ClickElement("PrimaryPhoneRadio");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter eAddress");
                corp_EmployeeHelper.TypeText("eAddress", email2);

                executionLog.Log("EmployeeEadressLabelIssue", "Select Primary Email");
                corp_EmployeeHelper.ClickElement("PrimaryEmailRadio");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter AddressLine1");
                corp_EmployeeHelper.TypeText("AddressLine1", "F-TEST");

                executionLog.Log("EmployeeEadressLabelIssue", "Enter ZipCode");
                corp_EmployeeHelper.TypeText("ZipCode", "60601");

                executionLog.Log("EmployeeEadressLabelIssue", "CliCK On Save button");
                corp_EmployeeHelper.ClickElement("Save");

                executionLog.Log("EmployeeEadressLabelIssue", "Wait for confirmation.");
                corp_EmployeeHelper.WaitForText("Employee Created Successfully.", 10);

                executionLog.Log("EmployeeEadressLabelIssue", "Search created employee by email.");
                corp_EmployeeHelper.TypeText("searchEmail", email);
                corp_EmployeeHelper.WaitForWorkAround(3000);

                executionLog.Log("EmployeeEadressLabelIssue", "Click on edit icon");
                corp_EmployeeHelper.ClickElement("ClickOnEdit");
                corp_EmployeeHelper.WaitForWorkAround(3000);

                executionLog.Log("EmployeeEadressLabelIssue", "Wait for locator to present.");
                corp_EmployeeHelper.WaitForElementPresent("EAddressType2", 10);

                executionLog.Log("EmployeeEadressLabelIssue", "Change eaddress type for second email.");
                corp_EmployeeHelper.Select("EAddressType2", "Social Media");
                corp_EmployeeHelper.WaitForWorkAround(3000);

                executionLog.Log("EmployeeEadressLabelIssue", "Verify first email label not changed.");
                corp_EmployeeHelper.VerifyText("EAddressLabel1", "Work");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EmployeeEadressLabelIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Employee Eadress Label Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Employee Eadress Label Issue", "Bug", "Medium", "Corp Employee page", "QA", "Log in as: " + username1[0] + " / " + password1[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Employee Eadress Label Issue");
                        TakeScreenshot("EmployeeEadressLabelIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EmployeeEadressLabelIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EmployeeEadressLabelIssue");
                        string id            = loginHelper.getIssueID("Employee Eadress Label Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EmployeeEadressLabelIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Employee Eadress Label Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Employee Eadress Label Issue");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EmployeeEadressLabelIssue");
                executionLog.WriteInExcel("Employee Eadress Label Issue", Status, JIRA, "Corp Employee");
            }
        }
        public void customColumnsLead()
        {
            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 listManagementHelper = new ListManagementHelper(GetWebDriver());

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

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

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

                executionLog.Log("CustomColumnsLead", "Redirect To List Management page");
                listManagementHelper.ClickElement("Marketing");
                listManagementHelper.WaitForWorkAround(4000);

                executionLog.Log("CustomColumnsLead", "Redirect To List Management page");
                GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/en/listmanagements/leads");
                listManagementHelper.WaitForWorkAround(2000);

                executionLog.Log("CustomColumnsLead", "Click on Settings icon");
                listManagementHelper.ClickForce("SettingIcon");
                listManagementHelper.WaitForWorkAround(2000);

                executionLog.Log("CustomColumnsLead", "Click on Search Box");
                listManagementHelper.TypeText("SearchBox", "Account Manager");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Plus icon");
                listManagementHelper.ClickElement("PlusIcon");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Clear Search Field value");
                listManagementHelper.ClearTextBoxValue("//input[@id='searchHeaderColumns']");

                executionLog.Log("CustomColumnsLead", "Click on Apply Button");
                listManagementHelper.ClickForce("Apply");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Settings icon");
                listManagementHelper.ClickForce("SettingIcon");
                listManagementHelper.WaitForWorkAround(2000);

                executionLog.Log("CustomColumnsLead", "Click on Search Box");
                listManagementHelper.TypeText("SearchBox", "Category");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Plus icon");
                listManagementHelper.ClickElement("PlusIcon2");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Cancel button");
                listManagementHelper.ClickElement("Cancel");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Settings icon");
                listManagementHelper.ClickForce("SettingIcon");
                listManagementHelper.WaitForWorkAround(2000);

                executionLog.Log("CustomColumnsLead", "Click on Search Box");
                listManagementHelper.TypeText("SearchBox", "Category");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("CustomColumnsLead", "Click on Search Box");
                listManagementHelper.VerifyTextAvailable("Category");
                listManagementHelper.WaitForWorkAround(1000);
                Console.WriteLine("Field Is Not Saved");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver());
            var office_LeadsHelper         = new Office_LeadsHelper(GetWebDriver());
            var office_ClientsHelper       = new Office_ClientsHelper(GetWebDriver());

            String JIRA   = "";
            String Status = "Pass";
            var    DBA    = "DBA" + GetRandomNumber();



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

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

                executionLog.Log("ZipCodeError", "Go to Create Opportunity page");
                VisitOffice("opportunities/create");

                executionLog.Log("ZipCodeError", "Verify title");
                VerifyTitle("Create an Opportunity");

                executionLog.Log("ZipCodeError", "Enter zip code");
                office_OpportunitiesHelper.TypeText("ZipCode", "60601");

                executionLog.Log("ZipCodeError", "Click On anywhere");
                office_OpportunitiesHelper.ClickElement("V");


                executionLog.Log("ZipCodeError", "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("ZipCodeError");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Zip Code Error");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Zip Code Error", "Bug", "Medium", "Client/Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Zip Code Error");
                        TakeScreenshot("ZipCodeError");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ZipCodeError.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ZipCodeError");
                        string id            = loginHelper.getIssueID("Zip Code Error");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ZipCodeError.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Zip Code Error"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Zip Code Error");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ZipCodeError");
                executionLog.WriteInExcel("Zip Code Error", Status, JIRA, "Leads/Clients Management");
            }
        }
        public void merchantZipCodeNullIssue()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog        = new ExecutionLog();
            var loginHelper         = new LoginHelper(GetWebDriver());
            var corp_MerchantHelper = new Corp_MerchantHelper(GetWebDriver());


            // Variable
            var    FirstName = "Test" + GetRandomNumber();
            var    LastName  = "Tester" + GetRandomNumber();
            var    Number    = "12345678" + GetRandomNumber();
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("MerchantZipCodeNullIssue", "Goto merchants page.");
                VisitCorp("merchants");

                executionLog.Log("MerchantZipCodeNullIssue", "Click on advance filter.");
                corp_MerchantHelper.ClickElement("AdvanceFilter");
                corp_MerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("MerchantZipCodeNullIssue", "Select Zip Code from available column.");
                corp_MerchantHelper.Select("AvailableColumn", "client_details.pcZip");
                corp_MerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("MerchantZipCodeNullIssue", "Move zip code to displayed column.");
                corp_MerchantHelper.ClickElement("ArrowLeft");

                executionLog.Log("MerchantZipCodeNullIssue", "Click on apply button.");
                corp_MerchantHelper.ClickElement("Apply");

                executionLog.Log("MerchantZipCodeNullIssue", "Wait for locator to be present.");
                corp_MerchantHelper.WaitForElementPresent("ZipText", 10);

                executionLog.Log("MerchantZipCodeNullIssue", "Enter postal code in zip code.");
                corp_MerchantHelper.VerifyText("VerifyZipCode", "Zip Code");
                corp_MerchantHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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