Example #1
0
        public void bulkUpdateSalesManagerForOpportunities()
        {
            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_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver());

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

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

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Verify Page title");
                VerifyTitle("Dashboard");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Visit opportunities page.");
                VisitOffice("opportunities");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Verify page title..");
                VerifyTitle("Opportunities");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Click On first Check Box");
                office_OpportunitiesHelper.ClickElement("CheckboxOpportunity");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Click On Bulk Update");
                office_OpportunitiesHelper.ClickElement("ClickOnBulkUpdate");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Change Sale Manager");
                office_OpportunitiesHelper.ClickElement("ChangeSaleManager");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Select Sales Manager");
                office_OpportunitiesHelper.SelectDropDownByText("//*[@id='OpportunitySalesManagerUpdateSalesManagerId']", "Howard Tang");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Click on Update button");
                office_OpportunitiesHelper.ClickDisplayed("//button[text()='Update']");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Accept alert message.");
                office_OpportunitiesHelper.AcceptAlert();
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("BulkUpdateSalesManagerForOpportunities", "Wait for success message.");
                office_OpportunitiesHelper.WaitForText("records updated successfully", 30);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("BulkUpdateSalesManagerForOpportunities");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Bulk Update Sales Manager For Opportunities");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Bulk Update Sales Manager For Opportunities", "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("Bulk Update Sales Manager For Opportunities");
                        TakeScreenshot("BulkUpdateSalesManagerForOpportunities");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\BulkUpdateSalesManagerForOpportunities.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("BulkUpdateSalesManagerForOpportunities");
                        string id            = loginHelper.getIssueID("Bulk Update Sales Manager For Opportunities");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\BulkUpdateSalesManagerForOpportunities.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Bulk Update Sales Manager For Opportunities"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Bulk Update Sales Manager For Opportunities");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("BulkUpdateSalesManagerForOpportunities");
                executionLog.WriteInExcel("Bulk Update Sales Manager For Opportunities", Status, JIRA, "Opportunities Management");
            }
        }
        public void verifyAllOptionsInAdvancedFilterOpportunity()
        {
            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("VerifyAllOptionsInAdvancedFilterOpportunity", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

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

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

                executionLog.Log("VerifyAllOptionsInAdvancedFilterOpportunity", "Click on Advanced Filter");
                office_OpportunitiesHelper.ClickElement("AdvancefiltLabel");
                office_OpportunitiesHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyAllOptionsInAdvancedFilterOpportunity", "Click on Add Row");
                office_OpportunitiesHelper.ClickElement("AddRowBtn");
                office_OpportunitiesHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyAllOptionsInAdvancedFilterOpportunity", "Verify options present on second row");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Details']");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Description']");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Phones']");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Electronic Addresses']");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Addresses - Location Address']");
                office_OpportunitiesHelper.IsElementPresent("//select[@id='OpportunityCustomColNames1']/optgroup[@label='Opportunities - Addresses - Mailing Address']");
                office_OpportunitiesHelper.WaitForWorkAround(1000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyAllOptionsInAdvancedFilterOpportunity");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify All Options In Advanced Filter Opportunity");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify All Options In Advanced Filter Opportunity", "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("Verify All Options In Advanced Filter Opportunity");
                        TakeScreenshot("VerifyAllOptionsInAdvancedFilterOpportunity");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyAllOptionsInAdvancedFilterOpportunity.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyAllOptionsInAdvancedFilterOpportunity");
                        string id            = loginHelper.getIssueID("Verify All Options In Advanced Filter Opportunity");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyAllOptionsInAdvancedFilterOpportunity.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify All Options In Advanced Filter Opportunity"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify All Options In Advanced Filter Opportunity");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyAllOptionsInAdvancedFilterOpportunity");
                executionLog.WriteInExcel("Verify All Options In Advanced Filter Opportunity", Status, JIRA, "Opportunities Management");
            }
        }
Example #3
0
        public void verifyNoteWithExeForMeetingNotAdded()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper  = new LoginHelper(GetWebDriver());
            var officeActivities_NotesHelper   = new OfficeActivities_NotesHelper(GetWebDriver());
            var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver());

            // Random Variables
            var    DocName = "Notes Meeting Exe" + GetRandomNumber();
            var    ExeFile = GetPathToFile() + "chrome.exe";
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click to open client inf");
                VisitOffice("meetings");

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click On Meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click On Add Document Btn");
                officeActivities_MeetingHelper.ClickElement("ClickOnNoteMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Enter Doc Name");
                officeActivities_MeetingHelper.TypeText("EnterSubNote", DocName);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Uplaod exe file");
                officeActivities_MeetingHelper.Upload("DocumentFileNotesMeet", ExeFile);
                officeActivities_MeetingHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Click Save Of Doc Pop Up");
                officeActivities_MeetingHelper.ClickElement("SaveNoteMeeting");

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Verify Confirmation");
                officeActivities_MeetingHelper.WaitForText("Note successfully Created.", 10);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Redirect To  Notes Activities");
                VisitOffice("notes");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Search Document");
                officeActivities_NotesHelper.TypeText("EnterSubject", DocName);
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Select All in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                officeActivities_NotesHelper.ClickElement("ClickOnNote");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyNoteWithExeForMeetingNotAdded", "Verify Added Document not Present");
                officeActivities_NotesHelper.VerifyText("VerifyNoAttachment", "No Data Available.");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", " Click On Create button.");
                integration_IframeAppsHelper.ClickElement("Create");

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", " Click On Create button.");
                integration_IframeAppsHelper.ClickElement("Create");

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Click on partner portal check box.");
                integration_IframeAppsHelper.ClickElement("PartnerPortal");

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Login with valid username and password");
                Login("qa.association", "1qaz!QAZ");
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Verify Page title.");
                VerifyTitle("QA Association - Details");

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Verify created iframe present in partner association portal.");
                integration_IframeAppsHelper.IsElementPresent(loc);

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Redirect at office admin.");
                VisitOffice("admin");

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Uncheck the partner portal check box.");
                integration_IframeAppsHelper.ClickElement("PartnerPortal");

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

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Login with valid username and password");
                Login("qa.association", "1qaz!QAZ");
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
                integration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Verify Page title.");
                VerifyTitle("QA Association - Details");

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Verify created iframe not present in partner association portal.");
                integration_IframeAppsHelper.ElementNotAvailable(loc);

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Logout from partner association portal.");
                VisitOffice("logout");

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

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

                executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Redirect at iframe apps page.");
                VisitOffice("iframes");

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

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

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

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

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

            string[] username1 = null;
            string[] password2 = null;

            var oXMLData = new XMLParse();

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

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

            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_MerchantHelper = new Corp_MerchantHelper(GetWebDriver());


            var DBA = "ClientDBA" + RandomNumber(1, 500);

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

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

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

                VisitOffice("clients");
                corp_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Click on Create button");
                corp_MerchantHelper.ClickElement("CreateBtn");
                corp_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Enter DBA name");
                corp_MerchantHelper.TypeText("BusinessName", DBA);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Select the client status");
                corp_MerchantHelper.SelectByText("ClientStatus", "New");

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "select the responsibity");
                corp_MerchantHelper.SelectByText("ClientResponsibility", "Howard Tang");

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Click on save btn");
                corp_MerchantHelper.ClickElement("SaveBtn");
                corp_MerchantHelper.WaitForWorkAround(5000);

                VisitOffice("logout");
                corp_MerchantHelper.WaitForWorkAround(4000);

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

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Click on Merchants tab.");
                VisitCorp("merchants");
                corp_MerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Verify page title as merchants.");
                VerifyTitle();

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Search the same merchants/clien");
                corp_MerchantHelper.TypeText("EnterClinentToSearch", DBA);
                corp_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Click on any merchant.");
                corp_MerchantHelper.ClickElement("CickonMercahnt");
                corp_MerchantHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Verify merchant created by credits.");
                corp_MerchantHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Verify merchant modified by credits.");
                corp_MerchantHelper.VerifyText("ModifiedBy", "Howard Tang");

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Logout from the application.");
                VisitCorp("logout");
                corp_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Login with valid username and password");
                Login(username1[0], password2[0]);

                VisitOffice("clients");
                corp_MerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Search the company Name");
                corp_MerchantHelper.TypeText("EnterClinentToSearch", DBA);
                corp_MerchantHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Click on check boc");
                corp_MerchantHelper.ClickElement("FirstCheckBox");

                executionLog.Log("VerifyMerchantCreatedAndModifiedByCredits", "Delete the client");
                corp_MerchantHelper.ClickJS("DeleteBtn");
                corp_MerchantHelper.AcceptAlert();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("MerchantTabCorp", "Click on merchant tab");
                corp_MerchantHelper.ClickElement("ClickOnMerchnatTab");

                executionLog.Log("MerchantTabCorp", "verify marchants available");
                corp_MerchantHelper.VerifyPageText("Merchants");
                corp_MerchantHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("MerchantTabCorp");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Merchant Tab Corp");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Merchant Tab Corp", "Bug", "Medium", "Corp Merchants page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Merchant Tab Corp");
                        TakeScreenshot("MerchantTabCorp");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MerchantTabCorp.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("MerchantTabCorp");
                        string id            = loginHelper.getIssueID("Merchant Tab Corp");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\MerchantTabCorp.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Merchant Tab Corp"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Merchant Tab Corp");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("MerchantTabCorp");
                executionLog.WriteInExcel("Merchant Tab Corp", Status, JIRA, "Corp Merchant");
            }
        }
