Exemple #1
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");
            }
        }
Exemple #2
0
        public void verifyingClientConvertedByCredits()
        {
            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());
            var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver());

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

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

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

                executionLog.Log("VerifyingClientConvertedByCredits", "Redirect To create lead page");
                VisitOffice("leads/create");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Enter Company Nmae");
                office_LeadsHelper.TypeText("CompanyName", Company);

                executionLog.Log("VerifyingClientConvertedByCredits", "Enter First Name ");
                office_LeadsHelper.TypeText("FirstNameLead", "Test Lead");

                executionLog.Log("VerifyingClientConvertedByCredits", "EnterLastName");
                office_LeadsHelper.TypeText("LastName", "Tester");

                executionLog.Log("VerifyingClientConvertedByCredits", "Select Lead Status");
                office_LeadsHelper.SelectByText("LeadStatus", "New");

                executionLog.Log("VerifyingClientConvertedByCredits", "LeadResponsibility");
                office_LeadsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("VerifyingClientConvertedByCredits", "Click on Save");
                office_LeadsHelper.ClickElement("Save");
                office_LeadsHelper.WaitForWorkAround(3000);

                var LocDub = "//button[text()='Create Duplicate']";
                if (office_LeadsHelper.IsElementPresent(LocDub))
                {
                    office_LeadsHelper.Click(LocDub);
                }

                executionLog.Log("VerifyingClientConvertedByCredits", "Click on Convert");
                office_LeadsHelper.ClickElement("ClickConvert");

                executionLog.Log("VerifyingClientConvertedByCredits", "Yes Move To Recycle Bin");
                office_LeadsHelper.ClickElement("ClickYes");

                executionLog.Log("VerifyingClientConvertedByCredits", "Click Convert Save Lead");
                office_LeadsHelper.ClickElement("ConvertSaveLead");
                office_LeadsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Verify  messge");
                office_LeadsHelper.VerifyPageText("Lead is converted and moved to recyclebin.");
                office_LeadsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Verify  messge");
                office_ClientsHelper.VerifyText("ConvertedBy", "Howard Tang");
                //office_ClientsHelper.WaitForWorkAround(4000);

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

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

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

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

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

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

                executionLog.Log("VerifyingClientConvertedByCredits", "Redirect To leads recycle bin page. ");
                VisitOffice("leads/recyclebin");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Enter Company Name");
                office_LeadsHelper.TypeText("SearchLeadRbin", Company);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Select 'All' in responsibilty field");
                office_LeadsHelper.SelectByText("SelectResponsibiltiy", "All");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyingClientConvertedByCredits", "Click on delete leads");
                office_LeadsHelper.ClickElement("DeleteRbin");

                executionLog.Log("VerifyingClientConvertedByCredits", "Accept alert message.");
                office_LeadsHelper.AcceptAlert();

                executionLog.Log("VerifyingClientConvertedByCredits", "Wait for success message.");
                office_LeadsHelper.WaitForText("Lead Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyingClientConvertedByCredits");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verifying Client Converted By Credits");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verifying Client Converted By Credits", "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("Verifying Client Converted By Credits");
                        TakeScreenshot("VerifyingClientConvertedByCredits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingClientConvertedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyingClientConvertedByCredits");
                        string id            = loginHelper.getIssueID("Verifying Client Converted By Credits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingClientConvertedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verifying Client Converted By Credits"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verifying Client Converted By Credits");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyingClientConvertedByCredits");
                executionLog.WriteInExcel("Verifying Client Converted By Credits", Status, JIRA, "Leads Management");
            }
        }
        public void officeUsersAdvanceFilterResultsPP()
        {
            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_UserHelper = new Office_UserHelper(GetWebDriver());

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

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

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

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Redirect at employee page.");
                VisitOffice("users");
                office_UserHelper.WaitForWorkAround(3000);

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Click on advance filter.");
                office_UserHelper.ClickElement("AdvanceFilter");
                office_UserHelper.WaitForWorkAround(2000);

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

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Click on Apply button.");
                office_UserHelper.ClickElement("Apply");
                office_UserHelper.WaitForWorkAround(3000);


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

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

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

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Click on Apply button.");
                office_UserHelper.ClickElement("Apply");
                office_UserHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Click on Apply button.");
                office_UserHelper.ClickElement("Apply");
                office_UserHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("OfficeUsersAdvanceFilterResultsPP", "Click on Apply button.");
                office_UserHelper.ClickElement("Apply");
                office_UserHelper.WaitForWorkAround(3000);

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

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

            // Variables
            var    Picklist = "Pick" + GetRandomNumber();
            String JIRA     = "";
            String Status   = "Pass";

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

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

                executionLog.Log("CreatePickList", "Go to picklist page");
                VisitOffice("pick-lists");

                executionLog.Log("CreatePickList", "Verify title");
                VerifyTitle("Picklists");

                executionLog.Log("CreatePickList", " Open the first picklist");
                system_PicklistsHelper.ClickElement("PickList1");

                for (int i = 1; i < 20; i++)
                {
                    var loc = "//table[@class='table table-bordered']//tr[" + i + "]//td[1]/span";

                    if (loc.Contains("Personal"))
                    {
                        executionLog.Log("CreatePickList", "Click on Add button");
                        system_PicklistsHelper.ClickElement("AddPick");
                        system_PicklistsHelper.WaitForWorkAround(2000);

                        executionLog.Log("CreatePickList", "Enter name");
                        system_PicklistsHelper.TypeText("PickType", Picklist);

                        executionLog.Log("CreatePickList", "Click on Save button");
                        system_PicklistsHelper.ClickElement("SavePicklist");

                        executionLog.Log("CreatePickList", "Click on Cancel");
                        system_PicklistsHelper.ClickElement("Cancel");
                        system_PicklistsHelper.WaitForWorkAround(4000);

                        executionLog.Log("CreatePickList", "Verfiy Text");
                        system_PicklistsHelper.VerifyPageText(Picklist);

                        executionLog.Log("CreatePickList", "Click delete Button");
                        system_PicklistsHelper.ClickElement("DeletePick");
                        system_PicklistsHelper.WaitForWorkAround(3000);

                        executionLog.Log("CreatePickList", "Click on item to deleted");
                        system_PicklistsHelper.DeletePickList(Picklist);
                        system_PicklistsHelper.WaitForWorkAround(3000);

                        executionLog.Log("CreatePickList", "Selelct replace with item.");
                        system_PicklistsHelper.SelectText("ReplacePiclist", "Personal");

                        executionLog.Log("CreatePickList", "Click PickList Save Button");
                        system_PicklistsHelper.ClickElement("PickListSaveBtn");

                        executionLog.Log("CreatePickList", "Accept alert message.");
                        system_PicklistsHelper.AcceptAlert();
                        system_PicklistsHelper.WaitForWorkAround(4000);
                        break;
                    }
                    else
                    {
                        executionLog.Log("CreatePickList", " Open the first picklist");
                        //  system_PicklistsHelper.ClickElement("PickList1");

                        executionLog.Log("CreatePickList", "Click on Add button");
                        system_PicklistsHelper.ClickElement("AddPick");
                        system_PicklistsHelper.WaitForWorkAround(2000);

                        executionLog.Log("CreatePickList", "Enter name");
                        system_PicklistsHelper.TypeText("PickType", "Personal");

                        executionLog.Log("CreatePickList", "Click on Save button");
                        system_PicklistsHelper.ClickElement("SavePicklist");
                        system_PicklistsHelper.WaitForWorkAround(5000);

                        executionLog.Log("CreatePickList", "Click on Cancel button");
                        system_PicklistsHelper.ClickJs("Cancel");

                        executionLog.Log("CreatePickList", "Click on Add button");
                        system_PicklistsHelper.ClickElement("AddPick");
                        system_PicklistsHelper.WaitForWorkAround(2000);

                        executionLog.Log("CreatePickList", "Enter name");
                        system_PicklistsHelper.TypeText("PickType", Picklist);

                        executionLog.Log("CreatePickList", "Click on Save button");
                        system_PicklistsHelper.ClickElement("SavePicklist");

                        executionLog.Log("CreatePickList", "Click on Cancel");
                        system_PicklistsHelper.ClickElement("Cancel");
                        system_PicklistsHelper.WaitForWorkAround(4000);

                        executionLog.Log("CreatePickList", "Click delete Button");
                        system_PicklistsHelper.ClickElement("DeletePick");
                        system_PicklistsHelper.WaitForWorkAround(3000);

                        executionLog.Log("CreatePickList", "Click on item to deleted");
                        system_PicklistsHelper.DeletePickList(Picklist);
                        system_PicklistsHelper.WaitForWorkAround(3000);

                        executionLog.Log("CreatePickList", "Selelct replace with item.");
                        system_PicklistsHelper.SelectText("ReplacePiclist", "Personal");

                        executionLog.Log("CreatePickList", "Click PickList Save Button");
                        system_PicklistsHelper.ClickElement("PickListSaveBtn");

                        executionLog.Log("CreatePickList", "Accept alert message.");
                        system_PicklistsHelper.AcceptAlert();
                        system_PicklistsHelper.WaitForWorkAround(4000);
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("OpportunityLabelAgentBlankSave", "Redirect at opportunities page.");
                VisitOffice("opportunities");

                executionLog.Log("OpportunityLabelAgentBlankSave", "Click on any Opportunity");
                office_OpportunitiesHelper.ClickElement("Opportunities1");

                executionLog.Log("OpportunityLabelAgentBlankSave", "Click to add partner agent");
                office_OpportunitiesHelper.DoubleClick("//*[@id='partner']");
                office_OpportunitiesHelper.WaitForWorkAround(1000);

                executionLog.Log("OpportunityLabelAgentBlankSave", "Click on save");
                office_OpportunitiesHelper.ClickElement("SaveQuicklook");

                executionLog.Log("OpportunityLabelAgentBlankSave", "Verify label for Partner Agent");
                office_OpportunitiesHelper.VerifyText("VerifyLabel", "Select");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

            // Variable
            var    name   = RandomNumber(1, 999).ToString();
            var    code   = "1" + RandomNumber(1, 99);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Redirect To URL");
                VisitCorp("masterdata/omaha_auth_grids");
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Verify Page title");
                VerifyTitle("Corporate Master Omaha Auth Grids");

                executionLog.Log("EditAndDeleteOmahaAuthGrid", " Click On Create");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("Create");
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Grid Id");
                corpMasterdata_OmahaAuthGridHelper.TypeText("GridId", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Visa Pos Authfees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("VisaPosAuthfees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter MC Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("MCPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Amex Pos AuthFees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("AmexPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Disc Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("DiscPosAuthFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter JCD Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("JCDPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Voice Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("VoiceAuthFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter AVS Electronic Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("AVSElectronicFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter AVS Voice Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("AVSVoiveFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter AVS Voive Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("ARUFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "  Click on Save button");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("Save");

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Verify Page Text");
                corpMasterdata_OmahaAuthGridHelper.WaitForText("Master Omaha Auth Grid Created Successfully.", 10);
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(4000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Search GripIdSrch");
                corpMasterdata_OmahaAuthGridHelper.TypeText("GridIdSearch", name);
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Click on  Edit");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("ClickEditAuth");
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Grid Id");
                corpMasterdata_OmahaAuthGridHelper.TypeText("GridId", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Visa Pos Authfees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("VisaPosAuthfees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter MC Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("MCPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Amex Pos AuthFees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("AmexPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Disc Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("DiscPosAuthFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter JCD Pos Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("JCDPosAuthFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter Voice Auth Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("VoiceAuthFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter AVS Voice Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("AVSVoiveFees", code);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Enter AVS Voive Fees");
                corpMasterdata_OmahaAuthGridHelper.TypeText("ARUFees", name);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "  Click on Save button");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("SaveEditAuth");

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Verify Corporate Master Omaha Auth Grid Updated Successfully.");
                corpMasterdata_OmahaAuthGridHelper.WaitForText("Master Omaha Auth Grid Updated Successfully.", 10);
                corpMasterdata_OmahaAuthGridHelper.WaitForWorkAround(4000);

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Click on delete");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("ClickOnDelete");

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Accept Alert");
                corpMasterdata_OmahaAuthGridHelper.AcceptAlert();

                executionLog.Log("EditAndDeleteOmahaAuthGrid", "Verify Corporate Master Omaha Auth Grid Deleted Successfully.");
                corpMasterdata_OmahaAuthGridHelper.WaitForText("Corporate Master Omaha Auth Grid Deleted Successfully.", 30);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditAndDeleteOmahaAuthGrid");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit And Delete Omaha Auth Grid");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Edit And Delete Omaha Auth Grid", "Bug", "Medium", "Omaha Auth Grid page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit And Delete Omaha Auth Grid");
                        TakeScreenshot("EditAndDeleteOmahaAuthGrid");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditAndDeleteOmahaAuthGrid.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditAndDeleteOmahaAuthGrid");
                        string id            = loginHelper.getIssueID("Edit And Delete Omaha Auth Grid");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditAndDeleteOmahaAuthGrid.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit And Delete Omaha Auth Grid"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit And Delete Omaha Auth Grid");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditAndDeleteOmahaAuthGrid");
                executionLog.WriteInExcel("Edit And Delete Omaha Auth Grid", Status, JIRA, "Corp Master Data");
            }
        }
Exemple #7
0
        public void leadsAdvanceFilterActivities()
        {
            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    DocName = "Test Exe" + GetRandomNumber();
            var    fileUpl = GetPathToFile() + "chrome.exe";
            String JIRA    = "";
            String Status  = "Pass";

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

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


                // Verify leads with notes.

                executionLog.Log("LeadsAdvanceFilterActivities", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify page title.");
                VerifyTitle("Leads");

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on advance filter.");
                office_LeadsHelper.ClickForce("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on show activiities button.");
                office_LeadsHelper.ClickForce("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Selct leads activity type.");
                office_LeadsHelper.ClickForce("LeadWithNote");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on apply button.");
                office_LeadsHelper.ClickForce("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on any leads.");
                office_LeadsHelper.ClickForce("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Select actitivity type as notes.");
                office_LeadsHelper.SelectByText("SelectActivityType", "Notes");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify notes present for leads.");
                //office_LeadsHelper.IsElementVisible("LeadNotees.");


                // Verify leads with Open meetings.

                executionLog.Log("LeadsAdvanceFilterActivities", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify page title.");
                VerifyTitle("Leads");

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on advance filter.");
                office_LeadsHelper.ClickForce("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on show activiities button.");
                office_LeadsHelper.ClickForce("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Selct leads activity type.");
                office_LeadsHelper.ClickForce("LeadOpenMeet");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on apply button.");
                office_LeadsHelper.ClickForce("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on any leads.");
                office_LeadsHelper.ClickForce("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Select actitivity type as meetings.");
                office_LeadsHelper.SelectByText("SelectActivityType", "Meetings");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify meeting present for leads.");
                //office_LeadsHelper.IsElementVisible("LeadsMeetings.");


                // Verify leads with Open tasks.

                executionLog.Log("LeadsAdvanceFilterActivities", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify page title.");
                VerifyTitle("Leads");

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on advance filter.");
                office_LeadsHelper.ClickForce("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on show activiities button.");
                office_LeadsHelper.ClickForce("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Selct leads activity type.");
                office_LeadsHelper.ClickForce("LeadsWithOpenTaks");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on apply button.");
                office_LeadsHelper.ClickForce("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on any leads.");
                office_LeadsHelper.ClickForce("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Select actitivity type as tasks.");
                office_LeadsHelper.SelectByText("SelectActivityType", "Tasks");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify task present for leads.");
                //  office_LeadsHelper.IsElementVisible("LeadsTasks.");


                // Verify leads with documents.

                executionLog.Log("LeadsAdvanceFilterActivities", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify page title.");
                VerifyTitle("Leads");

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on advance filter.");
                office_LeadsHelper.ClickForce("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on show activiities button.");
                office_LeadsHelper.ClickForce("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Selct leads activity type.");
                office_LeadsHelper.ClickForce("LeadsWithDocs");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on apply button.");
                office_LeadsHelper.ClickForce("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on any leads.");
                office_LeadsHelper.ClickForce("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Select actitivity type as documents.");
                office_LeadsHelper.SelectByText("SelectActivityType", "Documents");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify document present for lead.");
                // office_LeadsHelper.IsElementVisible("LeadsDOcs.");


                // Verify leads with E-Mails.

                executionLog.Log("LeadsAdvanceFilterActivities", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify page title.");
                VerifyTitle("Leads");

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on advance filter.");
                office_LeadsHelper.ClickForce("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on show activiities button.");
                office_LeadsHelper.ClickForce("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Selct leads activity type.");
                office_LeadsHelper.ClickForce("LeadsWithEmails");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on apply button.");
                office_LeadsHelper.ClickForce("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Click on any lead.");
                office_LeadsHelper.ClickForce("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Select actitivity type as emails.");
                office_LeadsHelper.SelectByText("SelectActivityType", "E-Mails");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsAdvanceFilterActivities", "Verify email present for leads.");
                // office_LeadsHelper.IsElementVisible("LEadsEmails.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerifySuccessMessage", "Go to Import Leads page");
                VisitOffice("leads/import");

                executionLog.Log("VerifySuccessMessage", "Verify title");
                VerifyTitle("Leads");

                string file = GetPathToFile() + "leadslist.csv";
                executionLog.Log("VerifySuccessMessage", "Uplaod file");
                office_LeadsHelper.UploadFile("//*[@id='vcard_file']", file);

                executionLog.Log("VerifySuccessMessage", "Click on Import button");
                office_LeadsHelper.ClickElement("LeadImport");

                executionLog.Log("VerifySuccessMessage", "Verify success message");
                office_LeadsHelper.WaitForText("Records Imported Successfully.", 10);

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifySuccessMessage");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Success Message");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Success Message", "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("Verify Success Message");
                        TakeScreenshot("VerifySuccessMessage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifySuccessMessage.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifySuccessMessage");
                        string id            = loginHelper.getIssueID("Verify Success Message");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifySuccessMessage.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Success Message"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Success Message");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifySuccessMessage");
                executionLog.WriteInExcel("Verify Success Message", Status, JIRA, "Leads Management");
            }
        }
        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");
            }
        }
Exemple #17
0
        public void verifyLabelForContactVcard()
        {
            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 office_ContactsHelper = new Office_ContactsHelper(GetWebDriver());

            // Random variables
            var    File   = GetPathToFile() + "leadsamples.csv";
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyLabelForContactVcard", "Redirect at contacts page.");
                VisitOffice("contacts");

                executionLog.Log("VerifyLabelForContactVcard", "Verify page title as contacts.");
                VerifyTitle("Contacts");

                executionLog.Log("VerifyLabelForContactVcard", "Click on any contact.");
                office_ContactsHelper.ClickElement("Contact1");

                executionLog.Log("VerifyLabelForContactVcard", "Verify Download as vcard label present on the page..");
                office_ContactsHelper.IsElementPresent("VcardDownload");

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

            // VARIABLE
            var    Group  = "Group" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditGroupIssue", "Redirect  to Group page");
                VisitOffice("groups");

                executionLog.Log("EditGroupIssue", "Verify Page title");
                VerifyTitle("Groups");

                executionLog.Log("EditGroupIssue", "Click on Create button");
                office_GroupHelper.ClickElement("Create");

                executionLog.Log("EditGroupIssue", "Verify Page title");
                VerifyTitle("Create a Group");

                executionLog.Log("EditGroupIssue", "Enter Group name");
                office_GroupHelper.TypeText("Name", Group);

                executionLog.Log("EditGroupIssue", "Click on Save button");
                office_GroupHelper.ClickElement("Save");

                executionLog.Log("EditGroupIssue", "Verify Page title");
                VerifyTitle("Group Details");

                executionLog.Log("EditGroupIssue", "Click on Edit button");
                office_GroupHelper.ClickElement("GroupEdit");

                executionLog.Log("EditGroupIssue", "Verify Page title");
                VerifyTitle("Groups");

                executionLog.Log("EditGroupIssue", "Remove group name");
                office_GroupHelper.removeText("Name");

                executionLog.Log("EditGroupIssue", "Click on Save button");
                office_GroupHelper.ClickElement("SaveBtnAdjustmnet");

                executionLog.Log("EditGroupIssue", "Verify User is not able to save group without name");
                office_GroupHelper.verifyElementVisible("GroupNameError");

                executionLog.Log("EditGroupIssue", "Redirect To Group page");
                VisitOffice("groups");

                executionLog.Log("EditGroupIssue", "Verify title");
                VerifyTitle("Groups");

                executionLog.Log("EditGroupIssue", "Enter Name to search");
                office_GroupHelper.TypeText("SearchName", Group);
                office_GroupHelper.WaitForWorkAround(2000);

                executionLog.Log("EditGroupIssue", "cLICK Delete btn  ");
                office_GroupHelper.ClickElement("DeleteIcon");

                executionLog.Log("EditGroupIssue", "Accept alert message. ");
                office_GroupHelper.AcceptAlert();

                executionLog.Log("EditGroupIssue", "Wait for delete message. ");
                office_GroupHelper.WaitForText("Group Deleted Successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditGroupIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit Group Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Edit Group Issue", "Bug", "Medium", "Group page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit Group Issue");
                        TakeScreenshot("EditGroupIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditGroupIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditGroupIssue");
                        string id            = loginHelper.getIssueID("Edit Group Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditGroupIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit Group Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit Group Issue");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditGroupIssue");
                executionLog.WriteInExcel("Edit Group Issue", Status, JIRA, "Office Admin");
            }
        }
        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 contactUrlChange()
        {
            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("ContactUrlChange", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

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

                executionLog.Log("ContactUrlChange", "Goto User contacts");
                VisitOffice("contacts");

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

                executionLog.Log("ContactUrlChange", "Change the url with the url number of another office");
                VisitOffice("contacts/edit/97031");
                contact_Helper.WaitForWorkAround(2000);

                executionLog.Log("ContactUrlChange", "Verify Validation");
                contact_Helper.VerifyPageText("You don't have privileges to edit this Contact.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ContactUrlChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Contact Url Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Contact Url Change", "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("Contact Url Change");
                        TakeScreenshot("ContactUrlChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ContactUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ContactUrlChange");
                        string id            = loginHelper.getIssueID("Contact Url Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ContactUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Contact Url Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Contact Url Change");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ContactUrlChange");
                executionLog.WriteInExcel("Contact Url Change", Status, JIRA, "Office contacts");
            }
        }
Exemple #22
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");
            }
        }
        public void mergeContactSelectandCancel()
        {
            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 office_ContactsHelper = new Office_ContactsHelper(GetWebDriver());


            // Random Variables
            var    File   = GetPathToFile() + "contactsamples.csv";
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("MergeContactSelectandCancel", "Redirect at import contacts page.");
                VisitOffice("contacts/import");

                executionLog.Log("MergeContactSelectandCancel", "Upload a csv file");
                office_ContactsHelper.Upload("UploadFile", File);

                executionLog.Log("MergeContactSelectandCancel", "Click on import button. ");
                office_ContactsHelper.ClickElement("ImportBtn");
                office_ContactsHelper.WaitForWorkAround(1000);

                executionLog.Log("MergeContactSelectandCancel", "Select a primary contact");
                office_ContactsHelper.ClickElement("MergeRadio");

                executionLog.Log("MergeContactSelectandCancel", "Scroll to merge button");
                office_ContactsHelper.ScrollDown("//a[@title='Merge']");

                executionLog.Log("MergeContactSelectandCancel", "Click on merge button.");
                office_ContactsHelper.ClickElement("ClickOnMergeBtn");
                office_ContactsHelper.WaitForWorkAround(3000);

                executionLog.Log("MergeContactSelectandCancel", "Click on cancel to decline alert");
                office_ContactsHelper.DeclineAlert();

                executionLog.Log("MergeContactSelectandCancel", "Click on merge button.");
                office_ContactsHelper.ClickElement("ClickOnMergeBtn");
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("MergeContactSelectandCancel");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Merge Contact Select and Cancel");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Merge Contact Select and Cancel", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Merge Contact Select and Cancel");
                        TakeScreenshot("MergeContactSelectandCancel");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MergeContactSelectandCancel.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("MergeContactSelectandCancel");
                        string id            = loginHelper.getIssueID("Merge Contact Select and Cancel");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MergeContactSelectandCancel.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Merge Contact Select and Cancel"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Merge Contact Select and Cancel");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("MergeContactSelectandCancel");
                executionLog.WriteInExcel("Merge Contact Select and Cancel", Status, JIRA, "Contact 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 saveLocation()
        {
            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_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());
            int rand = RandomNumber(10, 1000);



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

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

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

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

                executionLog.Log("SaveLocation", "Click on Company detials");
                office_ClientsHelper.ClickElement("CompanyDetails");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaveLocation", "Enter the Dba name");
                office_ClientsHelper.TypeText("ClientDBAName", "test@001");

                executionLog.Log("SaveLocation", "Enter the ferderal tax id");
                office_ClientsHelper.TypeText("FederalTaxID", "776666533");

                executionLog.Log("SaveLocation", "CLick on Save button");
                office_ClientsHelper.ClickElement("CDSave");

                executionLog.Log("SaveLocation", "Wait for text");
                office_ClientsHelper.WaitForText("Client data updated successfully.", 10);

                executionLog.Log("SaveLocation", "Go to Client page");
                VisitOffice("clients");

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

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

                executionLog.Log("SaveLocation", "Click on Company detials");
                office_ClientsHelper.ClickElement("CompanyDetails");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("SaveLocation", "Verify the text");
                office_ClientsHelper.VerifyPageText("More Company Details");

                executionLog.Log("SaveLocation", "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("SaveLocation");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Save Location");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Save Location", "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("Save Location");
                        TakeScreenshot("SaveLocation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SaveLocation.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("SaveLocation");
                        string id            = loginHelper.getIssueID("Save Location");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SaveLocation.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Save Location"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Save Location");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("SaveLocation");
                executionLog.WriteInExcel("Save Location", Status, JIRA, "Client Management");
            }
        }
Exemple #26
0
        public void verifyDurationOfTaskOnCorporateDetailsPage()
        {
            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 officeAdmin_CorporateHelper = new OfficeAdmin_CorporateHelper(GetWebDriver());

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

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

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

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Redirect at My Corporate Details page");
                VisitOffice("mycorp");
                officeAdmin_CorporateHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Click on New Task");
                officeAdmin_CorporateHelper.ClickElement("NewTask");
                officeAdmin_CorporateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Enter task Subject");
                officeAdmin_CorporateHelper.TypeText("TaskSub", name);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Enter task start date");
                officeAdmin_CorporateHelper.TypeText("TaskStartDate", "2017-11-11");
                officeAdmin_CorporateHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Enter task Due date");
                officeAdmin_CorporateHelper.TypeText("TaskDueDate", "2017-11-11");
                officeAdmin_CorporateHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Click on Save button. ");
                officeAdmin_CorporateHelper.ClickElement("TaskSave");
                officeAdmin_CorporateHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Select Activity Type >> Tasks");
                officeAdmin_CorporateHelper.SelectByText("ActivityType", "Tasks");
                officeAdmin_CorporateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Search task.");
                officeAdmin_CorporateHelper.TypeText("SearchActivity", name);
                officeAdmin_CorporateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Open first task");
                officeAdmin_CorporateHelper.ClickElement("Activity1");
                officeAdmin_CorporateHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDurationOfTaskOnCorporateDetailsPage", "Verify Duration is displayed");
                officeAdmin_CorporateHelper.VerifyPageText("Duration");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyDurationOfTaskOnCorporateDetailsPage");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Duration Of Task On Corporate Details Page");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Duration Of Task On Corporate Details Page", "Bug", "Medium", "Corporate Details page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Duration Of Task On Corporate Details Page");
                        TakeScreenshot("VerifyDurationOfTaskOnCorporateDetailsPage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDurationOfTaskOnCorporateDetailsPage.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyDurationOfTaskOnCorporateDetailsPage");
                        string id            = loginHelper.getIssueID("Verify Duration Of Task On Corporate Details Page");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDurationOfTaskOnCorporateDetailsPage.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Duration Of Task On Corporate Details Page"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Duration Of Task On Corporate Details Page");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyDurationOfTaskOnCorporateDetailsPage");
                executionLog.WriteInExcel("Verify Duration Of Task On Corporate Details Page", Status, JIRA, "Corporate Details");
            }
        }
        public void createClientTabsMasterData()
        {
            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 office_FieldDictionary_TabsHelper = new Office_FieldDictionary_TabsHelper(GetWebDriver());
            var office_ClientHelper = new Office_ClientsHelper(GetWebDriver());

            //Variable
            var    name   = "Test" + GetRandomNumber();
            var    num    = "Test" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

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

                executionLog.Log("CreateClientTabsMasterData", "Redirect To URL");
                VisitOffice("tabs");

                executionLog.Log("CreateClientTabsMasterData", "Verify title");
                VerifyTitle("Tabs Management");

                executionLog.Log("CreateClientTabsMasterData", "Select lead");
                office_FieldDictionary_TabsHelper.Select("TabsIn", "20");

                executionLog.Log("CreateClientTabsMasterData", "Click Create Btn");
                office_FieldDictionary_TabsHelper.ClickElement("Create");
                office_FieldDictionary_TabsHelper.WaitForWorkAround(1000);

                executionLog.Log("CreateClientTabsMasterData", "Enter Name");
                office_FieldDictionary_TabsHelper.TypeText("Name", name);

                executionLog.Log("CreateClientTabsMasterData", "Click on save button");
                office_FieldDictionary_TabsHelper.ClickElement("Save");

                executionLog.Log("CreateClientTabsMasterData", "Wait for text");
                office_FieldDictionary_TabsHelper.WaitForText("Tab Created Successfully", 30);

                executionLog.Log("CreateClientTabsMasterData", "Click On  Admin");
                VisitOffice("clients");

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

                executionLog.Log("CreateClientTabsMasterData", "Click On Any Client");
                office_ClientHelper.ClickElement("Client1");

                executionLog.Log("CreateClientTabsMasterData", "Verify title");
                VerifyTitle("- Details");

                executionLog.Log("CreateClientTabsMasterData", "Verify text present");
                office_FieldDictionary_TabsHelper.WaitForText(name, 30);

                executionLog.Log("CreateClientTabsMasterData", "Redirect To URL");
                VisitOffice("tabs");

                executionLog.Log("CreateClientTabsMasterData", "Verify title");
                VerifyTitle("Tabs Management");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse 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 corp_PDFTemplate_PDFCategoriesHelper = new CorpPDFTemplate_CategoriesHelper(GetWebDriver());

            // Variable random
            String name   = "Test" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("CreateAndDeletePDFCategories", "Redirect To Categories");
                VisitCorp("pdf_templates/categories");
                corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateAndDeletePDFCategories", "Verify page title");
                VerifyTitle("PDF Categories");

                executionLog.Log("CreateAndDeletePDFCategories", "Click on Click create button");
                corp_PDFTemplate_PDFCategoriesHelper.ClickJS("Create");
                corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("CreateAndDeletePDFCategories", "Enter Name");
                corp_PDFTemplate_PDFCategoriesHelper.TypeText("EnterName", name);

                executionLog.Log("CreateAndDeletePDFCategories", "Click on Save Button");
                corp_PDFTemplate_PDFCategoriesHelper.ClickJS("Save");
                corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateAndDeletePDFCategories", "Verify text present");
                corp_PDFTemplate_PDFCategoriesHelper.WaitForText("Category Created Successfully", 5);

                executionLog.Log("CreateAndDeletePDFCategories", "Search and delete pdf.");
                corp_PDFTemplate_PDFCategoriesHelper.SearchAndClick(name);
                //corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateAndDeletePDFCategories", "Select category to be replaced with.");
                corp_PDFTemplate_PDFCategoriesHelper.SelectDropDownByText("//*[@id='CategoryReplaceCategory']", "Other");
                //corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateAndDeletePDFCategories", "Click on save button.");
                corp_PDFTemplate_PDFCategoriesHelper.ClickDisplayed("//a[@title='Save']");

                executionLog.Log("CreateAndDeletePDFCategories", "Category Replaced Successfully.");
                corp_PDFTemplate_PDFCategoriesHelper.WaitForText("Category Replaced Successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

                executionLog.Log("AdminTicketStatusUrlChange", "Redirect To Admin");
                VisitOffice("admin");
                tickets_MasterDataHelper.WaitForWorkAround(1000);

                executionLog.Log("AdminTicketStatusUrlChange", "Goto Priority page.");
                VisitOffice("tickets/masterdata/priority");

                executionLog.Log("AdminTicketStatusUrlChange", "Click On any priority");
                tickets_MasterDataHelper.ClickElement("ClicKOnIssueResolved");
                tickets_MasterDataHelper.WaitForWorkAround(1000);

                executionLog.Log("AdminTicketStatusUrlChange", "Change the page url.");
                VisitOffice("tickets/masterdata/edit/priority/121");

                executionLog.Log("AdminTicketStatusUrlChange", "Verify Message You don't have privilege.");
                tickets_MasterDataHelper.WaitForText("You don't have privilege.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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