Example #7
0
        public void searchListManagementItem()
        {
            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("SearchListManagementItem", "Login with valid username and password");
                Login(username[0], password[0]);
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

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

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

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

                executionLog.Log("SearchListManagementItem", "Click on Create list");
                listManagementHelper.ClickForce("Create");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("SearchListManagementItem", "Name the list");
                listManagementHelper.TypeText("ListName", name);

                executionLog.Log("SearchListManagementItem", "Click on Create button");
                listManagementHelper.ClickElement("Createbuttn");
                listManagementHelper.WaitForWorkAround(1000);

                executionLog.Log("SearchListManagementItem", "Search the list name");
                listManagementHelper.TypeText("SearchList", name);

                executionLog.Log("SearchListManagementItem", "verify the list name");
                String listname = listManagementHelper.GetText("//ul[@id='listManagerGroup']/li/p");

                executionLog.Log("SearchListManagementItem", "verify the list name");
                Assert.AreEqual(listname, name);
                Console.WriteLine("List Rename successfull");

                //executionLog.Log("SearchListManagementItem", "Click on list");
                //listManagementHelper.ClickElement("Firstlist");
                //listManagementHelper.WaitForWorkAround(1000);

                //executionLog.Log("SearchListManagementItem", "Rename the list");
                //listManagementHelper.TypeText("Name", name2);

                //executionLog.Log("SearchListManagementItem", "Click on Back button");
                //listManagementHelper.ClickElement("Backbutton");
                //listManagementHelper.WaitForWorkAround(1000);

                //executionLog.Log("SearchListManagementItem", "Search the list name");
                //listManagementHelper.TypeText("SearchList", name2);

                //executionLog.Log("SearchListManagementItem", "verify the list name");
                //String listname = listManagementHelper.GetText("//ul[@id='listManagerGroup']/li/p");

                //executionLog.Log("SearchListManagementItem", "verify the list name");
                //Assert.AreEqual(listname, name2);
                //Console.WriteLine("List Rename successfull");

                //executionLog.Log("SearchListManagementItem", "Delete List");
                //listManagementHelper.MouseOver("//ul[@id='listManagerGroup']/li/p");
                //listManagementHelper.WaitForWorkAround(2000);

                //executionLog.Log("SearchListManagementItem", "Delete List");
                //listManagementHelper.ClickElement("DeleteList");

                //executionLog.Log("SearchListManagementItem", "Click on Delete button");
                //listManagementHelper.ClickElement("Deletebuttn");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("SearchListManagementItem");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Search List Management Item");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Search List Management Item", "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("Rename ListManagement Item");
                        TakeScreenshot("SearchListManagementItem");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SearchListManagementItem.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("SearchListManagementItem");
                        string id            = loginHelper.getIssueID("Search List Management Item");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SearchListManagementItem.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Search List Management Item"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Search List Management Item");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("SearchListManagementItem");
                executionLog.WriteInExcel("Search List Management Item", Status, JIRA, "List Management");
            }
        }
Example #8
0
        public void createProducts()
        {
            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 products_ProductHelper = new Products_ProductHelper(GetWebDriver());

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

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

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

                executionLog.Log("CreateProducts", "Redirect To Profucts");
                VisitOffice("products");
                products_ProductHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateProducts", "Enter Name");
                products_ProductHelper.TypeText("SearchProduct", "Apple");
                products_ProductHelper.WaitForWorkAround(2000);

                var loc = "//table[@id='list1']//tr[2]//td[5]/a";
                if (products_ProductHelper.IsElementPresent(loc))
                {
                    executionLog.Log("CreateProducts", "Redirect To Profucts");
                    VisitOffice("products/create");
                    products_ProductHelper.WaitForWorkAround(4000);

                    executionLog.Log("CreateProducts", "Enter the name of the product");
                    products_ProductHelper.TypeText("Name", name);

                    executionLog.Log("CreateProducts", "Select the category of the product");
                    products_ProductHelper.SelectByText("Category", "Broken");

                    executionLog.Log("CreateProducts", " Click On Category");
                    products_ProductHelper.ClickElement("AddCustomField");
                    products_ProductHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreateProducts", "Enter Filed name");
                    products_ProductHelper.TypeText("FieldName", "Test");

                    executionLog.Log("CreateProducts", "Select Type");
                    products_ProductHelper.Select("Type", "textbox");

                    executionLog.Log("CreateProducts", "Select Type");
                    products_ProductHelper.Select("ContentType", "text");

                    executionLog.Log("CreateProducts", "Enter Filed name");
                    products_ProductHelper.TypeText("DataLength", "10");

                    executionLog.Log("CreateProducts", "Select Data Validation");
                    products_ProductHelper.Select("DataValidation", "email");

                    executionLog.Log("CreateProducts", "Click on Required CheckBox");
                    products_ProductHelper.ClickElement("Required");
                    products_ProductHelper.WaitForWorkAround(1000);

                    executionLog.Log("CreateProducts", "Enter Description");
                    products_ProductHelper.TypeText("Description", "THIS IS TESTING DESCRIPTION");

                    executionLog.Log("CreateProducts", "  Click on Save button");
                    products_ProductHelper.ClickElement("Save1");
                    products_ProductHelper.WaitForElementPresent("Save", 5);

                    executionLog.Log("CreateProducts", "Click on Save btn.");
                    products_ProductHelper.ClickJS("Save");
                    products_ProductHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreateProducts", "Redirect To Profucts");
                    VisitOffice("products");
                    products_ProductHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreateProducts", "Enter Name to search");
                    products_ProductHelper.TypeText("SearchProduct", name);
                    products_ProductHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreateProducts", "Click Delete btn  ");
                    products_ProductHelper.ClickElement("DeleteProduct");

                    executionLog.Log("CreateProducts", "Accept alert message. ");
                    products_ProductHelper.AcceptAlert();

                    executionLog.Log("CreateProducts", "Wait for delete message. ");
                    products_ProductHelper.WaitForText("Product Deleted Successfully", 10);
                }
                else
                {
                    executionLog.Log("CreateProducts", "Redirect To Profucts");
                    VisitOffice("products/create");
                    products_ProductHelper.WaitForWorkAround(4000);

                    executionLog.Log("CreateProducts", "Enter the product Name");
                    products_ProductHelper.TypeText("Name", "Apple");

                    executionLog.Log("CreateProducts", "Select the Category");
                    products_ProductHelper.SelectByText("Category", "Broken");

                    executionLog.Log("CreateProducts", " Click On Category");
                    products_ProductHelper.ClickElement("AddCustomField");
                    products_ProductHelper.WaitForWorkAround(3000);

                    executionLog.Log("CreateProducts", "Enter Filed name");
                    products_ProductHelper.TypeText("FieldName", "Test");

                    executionLog.Log("CreateProducts", "Select Type");
                    products_ProductHelper.Select("Type", "textbox");

                    executionLog.Log("CreateProducts", "Select Type");
                    products_ProductHelper.Select("ContentType", "text");

                    executionLog.Log("CreateProducts", "Enter Filed name");
                    products_ProductHelper.TypeText("DataLength", "10");

                    executionLog.Log("CreateProducts", "Select Data Validation");
                    products_ProductHelper.Select("DataValidation", "email");

                    executionLog.Log("CreateProducts", "Click on Required CheckBox");
                    products_ProductHelper.ClickElement("Required");
                    products_ProductHelper.WaitForWorkAround(1000);

                    executionLog.Log("CreateProducts", "Enter Description");
                    products_ProductHelper.TypeText("Description", "THIS IS TESTING DESCRIPTION");

                    executionLog.Log("CreateProducts", "  Click on Save button");
                    products_ProductHelper.ClickElement("Save1");
                    products_ProductHelper.WaitForElementPresent("Save", 5);

                    executionLog.Log("CreateProducts", "Save the product");
                    products_ProductHelper.ClickJS("Save");
                    products_ProductHelper.WaitForWorkAround(6000);

                    products_ProductHelper.VerifyPageText("Product Created Successfully");
                    products_ProductHelper.WaitForWorkAround(2000);
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Go to PDF templates page");
                VisitOffice("pdf_templates");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Search for required pdf");
                pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "Clone of CoCardEnhancedBillback2105_ia_Final co-br");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Click on PDF Halo Edit");
                pDFTemplate_PDFTemplateHelper.ClickElement("PDFHaloEdit");
                pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);
                pDFTemplate_PDFTemplateHelper.ClickElement("SelectVisualMap");
                pDFTemplate_PDFTemplateHelper.ClickElement("SubmitMapOptn");
                pDFTemplate_PDFTemplateHelper.WaitForElementPresent("//input[@name='visaPartialAuth']", 20);

                executionLog.Log("VerifyMappingOfClone_of_CoCardEnhancedBillback2105_ia_Final_co_br", "Check mapping");
                pdffilesHelper.ClickElement("VisaCredit_DiscRate");
                pdffilesHelper.WaitForWorkAround(3000);
                string tab1     = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[1]/div/button");
                string section1 = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[2]/div/button");
                string field1   = pdffilesHelper.getInputText("//*[@id='directmapdiv']/div[2]/div[1]/div[4]/div/button");

                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/view/200866");
                pdffilesHelper.WaitForWorkAround(2000);
                if (tab1 == "Rates & Fees")
                {
                    office_ClientsHelper.ClickElement("RatesAndFee");
                }
                else
                {
                }

                //Boolean test = Assert.IsTrue(pDFTemplate_PDFTemplateHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']"));
                if (office_ClientsHelper.IsElementPresent("//*[@id='ClientRatesFeeAmexRate']") == true)
                {
                    office_ClientsHelper.TypeText("Amexp", "61");
                    office_ClientsHelper.ClickElement("RandFSave");
                    office_ClientsHelper.WaitForWorkAround(2000);
                }
                else
                {
                }

                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/pegasustestoffice/clients/pdfs/200866/html/602450");
                office_ClientsHelper.WaitForWorkAround(4000);

                string value = pDFTemplate_PDFTemplateHelper.getInputText("//*[@id='qualRate']");

                Assert.AreEqual("61", value);
            }
            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");
            }
        }
Example #10
0
        public void verifyClientDBACityStateCountryPopulate()
        {
            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_MerchantHelper = new Office_ClientsHelper(GetWebDriver());

            var DBA        = "ClientDBA" + RandomNumber(1, 5000);
            var ticketname = "Testticket" + RandomNumber(1, 500);

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

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

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

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Redirect to Create merchant page");
                VisitOffice("clients");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Click on client");
                office_MerchantHelper.ClickElement("Client1");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Go to Company Details tab");
                office_MerchantHelper.ClickElement("CompanyDetailsTab");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Mailing Address");
                office_MerchantHelper.TypeText("MailZipCode", "15001");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Poulate");
                office_MerchantHelper.VerifyTextBoxValue("MailCity", "Aliquippa");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Poulate");
                office_MerchantHelper.VerifyTextBoxValue("MailCounty", "Beaver");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Poulate");
                office_MerchantHelper.verifyselectedOptn("MailCountry", "United States");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Poulate");
                office_MerchantHelper.verifyselectedOptn("MailState", "PA");
                Console.WriteLine("City, County, Country and State populated successfully");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Address Line 1 of Location Addess");
                office_MerchantHelper.TypeText("LocAddLine1", "Add Line 1");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Address Line 2 of Location Addess");
                office_MerchantHelper.TypeText("LocAddLine2", "Add Line 2");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Location Address");
                office_MerchantHelper.TypeText("LocZipCode", "20001");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Select Same as Location Address check box");
                office_MerchantHelper.ClickElement("SameAsLocChkBox");
                office_MerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Address Line 1 Copied");
                office_MerchantHelper.VerifyTextBoxValue("MailAddLine1", "Add Line 1");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Address Line 2 Copied");
                office_MerchantHelper.VerifyTextBoxValue("MailAddLine2", "Add Line 2");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Copied");
                office_MerchantHelper.VerifyTextBoxValue("MailCity", "Washington");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Copied");
                office_MerchantHelper.VerifyTextBoxValue("MailCounty", "District of Columbia");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Copied");
                office_MerchantHelper.verifyselectedOptn("MailCountry", "United States");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Copied");
                office_MerchantHelper.verifyselectedOptn("MailState", "DC");
                Console.WriteLine("City, County, Country and State copied successfully");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Go to Owners tab");
                office_MerchantHelper.ClickElement("OwnerTab");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Title");
                office_MerchantHelper.TypeText("TitleOwner", "Title");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Enter Zip Code in Address");
                office_MerchantHelper.TypeText("Owner1Zip1", "15001");
                office_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify City Poulate");
                office_MerchantHelper.VerifyTextBoxValue("Owner1City1", "Aliquippa");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify County Poulate");
                office_MerchantHelper.VerifyTextBoxValue("Owner1County1", "Beaver");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify Country Poulate");
                office_MerchantHelper.verifyselectedOptn("Owner1Country1", "United States");

                executionLog.Log("VerifyClientDBACityStateCountryPopulate", "Verify State Poulate");
                office_MerchantHelper.verifyselectedOptn("Owner1State1", "PA");
                Console.WriteLine("Owner's City, County, Country and State populated successfully");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Redirect at ticket topic page.");
                VisitOffice("tickets/settings");
                ticket_SettingsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Select set as Department");
                ticket_SettingsHelper.ClickElement("SetDept");
                ticket_SettingsHelper.Click("//*[@id='assign0Department']/option[1]");

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Select set as Assigned To");
                ticket_SettingsHelper.SelectByText("SetAssignto", "Howard Tang");

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Select set as Assigned Manager");
                ticket_SettingsHelper.SelectByText("SetAssignMgr", "Howard Tang");

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Click on Save button.");
                ticket_SettingsHelper.ClickElement("SaveBtn");
                ticket_SettingsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerfiyTicketSettingAssignedToAndManagerSave", "Verify settings saved");
                ticket_SettingsHelper.VerifySlctdOptn("SetAssignto", "Howard Tang");
                ticket_SettingsHelper.VerifySlctdOptn("SetAssignMgr", "Howard Tang");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerfiyTicketSettingAssignedToAndManagerSave");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verfiy Ticket Setting Assigned To And Manager Save");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verfiy Ticket Setting Assigned To And Manager Save", "Bug", "Medium", "Ticket Admin page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verfiy Ticket Setting Assigned To And Manager Save");
                        TakeScreenshot("VerfiyTicketSettingAssignedToAndManagerSave");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerfiyTicketSettingAssignedToAndManagerSave.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerfiyTicketSettingAssignedToAndManagerSave");
                        string id            = loginHelper.getIssueID("Verfiy Ticket Setting Assigned To And Manager Save");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerfiyTicketSettingAssignedToAndManagerSave.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verfiy Ticket Setting Assigned To And Manager Save"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verfiy Ticket Setting Assigned To And Manager Save");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerfiyTicketSettingAssignedToAndManagerSave");
                executionLog.WriteInExcel("Verfiy Ticket Setting Assigned To And Manager Save", Status, JIRA, "Admin Ticket settings");
            }
        }
Example #12
0
        public void exportUserToCsv()
        {
            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 corpOffices_UsersHelper = new CorpOffices_UsersHelper(GetWebDriver());

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

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

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

                executionLog.Log("ExportUserToCsv", "Visit All User");
                VisitCorp("allusers");

                executionLog.Log("ExportUserToCsv", "Click on Export");
                corpOffices_UsersHelper.ClickElement("ClickOnExport");
                corpOffices_UsersHelper.WaitForWorkAround(3000);

                executionLog.Log("ExportUserToCsv", "Export as a CSV");
                corpOffices_UsersHelper.ClickElement("ExportToCSV");
                corpOffices_UsersHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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


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

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

                executionLog.Log("UpdateTextOnMarketingPageClient", "Redirect at creat client page.");
                VisitOffice("clients/create");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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


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

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

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

                executionLog.Log("AdminMasterDataAmexRateURLChange", "Goto Master Data >> Amex rates");
                VisitOffice("amex_rates");

                executionLog.Log("AdminMasterDataAmexRateURLChange", "Click On any Amex Rate");
                masterData_AmexRateHelper.ClickElement("OpenAnyAmextRate");
                masterData_AmexRateHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminMasterDataAmexRateURLChange", "Change the url with the url number of another office");
                VisitOffice("manage_amex_rates/26613");
                masterData_AmexRateHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminMasterDataAmexRateURLChange", "Verify Validation");
                masterData_AmexRateHelper.WaitForText("The Amex Master Rate is does not exists.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdminMasterDataAmexRateURLChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("AdminMaster Data Amex Rate URL Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("AdminMaster Data Amex Rate URL Change", "Bug", "Medium", "Amex Rates Page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("AdminMaster Data Amex Rate URL Change");
                        TakeScreenshot("AdminMasterDataAmexRateURLChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataAmexRateURLChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdminMasterDataAmexRateURLChange");
                        string id            = loginHelper.getIssueID("AdminMaster Data Amex Rate URL Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataAmexRateURLChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("AdminMaster Data Amex Rate URL Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("AdminMaster Data Amex Rate URL Change");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdminMasterDataAmexRateURLChange");
                executionLog.WriteInExcel("AdminMaster Data Amex Rate URL Change", Status, JIRA, "Master Data");
            }
        }
        public void importLeadCancel()
        {
            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_LeadsHelper = new Office_LeadsHelper(GetWebDriver());


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


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

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

                executionLog.Log("ImportLeadCancel", "Redirect at import leads page.");
                VisitOffice("leads/import");

                executionLog.Log("ImportLeadCancel", "Upload a file with duplicate records");
                office_LeadsHelper.UploadFile("//*[@id='vcard_file']", File);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ImportLeadCancel", "Click on import button");
                office_LeadsHelper.ClickElement("LeadImport");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("ImportLeadCancel", "Scroll to merge button");
                office_LeadsHelper.ScrollDown("//div[@class='row']/div/a[@title='Merge']");

                executionLog.Log("ImportLeadCancel", "Click on merge button");
                office_LeadsHelper.ClickElement("MergeDuplicate");
                office_LeadsHelper.WaitForWorkAround(1000);

                executionLog.Log("ImportLeadCancel", "Decline the alert message by click cancel.");
                office_LeadsHelper.DeclineAlert();

                executionLog.Log("ImportLeadCancel", "Again click on merge button.");
                office_LeadsHelper.ClickElement("MergeDuplicate");
                office_LeadsHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



                // Verify tickets with notes.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketswithNotes");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as notes.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Notes");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify note present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Notes");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                //Verify tickets with documents.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithDocs");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as documents .");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Documents");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify ticket present has document.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Documents");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                //Verify ticket with meetings.

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketsWithMeetings");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as meetings");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Meetings");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify meeting present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Meeting");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                // Verify ticket with tasks .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithTasks");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as tasks.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Tasks");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify task present for the ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Task");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);


                // Verify ticket with calls .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithCalls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Select activity type as calls.");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Calls");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify calls present for ticket.");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Calls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                // Verify tickets with attachments .

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Redirect To URL");
                VisitOffice("tickets");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify page title.");
                VerifyTitle("Tickets");
                //officeTickets_AllTicketsHelper.WaitForElementVisible("AdvanceFilter", 10);

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

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "click ticket with activity type.");
                officeTickets_AllTicketsHelper.ClickForce("TicketWithCalls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

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

                officeTickets_AllTicketsHelper.ClickElement("ClickTicket1");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify document present is related to clients");
                officeTickets_AllTicketsHelper.SelectByText("SelectActivity", "Calls");
                officeTickets_AllTicketsHelper.WaitForWorkAround(3000);

                executionLog.Log("TicketsAdvanceFilterRelatedTo", "Verify document present is related to clients");
                officeTickets_AllTicketsHelper.VerifyText("NoteTicket", "Calls");
                //officeTickets_AllTicketsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Redirect at employee page.");
                VisitOffice("documents");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Verify page title.");
                VerifyTitle("Documents");
                //officeActivities_DocumentHelper.WaitForElementVisible("AdvanceFilter", 20);

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

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Select number of records to 10.");
                officeActivities_DocumentHelper.SelectByText("ResultsPerPage", "10");
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Click on Apply button.");
                officeActivities_DocumentHelper.ClickElement("Apply");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeActivities_DocumentHelper.ShowResult(30);
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Select number of records to 20.");
                officeActivities_DocumentHelper.SelectByText("ResultsPerPage", "20");
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Click on Apply button.");
                officeActivities_DocumentHelper.ClickElement("Apply");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeActivities_DocumentHelper.ShowResult(50);
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

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

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Select number of records to 50.");
                officeActivities_DocumentHelper.SelectByText("ResultsPerPage", "50");
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Click on Apply button.");
                officeActivities_DocumentHelper.ClickElement("Apply");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeActivities_DocumentHelper.ShowResult(40);
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

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

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Select number of records to 100.");
                officeActivities_DocumentHelper.SelectByText("ResultsPerPage", "100");
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Click on Apply button.");
                officeActivities_DocumentHelper.ClickElement("Apply");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("DocumentsAdvanceFilterResultsPP", "Verify number of records displayed.");
                officeActivities_DocumentHelper.ShowResult(100);
                //officeActivities_DocumentHelper.WaitForWorkAround(4000);

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

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

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

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

                executionLog.Log("OpportunitiesZipCode", "Redirect To URL");
                VisitOffice("opportunities/create");

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

                executionLog.Log("OpportunitiesZipCode", "Enter Address Line1");
                office_OpportunitiesHelper.TypeText("AddressLine1Opp", "TEST ADDRESS LINE 1");

                executionLog.Log("OpportunitiesZipCode", "Enter Zip Code");
                office_OpportunitiesHelper.TypeText("ZipCodeOpp", "60601");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("OpportunitiesZipCode", "Select MailingAddressLine1");
                office_OpportunitiesHelper.TypeText("MailingAddLine1opp", "test");

                executionLog.Log("OpportunitiesZipCode", "Enter Mailing Zip Code");
                office_OpportunitiesHelper.TypeText("MailingZipCodeOpp", "30033");
                office_OpportunitiesHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("OpportunitiesZipCode");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Opportunities Zip Code");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Opportunities Zip Code", "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("Opportunities Zip Code");
                        TakeScreenshot("OpportunitiesZipCode");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\OpportunitiesZipCode.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("OpportunitiesZipCode");
                        string id            = loginHelper.getIssueID("Opportunities Zip Code");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\OpportunitiesZipCode.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Opportunities Zip Code"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Opportunities Zip Code");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("OpportunitiesZipCode");
                executionLog.WriteInExcel("Opportunities Zip Code", Status, JIRA, "Opportunities Management");
            }
        }
Example #20
0
        public void exportError()
        {
            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_OfficePayout_DetailedPayoutHelper = new ResidualIncome_OfficePayout_DetailedPayoutHelper(GetWebDriver());

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

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

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

                executionLog.Log("ExportError", "Navigate to the detailed payout page.");
                VisitOffice("rir/detailed_payouts");

                executionLog.Log("ExportError", "verify title");
                VerifyTitle("Residual Income - Payouts");

                executionLog.Log("ExportError", "Click on Advance filter");
                residualIncome_OfficePayout_DetailedPayoutHelper.ClickElement("Advance");

                executionLog.Log("ExportError", "Click on Apply buton");
                residualIncome_OfficePayout_DetailedPayoutHelper.ClickElement("Apply");

                executionLog.Log("ExportError", "Click on Export buton");
                residualIncome_OfficePayout_DetailedPayoutHelper.ClickElement("Exp");

                executionLog.Log("ExportError", "Click on Export as csv link");
                residualIncome_OfficePayout_DetailedPayoutHelper.ClickElement("ExpCSV");

                executionLog.Log("ExportError", "Click on Advance filter");
                residualIncome_OfficePayout_DetailedPayoutHelper.ClickElement("Advance");
                Console.WriteLine("Done");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ExportError");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Export Error");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Export Error", "Bug", "Medium", "Residual Income page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Export Error");
                        TakeScreenshot("ExportError");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ExportError.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ExportError");
                        string id            = loginHelper.getIssueID("Export Error");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ExportError.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Export Error"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Export Error");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ExportError");
                executionLog.WriteInExcel("Export Error", Status, JIRA, "Residual Adjustment");
            }
        }
Example #21
0
        public void createVendors()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

            // Random Variables
            var    name   = "Vendor" + RandomNumber(1, 999);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("CreateVendors", "Redirect To Vendors");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("CreateVendors", " Click On Create");
                equipment_VendorsHelper.ClickElement("Create");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("CreateVendors", "Select Type");
                equipment_VendorsHelper.Select("Type", "Online");

                executionLog.Log("CreateVendors", "Enter Type");
                equipment_VendorsHelper.TypeText("Name", name);

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

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

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

                executionLog.Log("CreateVendors", "Enter LatName");
                equipment_VendorsHelper.TypeText("LastName", "Vendor");

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

                executionLog.Log("CreateVendors", "Select EAddress Label");
                equipment_VendorsHelper.Select("EAddressLabel", "Work");

                executionLog.Log("CreateVendors", "Enter E Address");
                equipment_VendorsHelper.TypeText("eAddress", "*****@*****.**");

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

                executionLog.Log("CreateVendors", "Enter Zip Code");
                equipment_VendorsHelper.TypeText("ZipCodeVendor", "60601");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateVendors", " Click on Save button");
                equipment_VendorsHelper.ClickElement("Save");
                equipment_VendorsHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateVendors", "Wait for text");
                equipment_VendorsHelper.WaitForText("Vendor created successfully", 10);

                executionLog.Log("CreateVendors", "Redirect To Vendors");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("CreateVendors", "Enter Name to search");
                equipment_VendorsHelper.TypeText("VendorName", name);
                equipment_VendorsHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateVendors", "Click Delete btn  ");
                equipment_VendorsHelper.ClickElement("Delete");

                executionLog.Log("CreateVendors", "Accept alert message. ");
                equipment_VendorsHelper.AcceptAlert();

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

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

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

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

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

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Goto Leads page.");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(6000);

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Open Advance filter.");
                office_LeadsHelper.ClickElement("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Select Result Page per 10.");
                office_LeadsHelper.SelectByText("ResultsPerPage", "10");

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Click on apply button.");
                office_LeadsHelper.ClickJS("Apply");

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Open Advance filter.");
                office_LeadsHelper.ClickElement("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Open Reset button.");
                office_LeadsHelper.ClickElement("ResetAdvFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Open Advance filter.");
                office_LeadsHelper.ClickElement("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("verifyDefaultValueOfPerPageDropdown", "Verify default value 100 in Result Per page dropdown.");
                office_LeadsHelper.VerifySelectedOption("//*[@id='pageresults']", "100");
            }


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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("verifyDefaultValueOfPerPageDropdown");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("verify Default Value Of PerPageDropdown");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("verify Default Value Of PerPage Dropdown", "Bug", "Medium", "Amex page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("verify Default Value Of PerPage Dropdown");
                        TakeScreenshot("verifyDefaultValueOfPerPageDropdown");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\verifyDefaultValueOfPerPageDropdown.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("verifyDefaultValueOfPerPageDropdown");
                        string id            = loginHelper.getIssueID("verify Default Value Of Per Page Dropdown");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\verifyDefaultValueOfPerPageDropdown.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("verify Default Value Of PerPage Dropdown"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("verify Default Value Of Per Page Dropdown");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("verify Default Value Of PerPage Dropdown");
                executionLog.WriteInExcel("verify Default Value Of Per Page Dropdown", Status, JIRA, "Office Lead");
            }
        }
        public void amexRateAlphabeticValidation()
        {
            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 masterData_AmexRateHelper = new MasterData_AmexRateHelper(GetWebDriver());

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

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

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

                executionLog.Log("AmexRateAlphabeticValidation", "Click on Masterdata >> Amex Rates");
                VisitOffice("amex_rates");

                executionLog.Log("AmexRateAlphabeticValidation", "Click on any amex rate.");
                masterData_AmexRateHelper.ClickElement("OpenAnyAmextRate");

                executionLog.Log("AmexRateAlphabeticValidation", "Enter Alpha value in amex rate");
                masterData_AmexRateHelper.TypeText("AmexRates", "Amex");

                executionLog.Log("AmexRateAlphabeticValidation", "Enter alpha value in amex per item");
                masterData_AmexRateHelper.TypeText("AmexPerItem", "Test");

                executionLog.Log("AmexRateAlphabeticValidation", "Click on save button");
                masterData_AmexRateHelper.ClickElement("Save");

                executionLog.Log("AmexRateAlphabeticValidation", "Verify validation message on page");
                masterData_AmexRateHelper.VerifyText("AmexRatesError", "Please enter a valid number.");
                masterData_AmexRateHelper.WaitForWorkAround(2000);

                executionLog.Log("AmexRateAlphabeticValidation", "Enter a valid amex rate");
                masterData_AmexRateHelper.TypeText("AmexRates", "1.4");

                executionLog.Log("AmexRateAlphabeticValidation", "Enter a valid amex per item");
                masterData_AmexRateHelper.TypeText("AmexPerItem", "3.2");

                executionLog.Log("AmexRateAlphabeticValidation", "Click on save button");
                masterData_AmexRateHelper.ClickElement("Save");

                executionLog.Log("AmexRateAlphabeticValidation", "Wait for success message.");
                masterData_AmexRateHelper.WaitForText("The Amex Rates is successfully updated!!", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AmexRateAlphabeticValidation");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Amex Rate Alphabetic Validation");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Amex Rate Alphabetic Validation", "Bug", "Medium", "Master data page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Amex Rate Alphabetic Validation");
                        TakeScreenshot("AmexRateAlphabeticValidation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AmexRateAlphabeticValidation.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AmexRateAlphabeticValidation");
                        string id            = loginHelper.getIssueID("Amex Rate Alphabetic Validation");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AmexRateAlphabeticValidation.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Amex Rate Alphabetic Validation"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Amex Rate Alphabetic Validation");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AmexRateAlphabeticValidation");
                executionLog.WriteInExcel("Amex Rate Alphabetic Validation", Status, JIRA, "Office MasterData");
            }
        }
Example #24
0
        public void createOffice()
        {
            string[] username1 = null;
            string[] password1 = null;

            var oXMLData = new XMLParse();

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

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

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

            // Variable random

            var    username = "******" + GetRandomNumber();
            var    name     = "Test" + GetRandomNumber();
            String JIRA     = "";
            String Status   = "Pass";

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

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

                executionLog.Log("CreateOffice", "Go to office page");
                VisitCorp("offices");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateOffice", "Verify title");
                VerifyTitle("Offices");

                executionLog.Log("CreateOffice", "Click On Create button");
                corpOffice_OfficeHelper.ClickElement("Create");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateOffice", "Verify title");
                VerifyTitle("Create an Office");

                executionLog.Log("CreateOffice", "Enter Name");
                corpOffice_OfficeHelper.TypeText("Name", name);

                executionLog.Log("CreateOffice", "Enter DBAName");
                corpOffice_OfficeHelper.TypeText("DBAName", "TEST123");

                executionLog.Log("CreateOffice", "Enter Website");
                corpOffice_OfficeHelper.TypeText("Website", "TEST.COM");

                executionLog.Log("CreateOffice", "Enter OfficeCode");
                corpOffice_OfficeHelper.TypeText("OfficeCode", "12345");

                executionLog.Log("CreateOffice", "Select Address");
                corpOffice_OfficeHelper.Select("AddressType", "Office");

                executionLog.Log("CreateOffice", "Enter AddressLine1");
                corpOffice_OfficeHelper.TypeText("AddressLine1", "FC-89");

                executionLog.Log("CreateOffice", "Enter ZipCode");
                corpOffice_OfficeHelper.TypeText("ZIpCode", "60601");

                executionLog.Log("CreateOffice", "Enter PrimaryUserName");
                corpOffice_OfficeHelper.TypeText("PrimaryUserName", username);

                executionLog.Log("CreateOffice", "Click on AutoGenPassword checkbox");
                corpOffice_OfficeHelper.ClickElement("AutoGenPassword");

                executionLog.Log("CreateOffice", "Enter PrimaryPassword");
                corpOffice_OfficeHelper.TypeText("PrimaryPassword", "pegasus");

                executionLog.Log("CreateOffice", "Select Salutation");
                corpOffice_OfficeHelper.Select("Salutation", "Mr");
                //corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateOffice", "Enter FirstName");
                corpOffice_OfficeHelper.TypeText("FirstName", "Test");

                executionLog.Log("CreateOffice", "Enter LastName");
                corpOffice_OfficeHelper.TypeText("LastName", "Tester");

                executionLog.Log("CreateOffice", "Enter eAddress");
                corpOffice_OfficeHelper.TypeText("eAddress", "*****@*****.**");

                executionLog.Log("CreateOffice", " Click on save button");
                try
                {
                    corpOffice_OfficeHelper.ClickElement("Save");
                }
                catch (OpenQA.Selenium.WebDriverException) { }

                executionLog.Log("CreateOffice", "Verify text on the page");
                corpOffice_OfficeHelper.WaitForText("Office created successfully.", 10);

                executionLog.Log("CreateOffice", "Go to office page");
                VisitCorp("offices");
                corpOffice_OfficeHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateOffice", "Verify title");
                VerifyTitle("Offices");

                executionLog.Log("CreateOffice", "Enter Name to search");
                corpOffice_OfficeHelper.TypeText("EnterSelenium", name);
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateOffice", "Click Delete btn  ");
                corpOffice_OfficeHelper.ClickElement("DeleteOffice");

                executionLog.Log("CreateOffice", "Verify page text");
                corpOffice_OfficeHelper.VerifyPageText("Are you sure want to delete the");

                executionLog.Log("CreateOffice", "Click Delete btn  ");
                corpOffice_OfficeHelper.ClickElement("ConfirmDelete");

                executionLog.Log("CreateOffice", "Accept alert message. ");
                corpOffice_OfficeHelper.AcceptAlert();

                executionLog.Log("CreateOffice", "Wait for delete message. ");
                corpOffice_OfficeHelper.WaitForText("Office deleted successfully.", 20);
            }


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

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

            var oXMLData = new XMLParse();

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

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

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

            // Variable

            var FirstName = "Test" + GetRandomNumber();
            var LastName  = "Tester" + GetRandomNumber();
            var Number    = "12345678" + GetRandomNumber();

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

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

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

                executionLog.Log("ClientDocumentUrlChange", "Goto User Agent >> Clients");
                VisitOffice("clients");

                executionLog.Log("ClientDocumentUrlChange", "Click On Any Client");
                office_ClientsHelper.ClickElement("Client1");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ClientDocumentUrlChange", "Click On Add Document");
                office_ClientsHelper.ClickElement("AddDoc");

                var DocName = "Document Test" + GetRandomNumber();
                executionLog.Log("ClientDocumentUrlChange", "Enter Document Name");
                office_ClientsHelper.TypeText("DocName", DocName);

                var File = GetPathToFile() + "index.jpg";
                executionLog.Log("ClientDocumentUrlChange", "Upload File");
                office_ClientsHelper.Upload("BrowseFile", File);
                office_ClientsHelper.WaitForWorkAround(1000);

                executionLog.Log("ClientDocumentUrlChange", "Click Save");
                office_ClientsHelper.ClickElement("SaveDoc");
                office_ClientsHelper.WaitForWorkAround(1000);

                executionLog.Log("ClientDocumentUrlChange", "Click On Document ");
                office_ClientsHelper.PressEnter("ClientDoc1");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ClientDocumentUrlChange", "Change the url with the url number of another office");
                VisitOffice("documents/view/41");
                office_ClientsHelper.WaitForWorkAround(1000);

                executionLog.Log("ClientDocumentUrlChange", "Verify Validation");
                office_ClientsHelper.VerifyPageText("You don't have privilege.");
                office_ClientsHelper.WaitForWorkAround(4000);

                executionLog.Log("ClientDocumentUrlChange", "Redirect to Clients Page");
                VisitOffice("clients");

                executionLog.Log("ClientDocumentUrlChange", "Click On Any Client");
                office_ClientsHelper.ClickElement("Client1");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ClientDocumentUrlChange", "Click On Document ");
                office_ClientsHelper.PressEnter("ClientDoc1");
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ClientDocumentUrlChange", "Click OnDelete icon");
                office_ClientsHelper.ClickElement("DeleteDoc");

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

                executionLog.Log("ClientDocumentUrlChange", "Wait for delete message");
                office_ClientsHelper.WaitForText("Document deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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


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

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

                executionLog.Log("SaleAgentValidationFutureDate", "Redirect To Create Agent");
                VisitOffice("sales_agents/create");

                executionLog.Log("SaleAgentValidationFutureDate", "Wait for elelment to present.");
                agent_1099SaleAagentHelper.WaitForElementPresent("SelectSalutation", 08);

                executionLog.Log("SaleAgentValidationFutureDate", "Select Salutation");
                agent_1099SaleAagentHelper.Select("SelectSalutation", "Mr");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter FirstName");
                agent_1099SaleAagentHelper.TypeText("FirstNAME", "Test Sale gent");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter LastName");
                agent_1099SaleAagentHelper.TypeText("LastName", "Tester");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter Date Of Birth");
                agent_1099SaleAagentHelper.TypeText("BirthDay", "2018-03-02");

                executionLog.Log("SaleAgentValidationFutureDate", "Select eAddressType");
                agent_1099SaleAagentHelper.Select("eAddressType", "E-Mail");

                executionLog.Log("SaleAgentValidationFutureDate", "Select eAddressLebel");
                agent_1099SaleAagentHelper.Select("eAddressLebel", "Work");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter eAddress");
                agent_1099SaleAagentHelper.TypeText("eAddress", "*****@*****.**");

                executionLog.Log("SaleAgentValidationFutureDate", "Select SelectPhoneType");
                agent_1099SaleAagentHelper.Select("SelectPhoneType", "Work");

                executionLog.Log("SaleAgentValidationFutureDate", "Select Address Type ");
                agent_1099SaleAagentHelper.Select("AddressType", "Office");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter AddressLine1");
                agent_1099SaleAagentHelper.TypeText("AddressLine1", "FC 89");

                executionLog.Log("SaleAgentValidationFutureDate", "Enter Postal code");
                agent_1099SaleAagentHelper.TypeText("PostalCode", "60601");

                executionLog.Log("SaleAgentValidationFutureDate", "CLICK On Save");
                agent_1099SaleAagentHelper.ClickElement("SaveSaleAgent");

                agent_1099SaleAagentHelper.WaitForText("Age should be greater than 18.", 10);
                agent_1099SaleAagentHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            // Variable random
            var    AvaName = "AvaTest" + RandomNumber(44, 777);
            var    name    = "Test" + RandomNumber(99, 999);
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("CreateEditAvators", "Redirect at avatars Create page.");
                VisitCorp("avatars/create");
                corpSystem_AvtarsHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateEditAvators", "Enter Avatar Name");
                corpSystem_AvtarsHelper.TypeText("AvatarName", AvaName);

                executionLog.Log("CreateEditAvators", "Select User Type");
                corpSystem_AvtarsHelper.SelectByText("SelectUserType", "Employee");
                corpSystem_AvtarsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEditAvators", "Click onSave");
                corpSystem_AvtarsHelper.ClickElement("Save");
                corpSystem_AvtarsHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEditAvators", "Wait for confirmation");
                corpSystem_AvtarsHelper.WaitForText("Avatar has been created.", 30);

                executionLog.Log("CreateEditAvators", "Search Avatars");
                corpSystem_AvtarsHelper.TypeText("SearchAvatars", AvaName);
                corpSystem_AvtarsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEditAvators", "Click Edit Avator");
                corpSystem_AvtarsHelper.ClickElement("ClickEditAvator");
                corpSystem_AvtarsHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEditAvators", "Click on Save");
                corpSystem_AvtarsHelper.ClickJS("Save");
                corpSystem_AvtarsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEditAvators", "Search Avatars");
                corpSystem_AvtarsHelper.TypeText("SearchAvatars", AvaName);
                corpSystem_AvtarsHelper.WaitForWorkAround(6000);

                executionLog.Log("CreateEditAvators", "Click on delete icon");
                corpSystem_AvtarsHelper.ClickElement("DeleteIcon");
                corpSystem_AvtarsHelper.AcceptAlert();
                corpSystem_AvtarsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("PartnerAgentURLChange", "Goto User Agents >> Partner Agent");
                VisitOffice("partners/agents");

                executionLog.Log("PartnerAgentURLChange", "Click On Partner Agent");
                agent_PartnerAgentHelper.ClickElement("OpenAgent");
                agent_PartnerAgentHelper.WaitForWorkAround(2000);

                executionLog.Log("PartnerAgentURLChange", "Change the url with the url number of another office");
                VisitOffice("partners/agent/view/921");

                executionLog.Log("PartnerAgentURLChange", "Verify Validation");
                agent_PartnerAgentHelper.WaitForText("You don't have privilege.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable
            String name   = "8" + RandomNumber(111, 999);
            String code   = "1" + RandomNumber(111, 999);
            String JIRA   = "";
            String Status = "Pass";

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

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

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

                executionLog.Log("CreateOmahaAuthGrid", "Redirect To AuthGrid");
                VisitOffice("omaha_auth_grids");
                masterData_OmahaAuthGridHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateOmahaAuthGrid", "Verify title");
                VerifyTitle("Omaha Auth Grids");

                executionLog.Log("CreateOmahaAuthGrid", " Click On Create");
                masterData_OmahaAuthGridHelper.ClickElement("Create");
                masterData_OmahaAuthGridHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateOmahaAuthGrid", "Enter Grid Id");
                masterData_OmahaAuthGridHelper.TypeText("GridId", name);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter Visa Pos Authfees");
                masterData_OmahaAuthGridHelper.TypeText("VisaPosAuthfees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter MC Pos Auth Fees");
                masterData_OmahaAuthGridHelper.TypeText("MCPosAuthFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter Amex Pos AuthFees");
                masterData_OmahaAuthGridHelper.TypeText("AmexPosAuthFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter Disc Pos Auth Fees");
                masterData_OmahaAuthGridHelper.TypeText("DiscPosAuthFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter JCD Pos Auth Fees");
                masterData_OmahaAuthGridHelper.TypeText("JCBPosAuthFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter Voice Auth Fees");
                masterData_OmahaAuthGridHelper.TypeText("VoiceAuthFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter AVS Electronic Fees");
                masterData_OmahaAuthGridHelper.TypeText("AVSElectronicFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "Enter AVS Voice Fees");
                masterData_OmahaAuthGridHelper.TypeText("AVSVoiveFees", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);


                executionLog.Log("CreateOmahaAuthGrid", "Enter AVS Voive Fees");
                masterData_OmahaAuthGridHelper.TypeText("ARUFee", code);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(500);

                executionLog.Log("CreateOmahaAuthGrid", "  Click on Save button");
                masterData_OmahaAuthGridHelper.ClickElement("Save");
                masterData_OmahaAuthGridHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateOmahaAuthGrid", "Wait for text");
                masterData_OmahaAuthGridHelper.WaitForText("Master Omaha Auth Grid Created Successfully.", 10);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(1000);

                executionLog.Log("CreateOmahaAuthGrid", "Click on delete icon");
                masterData_OmahaAuthGridHelper.ClickElement("DeleteIcon");
                masterData_OmahaAuthGridHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateOmahaAuthGrid", "Click ok to accept alert");
                masterData_OmahaAuthGridHelper.AcceptAlert();
                masterData_OmahaAuthGridHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateOmahaAuthGrid", "Wait for delete message. ");
                masterData_OmahaAuthGridHelper.WaitForText("Master Omaha Auth Grid Deleted Successfully.", 10);
                masterData_OmahaAuthGridHelper.WaitForWorkAround(3000);

                VisitOffice("logout");
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CreateOmahaAuthGrid");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Create Omaha AuthGrid");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Create Omaha AuthGrid", "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("Create Omaha AuthGrid");
                        TakeScreenshot("CreateOmahaAuthGrid");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreateOmahaAuthGrid.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CreateOmahaAuthGrid");
                        string id            = loginHelper.getIssueID("Create Omaha AuthGrid");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreateOmahaAuthGrid.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Create Omaha AuthGrid"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Create Omaha AuthGrid");
                // executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CreateOmahaAuthGrid");
                executionLog.WriteInExcel("Create Omaha AuthGrid", Status, JIRA, "Office Master Data");
            }
        }