public void editMeetingVerfiyValidation()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

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

            // Random Variables
            var ExeFile = GetPathToFile() + "chrome.exe";

            Console.WriteLine("Path is " + ExeFile);
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditMeetingVerfiyValidation", "Click on Activities >> Meetings");
                VisitOffice("meetings");

                executionLog.Log("EditMeetingVerfiyValidation", "Click on Edit meeting icon");
                officeActivities_MeetingHelper.ClickElement("Edit");

                executionLog.Log("EditMeetingVerfiyValidation", "Click on Add Attachment");
                officeActivities_MeetingHelper.ClickElement("AddAttachment");
                officeActivities_MeetingHelper.WaitForWorkAround(4000);

                executionLog.Log("EditMeetingVerfiyValidation", "Click on Add Attachment");
                officeActivities_MeetingHelper.TypeText("EnterDocumentName", "Test");
                officeActivities_MeetingHelper.WaitForWorkAround(4000);

                executionLog.Log("EditMeetingVerfiyValidation", "Upload an invalid file.");
                officeActivities_MeetingHelper.Upload("File_Upload", ExeFile);
                officeActivities_MeetingHelper.WaitForWorkAround(4000);

                executionLog.Log("EditMeetingVerfiyValidation", "Click on Add Attachment");
                officeActivities_MeetingHelper.ClickElement("SaveAttachment");

                executionLog.Log("EditMeetingVerfiyValidation", "Verify mandatory text on the page.");
                officeActivities_MeetingHelper.VerifyText("Attachmenterror", "This field is required.");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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


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

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

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

                executionLog.Log("EditPDFNameIssue", "Go To Admin page");
                VisitOffice("admin");

                executionLog.Log("EditPDFNameIssue", "Go To Pdf template page");
                VisitOffice("pdf_templates");

                executionLog.Log("EditPDFNameIssue", "Verify title");
                VerifyTitle("PDF Templates");

                executionLog.Log("EditPDFNameIssue", "Edit First Template");
                pDFTemplate_PDFTemplateHelper.ClickElement("EditFirstTemplate");

                executionLog.Log("EditPDFNameIssue", "Verify title");
                VerifyTitle("Edit PDF Template");

                executionLog.Log("EditPDFNameIssue", "Remove name");
                pDFTemplate_PDFTemplateHelper.removeText("PdfName");

                executionLog.Log("EditPDFNameIssue", "Click on Save button");
                pDFTemplate_PDFTemplateHelper.ClickElement("SavebuttonEDit");

                executionLog.Log("EditPDFNameIssue", "Verify Pdf not save");
                VerifyTitle("Edit PDF Template");

                executionLog.Log("EditPDFNameIssue", "Verify validation message displayed");
                pDFTemplate_PDFTemplateHelper.verifyElementPresent("NameError");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditPDFNameIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit PDF Name Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Edit PDF Name Issue", "Bug", "Medium", "Pdf Template page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit PDF Name Issue");
                        TakeScreenshot("EditPDFNameIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditPDFNameIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditPDFNameIssue");
                        string id            = loginHelper.getIssueID("Edit PDF Name Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditPDFNameIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit PDF Name Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit PDF Name Issue");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditPDFNameIssue");
                executionLog.WriteInExcel("Edit PDF Name Issue", Status, JIRA, "PDF Template");
            }
        }
        public void verifySalutaionForLead()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

            // Variable

            var    FirstName = "Test" + RandomNumber(1111, 99999);
            var    Company   = "Lead COmp" + RandomNumber(221212, 999999);
            String JIRA      = "";
            String Status    = "Pass";

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

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

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Click On Create");
                VisitOffice("leads/create");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Select Salutation");
                office_LeadsHelper.Select("Salutaion", "Mr");

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Enter First Name");
                office_LeadsHelper.TypeText("FirstNameLead", FirstName);

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Enter Last Name");
                office_LeadsHelper.TypeText("LastName", "Last");

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Enter Company Name ");
                office_LeadsHelper.TypeText("CompanyName", Company);

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

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Select Responsibity");
                office_LeadsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Click on save button");
                office_LeadsHelper.ClickElement("Save");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Verify Save button working");
                VerifyTitle("Details");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Redirect to leads page.");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateLeadWithRequiredFieldNewSkin", "Enter Company Name in search field ");
                office_LeadsHelper.TypeText("CompanySearch", Company);
                office_LeadsHelper.WaitForWorkAround(5000);

                office_LeadsHelper.ClickElement("Lead1");
                office_LeadsHelper.WaitForWorkAround(5000);

                office_LeadsHelper.IsElementPresent("//div[contains(text(),'Mr')]");
            }


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

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

            var oXMLData = new XMLParse();

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

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

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

            // Variable
            var    Subject = "Meeting" + RandomNumber(1, 999);
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("LeadsMeetingUrlChange", "Go to all Leads");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Click On Any Lead");
                office_LeadsHelper.ClickElement("ClickAnyLead");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsMeetingUrlChange", "Click On New Meeting");
                office_LeadsHelper.ClickElement("AddMeeting");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Enter Meeting Subject");
                officeActivities_MeetingHelper.TypeText("Subject", Subject);

                executionLog.Log("LeadsMeetingUrlChange", "Enter Start Date");
                officeActivities_MeetingHelper.TypeText("StartDate", "08/08/2018");

                executionLog.Log("LeadsMeetingUrlChange", "Enter Start Date");
                officeActivities_MeetingHelper.TypeText("EndDate", "09/09/2018");

                executionLog.Log("LeadsMeetingUrlChange", "Click Save");
                officeActivities_MeetingHelper.ClickElement("Save");

                executionLog.Log("LeadsMeetingUrlChange", "Wait for success text.");
                officeActivities_MeetingHelper.WaitForText("Meeting saved successfully. ", 10);

                executionLog.Log("LeadsMeetingUrlChange", "Select Activity >> Meetings");
                officeActivities_MeetingHelper.Select("SelectActivityType", "Meetings");

                executionLog.Log("LeadsMeetingUrlChange", "Click On Document ");
                officeActivities_MeetingHelper.PressEnter("ClickMeeting1");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Change the url with the url number of another office");
                VisitOffice("meetings/view/1");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Verify Validation");
                officeActivities_MeetingHelper.WaitForText("You don't have privileges to view this Meeting.", 10);

                executionLog.Log("LeadsMeetingUrlChange", "Redirect at meetings page.");
                VisitOffice("meetings");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Search meeting by subject");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Select All in owner field");
                officeActivities_MeetingHelper.SelectByText("Owner", "All");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsMeetingUrlChange", "Click on the meeting");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsMeetingUrlChange", "Click On Cance meeting.");
                officeActivities_MeetingHelper.ClickElement("CancelMeeting");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("LeadsMeetingUrlChange", "Redirect at recycle bin.");
                VisitOffice("meetings/recyclebin");
                officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Verify page title");
                VerifyTitle("Recycled Meeting");
                //officeActivities_MeetingHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsMeetingUrlChange", "Search meeting by name.");
                officeActivities_MeetingHelper.TypeText("SearchSubject", Subject);
                officeActivities_MeetingHelper.WaitForWorkAround(2000);

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

                executionLog.Log("LeadsMeetingUrlChange", "Wait for delete icon to be present.");
                officeActivities_MeetingHelper.WaitForElementPresent("DeleteMeetingPermanently", 10);

                executionLog.Log("LeadsMeetingUrlChange", "Click On delete icon");
                officeActivities_MeetingHelper.ClickElement("DeleteMeetingPermanently");

                executionLog.Log("LeadsMeetingUrlChange", "Accept alert message.");
                officeActivities_MeetingHelper.AcceptAlert();

                executionLog.Log("LeadsMeetingUrlChange", "Verify text.");
                officeActivities_MeetingHelper.WaitForText("Meeting Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("LeadsMeetingUrlChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Leads Meeting Url Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Leads Meeting Url Change", "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("Leads Meeting Url Change");
                        TakeScreenshot("LeadsMeetingUrlChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LeadsMeetingUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("LeadsMeetingUrlChange");
                        string id            = loginHelper.getIssueID("Leads Meeting Url Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LeadsMeetingUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Leads Meeting Url Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Leads Meeting Url Change");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("LeadsMeetingUrlChange");
                executionLog.WriteInExcel("Leads Meeting Url Change", Status, JIRA, "Leads Meeting");
            }
        }
Example #5
0
        public void partnerAgentCodeInQuickLook()
        {
            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("PartnerAgentCodeInQuickLook", "Login with valid credential  Username");
                Login(username[0], password[0]);

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

                executionLog.Log("PartnerAgentCodeInQuickLook", "Goto Opportinuties");
                VisitOffice("opportunities");

                executionLog.Log("PartnerAgentCodeInQuickLook", "Open Opportunity");
                office_OpportunitiesHelper.ClickElement("Opportunities1");
                office_OpportunitiesHelper.WaitForWorkAround(5000);

                executionLog.Log("PartnerAgentCodeInQuickLook", "Edit Opportunity");
                office_OpportunitiesHelper.clickJS("OppEdit");
                office_OpportunitiesHelper.WaitForWorkAround(3000);
                executionLog.Log("PartnerAgentCodeInQuickLook", "Enter Partner Agent Code.");
                office_OpportunitiesHelper.TypeText("PartnerAgentCode_Field", "233");

                executionLog.Log("PartnerAgentCodeInQuickLook", "Select the status");
                office_OpportunitiesHelper.SelectByText("State", "New");

                executionLog.Log("PartnerAgentCodeInQuickLook", "Click On Save Button");
                office_OpportunitiesHelper.clickJS("ClickSaveClient");
                office_OpportunitiesHelper.WaitForWorkAround(9000);

                executionLog.Log("PartnerAgentCodeInQuickLook", "Verify added code in Quick Look.");
                office_OpportunitiesHelper.VerifyPageText("223");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AmexRateCorp");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Amex Rate Corp");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Amex Rate Corp", "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("Amex Rate Corp");
                        TakeScreenshot("AmexRateCorp");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AmexRateCorp.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AmexRateCorp");
                        string id            = loginHelper.getIssueID("Amex Rate Corp");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AmexRateCorp.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Amex Rate Corp"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Amex Rate Corp");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AmexRateCorp");
                executionLog.WriteInExcel("Amex Rate Corp", Status, JIRA, "Corp Master Data");
            }
        }
Example #6
0
        public void multipleIframeDeleteError()
        {
            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());
            var corpIntegration_IframeAppsHelper = new CorpIntegration_IframeAppsHelper(GetWebDriver());

            // Variable
            var name     = "Test" + GetRandomNumber();
            var name2    = "Iframe" + GetRandomNumber();
            var usrname  = "Test.Tester" + GetRandomNumber();
            var Tab      = "Tab" + RandomNumber(99, 999);
            var Tab2     = "Iframe" + RandomNumber(99, 999);
            var UserName = "******" + RandomNumber(99, 999);



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

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

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

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

                executionLog.Log("MultipleIframeDeleteError", "Redirect To URL");
                VisitOffice("iframes");

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

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

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

                executionLog.Log("MultipleIframeDeleteError", "Enter Tab Name");
                integration_IframeAppsHelper.TypeText("TabName", name);

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

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

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

                executionLog.Log("MultipleIframeDeleteError", "Click on mainportal");
                integration_IframeAppsHelper.ClickElement("mainportalCheckbox");

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

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

                executionLog.Log("MultipleIframeDeleteError", "Redirect To URL");
                VisitOffice("iframes");

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

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

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

                executionLog.Log("MultipleIframeDeleteError", "Enter Tab Name");
                integration_IframeAppsHelper.TypeText("TabName", name2);

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

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

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

                executionLog.Log("MultipleIframeDeleteError", "Click on mainportal");
                integration_IframeAppsHelper.ClickElement("mainportalCheckbox");

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

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

                executionLog.Log("MultipleIframeDeleteError", "Redirect To URL");
                VisitOffice("iframes");

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

                executionLog.Log("MultipleIframeDeleteError", "Click on first chk box.");
                integration_IframeAppsHelper.ClickElement("Chkbox1");

                executionLog.Log("MultipleIframeDeleteError", " Click on second chk box.  ");
                integration_IframeAppsHelper.ClickElement("ChkBox2");

                executionLog.Log("MultipleIframeDeleteError", "Clcik on delete button ");
                integration_IframeAppsHelper.ClickElement("DeleteMultiple");

                executionLog.Log("MultipleIframeDeleteError", "Accept alert message. ");
                integration_IframeAppsHelper.AcceptAlert();

                executionLog.Log("MultipleIframeDeleteError", "Wait for deletion success message. ");
                integration_IframeAppsHelper.WaitForText("2 Iframe(s) deleted successfully.", 10);

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

                executionLog.Log("MultipleIframeDeleteError", "Login with valid username and password");
                Login("newthemecorp", "mynewpegasus");

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

                executionLog.Log("MultipleIframeDeleteError", "Redirect at Iframe apps page.");
                VisitCorp("iframes");

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

                executionLog.Log("MultipleIframeDeleteError", "Click on create button.");
                corpIntegration_IframeAppsHelper.ClickJava("Create");

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

                executionLog.Log("MultipleIframeDeleteError", "Click on save button.");
                corpIntegration_IframeAppsHelper.ClickJava("Save");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("MultipleIframeDeleteError", "Verify required text for tab name");
                corpIntegration_IframeAppsHelper.VerifyText("TabNameError", "This field is required.");

                executionLog.Log("MultipleIframeDeleteError", "Verify required text for user name.");
                corpIntegration_IframeAppsHelper.VerifyText("UserNameerror", "This field is required.");

                executionLog.Log("MultipleIframeDeleteError", "Verify required text for password.");
                corpIntegration_IframeAppsHelper.VerifyText("PassWordError", "This field is required.");

                executionLog.Log("MultipleIframeDeleteError", "Verify required text for URL.");
                corpIntegration_IframeAppsHelper.VerifyText("URLError", "This field is required.");

                executionLog.Log("MultipleIframeDeleteError", "Click on Cancel button.");
                corpIntegration_IframeAppsHelper.ClickJava("Cancel");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("MultipleIframeDeleteError", "Verify Page title");
                VerifyTitle("Users");

                executionLog.Log("MultipleIframeDeleteError", "Redirect at Iframe apps page.");
                VisitCorp("iframes");

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

                executionLog.Log("MultipleIframeDeleteError", "Click on create button.");
                corpIntegration_IframeAppsHelper.ClickJava("Create");

                executionLog.Log("MultipleIframeDeleteError", "Verify Page title.");
                VerifyTitle("Create Iframe");

                executionLog.Log("MultipleIframeDeleteError", "Enter tab name.");
                corpIntegration_IframeAppsHelper.TypeText("TabName", Tab);

                executionLog.Log("MultipleIframeDeleteError", "Enter user name field name.");
                corpIntegration_IframeAppsHelper.TypeText("UserName", "User");

                executionLog.Log("MultipleIframeDeleteError", "Enter Password field name");
                corpIntegration_IframeAppsHelper.TypeText("Paasword", "PIN");

                executionLog.Log("MultipleIframeDeleteError", "Enter invalid URL.");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "Abcd@gmail");

                executionLog.Log("MultipleIframeDeleteError", "Verify validation for invalid url.");
                corpIntegration_IframeAppsHelper.VerifyText("URLError2", "Invalid URL");

                executionLog.Log("MultipleIframeDeleteError", "Enter a valid URL");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "https://www.google.co.in");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearOnOffice");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearClient");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearPartner");

                executionLog.Log("MultipleIframeDeleteError", "Enter User Name for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("UsrNAme", UserName);

                executionLog.Log("MultipleIframeDeleteError", "Enter Password for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("Passwrd", "Pegasus");

                executionLog.Log("MultipleIframeDeleteError", "Select which office to iframe displayed.");
                corpIntegration_IframeAppsHelper.ClickJava("AllOffices");

                executionLog.Log("MultipleIframeDeleteError", "Click on save button.");
                corpIntegration_IframeAppsHelper.ClickJava("Save");

                executionLog.Log("MultipleIframeDeleteError", "Wait for iframe creation success text.");
                corpIntegration_IframeAppsHelper.WaitForText("Iframe created successfully.", 10);

                executionLog.Log("MultipleIframeDeleteError", "Redirect at Iframe apps page.");
                VisitCorp("iframes");

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

                executionLog.Log("MultipleIframeDeleteError", "Click on create button.");
                corpIntegration_IframeAppsHelper.ClickJava("Create");

                executionLog.Log("MultipleIframeDeleteError", "Verify Page title.");
                VerifyTitle("Create Iframe");

                executionLog.Log("MultipleIframeDeleteError", "Enter tab name.");
                corpIntegration_IframeAppsHelper.TypeText("TabName", Tab2);

                executionLog.Log("MultipleIframeDeleteError", "Enter user name field name.");
                corpIntegration_IframeAppsHelper.TypeText("UserName", "User");

                executionLog.Log("MultipleIframeDeleteError", "Enter Password field name");
                corpIntegration_IframeAppsHelper.TypeText("Paasword", "PIN");

                executionLog.Log("MultipleIframeDeleteError", "Enter invalid URL.");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "Abcd@gmail");

                executionLog.Log("MultipleIframeDeleteError", "Verify validation for invalid url.");
                corpIntegration_IframeAppsHelper.VerifyText("URLError2", "Invalid URL");

                executionLog.Log("MultipleIframeDeleteError", "Enter a valid URL");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "https://www.google.co.in");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearOnOffice");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearClient");

                executionLog.Log("MultipleIframeDeleteError", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearPartner");

                executionLog.Log("MultipleIframeDeleteError", "Enter User Name for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("UsrNAme", UserName);

                executionLog.Log("MultipleIframeDeleteError", "Enter Password for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("Passwrd", "Pegasus");

                executionLog.Log("MultipleIframeDeleteError", "Select which office to iframe displayed.");
                corpIntegration_IframeAppsHelper.ClickJava("AllOffices");

                executionLog.Log("MultipleIframeDeleteError", "Click on save button.");
                corpIntegration_IframeAppsHelper.ClickJava("Save");

                executionLog.Log("MultipleIframeDeleteError", "Wait for iframe creation success text.");
                corpIntegration_IframeAppsHelper.WaitForText("Iframe created successfully.", 10);

                executionLog.Log("MultipleIframeDeleteError", "Click on first check box.");
                corpIntegration_IframeAppsHelper.ClickElement("Chkbox1");

                executionLog.Log("MultipleIframeDeleteError", "Click on second check box.");
                corpIntegration_IframeAppsHelper.ClickElement("ChkBox2");

                executionLog.Log("MultipleIframeDeleteError", "Click on delete icon.");
                corpIntegration_IframeAppsHelper.ClickJava("DeleteMultiple");
                corpIntegration_IframeAppsHelper.AcceptAlert();

                executionLog.Log("MultipleIframeDeleteError", "Wait for deletion sucess.");
                corpIntegration_IframeAppsHelper.WaitForText("2 Iframe(s) deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable random

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

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

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

                executionLog.Log("VerifyAddressLine1and2OnEmployeeCorp", "Go to office page");
                VisitCorp("employees");
                corp_EmployeeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyAddressLine1and2OnEmployeeCorp", "Verify title as offices");
                VerifyTitle("Employees");

                executionLog.Log("VerifyAddressLine1and2OnEmployeeCorp", "Click On Advanced Filter button");
                corp_EmployeeHelper.ClickElement("AdvanceFilter");
                corp_EmployeeHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyAddressLine1and2OnEmployeeCorp", "Verify options present");
                corp_EmployeeHelper.VerifyText("AvailableCols", "Address Line 1");
                corp_EmployeeHelper.VerifyText("AvailableCols", "Address Line 2");
            }

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

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

            var oXMLData = new XMLParse();

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

            username  = oXMLData.getData("settings/Credentials", "username_corp");
            username1 = 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_ImportWizardHelper     = new PDFTemplate_ImportWizardHelper(GetWebDriver());
            var pDFTemplate_PDFTemplateHelper      = new PDFTemplate_PDFTemplateHelper(GetWebDriver());
            var corpPDFTemplate_ImportWizardHelper = new CorpPDFTemplate_ImportWizardHelper(GetWebDriver());
            var corpPDFTemplate_CategoriesHelper   = new CorpPDFTemplate_CategoriesHelper(GetWebDriver());

            // Variable random
            var Category        = "Category" + RandomNumber(1, 99999);
            var name            = "TestMerchant" + GetRandomNumber();
            var FilePth         = GetPathToFile() + "real.pdf";
            var InvalidFilePath = GetPathToFile() + "clientsamples(2).csv";

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

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

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

                executionLog.Log("PDFImpotWizard", "Redirect at pdf categories pge.");
                VisitCorp("pdf_templates/categories");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Click Create PDF Template");
                corpPDFTemplate_CategoriesHelper.ClickElement("Create");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Enter PDF NAME");
                corpPDFTemplate_CategoriesHelper.TypeText("EnterName", Category);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                corpPDFTemplate_CategoriesHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                corpPDFTemplate_CategoriesHelper.WaitForText("Category Created Successfully", 10);

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module.");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");

                executionLog.Log("PDFImpotWizard", "Uplaod File");
                corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click on Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10);

                executionLog.Log("PDFImpotWizard", "Click on Next");
                corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//button[@title='Next']");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 05);

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10);

                executionLog.Log("PDFImpotWizard", "Click on Next button again");
                corpPDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2");

                executionLog.Log("PDFImpotWizard", "Verify confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("Signature Options saved successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Select Category");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectCatory", "Card Service Agreements");

                executionLog.Log("PDFImpotWizard", "Click on Save");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Verif Confirmation");
                corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Click Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");
                //corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Wait for validation text.");
                corpPDFTemplate_ImportWizardHelper.WaitForText("This field is required.", 10);

                executionLog.Log("PDFImpotWizard", "Click on cancel.");
                corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//a[@title='Cancel']");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Verify text on page.");
                corpPDFTemplate_ImportWizardHelper.VerifyText("VerifyTextPDFTemplatesHeader", "PDF Templates");

                executionLog.Log("PDFImpotWizard", "Visit pdf Template import page");
                VisitCorp("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module");
                corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");

                executionLog.Log("PDFImpotWizard", "Uplaod File");
                corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", InvalidFilePath);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click Import");
                corpPDFTemplate_ImportWizardHelper.ClickElement("Import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("PDFImpotWizard", "Logout from the application.");
                VisitCorp("logout");

                executionLog.Log("PDFImpotWizard", "Login to the office module.");
                Login(username1[0], password[0]);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(2000);

                executionLog.Log("PDFImpotWizard", "Goto PDF Categories");
                VisitOffice("pdf_templates/categories");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(4000);

                executionLog.Log("PDFImpotWizard", "Click Create PDF Template");
                pDFTemplate_PDFTemplateHelper.ClickElement("ClickCreatePDFImp");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Enter PDF Category Name");
                pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFCategoryName", Category);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                pDFTemplate_PDFTemplateHelper.ClickElement("PDFImportSave");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Goto pdf template import");
                VisitOffice("pdf_templates/import");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Module");
                pDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Upload file.");
                pDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth);
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click Import PDF");
                pDFTemplate_ImportWizardHelper.ClickElement("Import");

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10);

                executionLog.Log("PDFImpotWizard", "Click Next button");
                pDFTemplate_ImportWizardHelper.ClickElement("Next");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Verify Confirmation");
                pDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 10);

                executionLog.Log("PDFImpotWizard", "Wait for next button to appear.");
                pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10);

                executionLog.Log("PDFImpotWizard", "Click Next button");
                pDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000);

                executionLog.Log("PDFImpotWizard", "Select Category.");
                pDFTemplate_ImportWizardHelper.SelectByText("Category", "Card Service Agreements");
                corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFImpotWizard", "Click on Save");
                pDFTemplate_ImportWizardHelper.ClickElement("Save");

                executionLog.Log("PDFImpotWizard", "Wait for Confirmation");
                pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10);
            }

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

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

            // Variable random
            var    Email  = "addressTest" + GetRandomNumber() + "@yop.com";
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("OfficeStateVerifyCorp", "Craete Office");
                VisitCorp("offices/create");

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

                executionLog.Log("OfficeStateVerifyCorp", "Enter Name");
                corp_Office_OfficeHelper.TypeText("Name", "Office OFFICE");

                executionLog.Log("OfficeStateVerifyCorp", "Enter Address");
                corp_Office_OfficeHelper.Select("AddressType", "Office");

                executionLog.Log("OfficeStateVerifyCorp", "Enter AddressLine1");
                corp_Office_OfficeHelper.TypeText("AddressLine1", "FC-89");

                corp_Office_OfficeHelper.TypeText("ZIpCode", "60601");
                corp_Office_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("OfficeStateVerifyCorp", "Enter Username");
                corp_Office_OfficeHelper.TypeText("PrimaryUserName", "Tes");

                executionLog.Log("OfficeStateVerifyCorp", "Enter First NAME");
                corp_Office_OfficeHelper.TypeText("FirstName", "User");

                executionLog.Log("OfficeStateVerifyCorp", "Enter Last Name");
                corp_Office_OfficeHelper.TypeText("LastName", "Test");

                executionLog.Log("OfficeStateVerifyCorp", "Enter eAddress");
                corp_Office_OfficeHelper.TypeText("eAddress", Email);

                executionLog.Log("OfficeStateVerifyCorp", " Click on Save");
                corp_Office_OfficeHelper.ClickElement("Save");
                corp_Office_OfficeHelper.WaitForWorkAround(5000);

                executionLog.Log("OfficeStateVerifyCorp", "Verify text on the page");
                corp_Office_OfficeHelper.VerifyText("SelectState", "IL");
                corp_Office_OfficeHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

                executionLog.Log("SaleAgentWithoutUser", "Wait for element present.");
                agent_1099SaleAagentHelper.WaitForElementPresent("SelectSalutation", 5);

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

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

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

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

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

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

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

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

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

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

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

                agent_1099SaleAagentHelper.WaitForText("Please correct the errors.", 10);
                agent_1099SaleAagentHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("ActivitiesNotesManagement", "Go to notes page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesNotesManagement", " Click On Create");
                officeActivities_NotesHelper.ClickElement("Create");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Create a New Note");

                executionLog.Log("ActivitiesNotesManagement", "Click on Save  ");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify validation text for subject.");
                officeActivities_NotesHelper.VerifyText("SubjectError", "This field is required.");

                executionLog.Log("ActivitiesNotesManagement", "Enter note subject.");
                officeActivities_NotesHelper.TypeText("Subject", name);

                executionLog.Log("ActivitiesNotesManagement", "Click on save.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Wait for success text");
                officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

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

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent");
                officeActivities_NotesHelper.Select("NoteParent", "20");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any client.");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on save button.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at clients page.");
                VisitOffice("clients");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Click on any client.");
                office_ClientsHelper.ClickElement("Client1");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes.");
                office_ClientsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search.");
                office_ClientsHelper.TypeText("ActivitySubject", name);
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Verify created note present on client page.");
                office_ClientsHelper.IsElementPresent("OpenFirstActivity");

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                VerifyTitle("Edit Note");


                executionLog.Log("ActivitiesNotesManagement", "Select note parent as lead.");
                officeActivities_NotesHelper.Select("NoteParent", "14");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click on save button.");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at leads page.");
                VisitOffice("leads");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Click On any lead.");
                office_LeadsHelper.ClickElement("ClickAnyLead");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes.");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter note name to be search.");
                office_LeadsHelper.TypeText("ActivitySubject", name);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_LeadsHelper.SelectByText("CreatedByField", "All");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Verify created note present on leads page.");
                office_LeadsHelper.IsElementPresent("ClickNotes1");

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title");
                VerifyTitle("Notes");

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

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

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent as opportunity.");
                officeActivities_NotesHelper.Select("NoteParent", "15");

                executionLog.Log("ActivitiesNotesManagement", "Click on findlist icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any opportunity");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at opportunities page.");
                VisitOffice("opportunities");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Click On any opportunity.");
                office_OpportunitiesHelper.ClickElement("Opportunities1");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter notes name to be search.");
                office_OpportunitiesHelper.TypeText("ActivitySubject", name);
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_OpportunitiesHelper.SelectByText("CreateByField", "All");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Verify created note present on opportunity page");
                office_OpportunitiesHelper.IsElementPresent("OpenOpportunity");

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify title");
                VerifyTitle("Notes");

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

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

                executionLog.Log("ActivitiesNotesManagement", "Click on Edit");
                officeActivities_NotesHelper.ClickElement("Edit");
                VerifyTitle("Edit Note");

                executionLog.Log("ActivitiesNotesManagement", "Select note parent as tickets.");
                officeActivities_NotesHelper.Select("NoteParent", "36");

                executionLog.Log("ActivitiesNotesManagement", "Click on find list icon.");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", " Click On any ticket.");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Edit on Save Btn");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("ActivitiesNotesManagement", "Verify note updated successfully");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect at tickets page.");
                VisitOffice("tickets");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Click On any ticket.");
                ticket_CreateATicketHelper.ClickElement("Ticket1");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select actitivity type as notes");
                office_LeadsHelper.Select("SelectActivityType", "Notes");

                executionLog.Log("ActivitiesNotesManagement", "Enter ticket name to be search.");
                office_OpportunitiesHelper.TypeText("ActivitySubject", name);
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Select All in created by field");
                office_OpportunitiesHelper.SelectByText("CreateByField", "All");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Verify created note present on ticket page.");
                ticket_CreateATicketHelper.IsElementPresent("OpenTicket");

                executionLog.Log("ActivitiesNotesManagement", "Go to note page");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Verify page title.");
                VerifyTitle("Notes");

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

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

                executionLog.Log("ActivitiesNotesManagement", "Select First Note");
                officeActivities_NotesHelper.ClickElement("SelectNote1");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Click Delete btn  ");
                officeActivities_NotesHelper.ClickElement("DeleteNote");

                executionLog.Log("ActivitiesNotesManagement", "Accept alert message. ");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesNotesManagement", "Wait for delete message. ");
                officeActivities_NotesHelper.WaitForText("Note deleted successfully", 10);

                executionLog.Log("ActivitiesNotesManagement", "Redirect to recycle bin");
                VisitOffice("notes/recyclebin");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("ActivitiesNotesManagement", "Click on delete icon.");
                officeActivities_NotesHelper.ClickElement("DeleteNoteRBin");
                //officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesNotesManagement", "Accept alert message.");
                officeActivities_NotesHelper.AcceptAlert();
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesNotesManagement", "Wait for success message.");
                officeActivities_NotesHelper.WaitForText("Note Permanently Deleted.", 5);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VendorManagement", " Click on Save button");
                equipment_VendorsHelper.ClickElement("Save");
                equipment_VendorsHelper.WaitForWorkAround(1000);

                executionLog.Log("VendorManagement", "Verify validation text on page.");
                equipment_VendorsHelper.VerifyPageText("This field is required.");
                //equipment_VendorsHelper.WaitForWorkAround(3000);

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

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

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

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

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

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

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

                executionLog.Log("VendorManagement", "Verify EAddress Label");
                equipment_VendorsHelper.VerifyText("EAddressLabel", "Work");

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

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

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

                executionLog.Log("VendorManagement", "Verify State");
                equipment_VendorsHelper.VerifyText("VendorState", "IL");

                executionLog.Log("VendorManagement", "Enter website");
                equipment_VendorsHelper.TypeText("Website", "60601");

                executionLog.Log("VendorManagement", "Enter linkedin url");
                equipment_VendorsHelper.TypeText("LinkedURL", "60601");

                executionLog.Log("VendorManagement", "Enter twitter");
                equipment_VendorsHelper.TypeText("TwitterURL", "60601");

                executionLog.Log("VendorManagement", " Click on Save button   ");
                equipment_VendorsHelper.ClickElement("Save");
                equipment_VendorsHelper.WaitForWorkAround(1000);

                executionLog.Log("VendorManagement", " Click on Save button   ");
                equipment_VendorsHelper.VerifyPageText("Please enter a valid URL");
                //equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VendorManagement", "Enter website");
                equipment_VendorsHelper.TypeText("Website", "http://www.vendors.com");

                executionLog.Log("VendorManagement", "Enter linkedin url");
                equipment_VendorsHelper.TypeText("LinkedURL", "http://www.linkedin.com");

                executionLog.Log("VendorManagement", "Enter twitter");
                equipment_VendorsHelper.TypeText("TwitterURL", "http://www.twitter.com");

                executionLog.Log("VendorManagement", " Click on Save button   ");
                equipment_VendorsHelper.ClickElement("Save");

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

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

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

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

                executionLog.Log("VendorManagement", " Click on edit button   ");
                equipment_VendorsHelper.ClickElement("Edit");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VendorManagement", "Select Type");
                equipment_VendorsHelper.Select("Type", "");

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

                executionLog.Log("VendorManagement", " Click on Save button   ");
                equipment_VendorsHelper.ClickElement("Save");

                executionLog.Log("VendorManagement", "Verify validation text on page.");
                equipment_VendorsHelper.VerifyPageText("This field is required.");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VendorManagement", " Click on AddEmail ");
                equipment_VendorsHelper.ClickElement("AddEmail");
                equipment_VendorsHelper.WaitForWorkAround(1000);

                executionLog.Log("VendorManagement", "Select eAddress Type");
                equipment_VendorsHelper.SelectByText("EaddressType2", "Web Links");

                executionLog.Log("VendorManagement", "Select EAddress Label");
                equipment_VendorsHelper.VerifyText("EadrressLabel2", "Web Link");

                executionLog.Log("VendorManagement", "Enter E Address");
                equipment_VendorsHelper.TypeText("eAddress2", "*****@*****.**");

                executionLog.Log("VendorManagement", " Click on Save button.");
                equipment_VendorsHelper.ClickElement("Save");

                executionLog.Log("VendorManagement", "Wait for Success message.");
                equipment_VendorsHelper.WaitForText("Vendor is successfully updated", 10);

                executionLog.Log("VendorManagement", "Redirect To Vandor");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VendorManagement", "Click on first vendor");
                equipment_VendorsHelper.ClickElement("ClickOnVender");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VendorManagement", "Click on clone icon.");
                equipment_VendorsHelper.ClickElement("Copy");

                executionLog.Log("VendorManagement", "Wait for success message");
                equipment_VendorsHelper.WaitForText("Vendor cloned successfully", 10);

                executionLog.Log("VendorManagement", "Redirect To Vendor");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VendorManagement", "Select first vendor ");
                equipment_VendorsHelper.ClickElement("SelectChkBox");

                executionLog.Log("VendorManagement", "Click on bulk update.");
                equipment_VendorsHelper.ClickElement("ClickOnBulkUpdate");

                executionLog.Log("VendorManagement", "Select vendor type. ");
                equipment_VendorsHelper.ClickElement("VendorTypeSelect");
                equipment_VendorsHelper.WaitForWorkAround(2000);

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

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

                executionLog.Log("VendorManagement", "Wait for success message. ");
                equipment_VendorsHelper.VerifyPageText("Vendor Type updated successfully.");

                executionLog.Log("VendorManagement", "Click on delete icon.");
                equipment_VendorsHelper.ClickElement("Delete");
                equipment_VendorsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("VendorManagement", "Wait for delete message.");
                equipment_VendorsHelper.WaitForText("Vendor Deleted Successfully", 10);

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

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

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

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

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

                executionLog.Log("VendorManagement", "Wait for delete message. ");
                equipment_VendorsHelper.WaitForText("Vendor Deleted Successfully", 10);

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

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("DeleteCallInfoPage", "Redirect at calls page.");
                VisitOffice("calls");
                officeActivities_CallsHelper.WaitForWorkAround(4000);

                executionLog.Log("DeleteCallInfoPage", " verify title");
                VerifyTitle("Calls");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteCallInfoPage", "Click on create button.");
                officeActivities_CallsHelper.ClickElement("Create");
                officeActivities_CallsHelper.WaitForWorkAround(4000);

                executionLog.Log("DeleteCallInfoPage", "Select call type");
                officeActivities_CallsHelper.Select("CallType", "Personal");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

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

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

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

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

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

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

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

                executionLog.Log("DeleteCallInfoPage", "Click on save button.");
                officeActivities_CallsHelper.ClickElement("Save");
                officeActivities_CallsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("DeleteCallInfoPage", "Click on call to be deleted.");
                officeActivities_CallsHelper.ClickForce("Call1");

                executionLog.Log("DeleteCallInfoPage", "Click on delete button.");
                officeActivities_CallsHelper.ClickElement("Delete");
                officeActivities_CallsHelper.WaitForWorkAround(1000);

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

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

                executionLog.Log("DeleteCallInfoPage", "Redirect at recycle bin page.");
                VisitOffice("calls/recyclebin");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("DeleteCallInfoPage", "Click on delete icon.");
                officeActivities_CallsHelper.ClickElement("DeleteRecycle");
                officeActivities_CallsHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteCallInfoPage", "Accept alert message.");
                officeActivities_CallsHelper.AcceptAlert();

                executionLog.Log("DeleteCallInfoPage", "Wait success confirmation.");
                officeActivities_CallsHelper.WaitForText("Call Permanently Deleted.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("DeleteEquipmentNewSkin", "Redirect To equipment");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("DeleteEquipmentNewSkin", " Click On Create");
                eqiupment_EquipmentHelper.ClickElement("Create");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteEquipmentNewSkin", "Enter Equipment Name");
                eqiupment_EquipmentHelper.TypeText("Name", "Delete Equip");

                executionLog.Log("DeleteEquipmentNewSkin", "Select Type");
                eqiupment_EquipmentHelper.Select("Type", "Check Reader");

                executionLog.Log("DeleteEquipmentNewSkin", "Enter Equipment Id");
                eqiupment_EquipmentHelper.TypeText("EquipmentId", Id);

                executionLog.Log("DeleteEquipmentNewSkin", "Enter Version");
                eqiupment_EquipmentHelper.TypeText("Version", "Testing");

                executionLog.Log("DeleteEquipmentNewSkin", "Enter Description");
                eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description");

                executionLog.Log("DeleteEquipmentNewSkin", " Click on Save button.");
                eqiupment_EquipmentHelper.ClickElement("Save");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteEquipmentNewSkin", "Enter Name in seacrh field");
                eqiupment_EquipmentHelper.TypeText("SearchEquipment", "Delete Equip");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteEquipmentNewSkin", "Click on delete icon");
                eqiupment_EquipmentHelper.ClickElement("DeleteEuipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("DeleteEquipmentNewSkin", "Accept Alert Message.");
                eqiupment_EquipmentHelper.AcceptAlert();
                eqiupment_EquipmentHelper.WaitForWorkAround(1000);

                executionLog.Log("DeleteEquipmentNewSkin", "Verify text Equipment deleted.");
                eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("DeleteEquipmentNewSkin");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Delete Equipment New Skin");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Delete Equipment New Skin", "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("Delete Equipment New Skin");
                        TakeScreenshot("DeleteEquipmentNewSkin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DeleteEquipmentNewSkin.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("DeleteEquipmentNewSkin");
                        string id            = loginHelper.getIssueID("Delete Equipment New Skin");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\DeleteEquipmentNewSkin.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Delete Equipment New Skin"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Delete Equipment New Skin");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("DeleteEquipmentNewSkin");
                executionLog.WriteInExcel("Delete Equipment New Skin", Status, JIRA, "Equipment Management");
            }
        }
Example #15
0
        void checkMandatory(FieldValidationHelper helper, ExecutionLog log)
        {
            log.Log("FieldValidationFrame", "check validation:Mandatory");
            goToFP(helper, log);
            log.Log("FieldValidationFrame", "check mandatory");
            clearAllChoice(helper, log);
            helper.ClickElement("Mandatory");
            log.Log("FieldValidationFrame", "check field length");
            helper.ClickElement("FieldLength");
            helper.TypeText("LengthMin", "5");
            helper.TypeText("LengthMax", "10");
            log.Log("FieldValidationFrame", "save validation");
            helper.ClickElement("SaveVali");

            log.Log("FieldValidationFrame", "go to client");
            goToClient(helper, log);
            log.Log("FieldValidationFrame", "mandatory check:no input");
            helper.ClearText("LegalNameInput");
            helper.ClickElement("Save");
            helper.WaitForWorkAround(500);
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "mandatory no input pass");

            log.Log("FieldValidationFrame", "field length: check short input");
            helper.ClearText("LegalNameInput");
            helper.TypeText("LegalNameInput", "55");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "short input pass");

            log.Log("FieldValidationFrame", "field length: check long input");
            helper.ClearText("LegalNameInput");
            helper.TypeText("LegalNameInput", "jjiiawethfjiwe");
            helper.ClickElement("Save");
            string nameinput = helper.GetTextContent("LegalNameInput");

            Assert.IsTrue(nameinput.Length == 10);
            log.Log("FieldValidationFrame", "field length: long input pass");
        }
Example #16
0
        public void pushToOffice()
        {
            var oXMLData = new XMLParse();

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

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var corpMasterdata_LanguageHelper = new CorpMasterdata_LanguageHelper(GetWebDriver());
            var loginHelper = new LoginHelper(GetWebDriver());
            var corpMasterdata_MerchantTypeHelper  = new CorpMasterdata_MerchantTypeHelper(GetWebDriver());
            var corpMasterData_AmexRateHelper      = new CorpMasterData_AmexRateHelper(GetWebDriver());
            var corpMasterdata_OmahaAuthGridHelper = new CorpMasterdata_OmahaAuthGridHelper(GetWebDriver());
            var corpMasterdata_PricingPlanHelper   = new CorpMasterdata_PricingPlanHelper(GetWebDriver());

            string[] username = null;
            string[] password = null;
            username = oXMLData.getData("settings/Credentials", "username_corp");
            password = oXMLData.getData("settings/Credentials", "password");

            // Variable
            var    Num    = RandomNumber(1, 9999).ToString();
            var    Nam    = "New" + GetRandomNumber();
            var    name   = "Test" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

                executionLog.Log("PushToOffice", "Verify Page title");
                VerifyTitle("Dashboard");
                corpMasterdata_LanguageHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateLanguageCorp", "Redirect To Language");
                VisitCorp("languages");
                corpMasterdata_LanguageHelper.WaitForWorkAround(3000);

                executionLog.Log("PushToOffice", "Verify Page title");
                VerifyTitle("Languages");

                executionLog.Log("LanguagePushToOffice", "Click on Push To Office");
                corpMasterdata_LanguageHelper.ClickElement("PushToOfficeLang");

                executionLog.Log("LanguagePushToOffice", "Click ok To Confirm");
                corpMasterdata_LanguageHelper.AcceptAlert();

                executionLog.Log("LanguagePushToOffice", "Verify Confirmation Languges Successfully Pushed to Offices.");
                corpMasterdata_LanguageHelper.WaitForText("Languges Successfully Pushed to Offices.", 30);

                executionLog.Log("CreateMerchnatType", "Redirect to marchant type page");
                VisitCorp("masterdata/merchant_types");
                corpMasterdata_LanguageHelper.WaitForWorkAround(3000);

                executionLog.Log("PushToOffice", "Verify Page title");
                VerifyTitle("Master Merchant Types");

                executionLog.Log("CreateMerchnatType", "Click On Push Office");
                corpMasterdata_MerchantTypeHelper.ClickElement("PushOffice");

                executionLog.Log("LanguagePushToOffice", "Click ok To Confirm");
                corpMasterdata_MerchantTypeHelper.AcceptAlert();

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

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

                executionLog.Log("OmahaAuthGridPushToOffice", "Push To Office");
                corpMasterdata_OmahaAuthGridHelper.ClickElement("PushToOffice");

                executionLog.Log("OmahaAuthGridPushToOffice", "Click ok To Confirm");
                corpMasterdata_OmahaAuthGridHelper.AcceptAlert();

                executionLog.Log("OmahaAuthGridPushToOffice", "Verify Confirmation Languges Successfully Pushed to Offices.");
                corpMasterdata_OmahaAuthGridHelper.WaitForText("Omaha Auth Grids successfully pushed to offices.", 40);

                executionLog.Log("PricingPlanPushToOffice", "Procing plan page");
                VisitCorp("masterdata/pricing_plans");
                corpMasterdata_LanguageHelper.WaitForWorkAround(3000);

                executionLog.Log("PushToOffice", "Verify Page title");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("PricingPlanPushToOffice", "Click On Push Office");
                corpMasterdata_PricingPlanHelper.ClickElement("PushOffice");

                executionLog.Log("PushToOffice", "Accept alert message.");
                corpMasterdata_PricingPlanHelper.AcceptAlert();

                executionLog.Log("PushToOffice", "Wait for success message.");
                corpMasterdata_PricingPlanHelper.WaitForText("Pricing Plans successfully pushed to offices.", 40);
            }

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

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

            // VARIABLE
            var Theme = "Theme" + GetRandomNumber();


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

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

                executionLog.Log("ThemeDeleteError", "Redirect  To Theme");
                VisitOffice("themes");
                system_ThemesHelper.WaitForWorkAround(3000);

                executionLog.Log("ThemeDeleteError", "Verify title");
                VerifyTitle("Themes");

                executionLog.Log("ThemeDeleteError", "Search the theme");
                system_ThemesHelper.TypeText("EnterThemeSearch", "ThemeOffice");
                system_ThemesHelper.WaitForWorkAround(2000);

                var loc = "//table[@id='list1']//tr[2]//td[6]";
                if (system_ThemesHelper.IsElementPresent(loc))
                {
                    executionLog.Log("ThemeDeleteError", "Search the theme");
                    system_ThemesHelper.TypeText("EnterThemeSearch", "ThemeOffice");
                    system_ThemesHelper.WaitForWorkAround(4000);

                    executionLog.Log("ThemeDeleteError", "Click on first theme delete icon");
                    system_ThemesHelper.ClickElement("DeleteTheme");
                    system_ThemesHelper.WaitForWorkAround(5000);

                    executionLog.Log("ThemeDeleteError", "Verify Alert text");
                    system_ThemesHelper.VerifyAlertText("Are you sure want to delete this theme permanently?");
                }
                else
                {
                    VisitOffice("themes");
                    system_ThemesHelper.WaitForWorkAround(4000);

                    executionLog.Log("ThemeDeleteError", "Click on edit icon of the theme");
                    system_ThemesHelper.ClickEditIcon();
                    system_ThemesHelper.WaitForWorkAround(4000);

                    executionLog.Log("ThemeDeleteError", "Enter new theme name");
                    system_ThemesHelper.TypeText("ThemeName", "ThemeOffice");

                    executionLog.Log("ThemeDeleteError", "Click on Save as new button");
                    system_ThemesHelper.ClickElement("CLickSaveButton");

                    executionLog.Log("ThemeDeleteError", "Verify theme saved");
                    system_ThemesHelper.WaitForText("Theme Configuration has been updated.", 10);

                    executionLog.Log("ThemeDeleteError", "Click on first theme delete icon");
                    system_ThemesHelper.ClickElement("DeleteTheme");
                    system_ThemesHelper.WaitForWorkAround(3000);

                    executionLog.Log("ThemeDeleteError", "Verify Alert text");
                    system_ThemesHelper.VerifyAlertText("Are you sure want to delete this theme permanently?");
                }
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

                executionLog.Log("VerifyEmailTemplateDynamicTag", "Redirect To Email templates page");
                VisitOffice("email_templates");
                system_EmailTemplatesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEmailTemplateDynamicTag", "Edit First Email Template");
                system_EmailTemplatesHelper.ClickElement("EditEmailTemp1");
                system_EmailTemplatesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEmailTemplateDynamicTag", "Click on Email Parameters link");
                system_EmailTemplatesHelper.ClickElement("EmailParametersLink");
                system_EmailTemplatesHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyEmailTemplateDynamicTag", "Verify Tags contain curly braces");
                system_EmailTemplatesHelper.VerifyText("Constant1", "{");
                system_EmailTemplatesHelper.VerifyText("Constant1", "}");
                system_EmailTemplatesHelper.VerifyText("Constant2", "{");
                system_EmailTemplatesHelper.VerifyText("Constant2", "}");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyEmailTemplateDynamicTag");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Email Template Dynamic Tag");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Email Template Dynamic Tag", "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 Email Template Dynamic Tag");
                        TakeScreenshot("VerifyEmailTemplateDynamicTag");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEmailTemplateDynamicTag.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyEmailTemplateDynamicTag");
                        string id            = loginHelper.getIssueID("Verify Email Template Dynamic Tag");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEmailTemplateDynamicTag.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Email Template Dynamic Tag"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Email Template Dynamic Tag");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyEmailTemplateDynamicTag");
                executionLog.WriteInExcel("Verify Email Template Dynamic Tag", Status, JIRA, "Office Email Templates");
            }
        }
        public void editAmexRatesCorpVerifyInOffice()
        {
            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_MasterData_AmexRateHelper = new CorpMasterData_AmexRateHelper(GetWebDriver());

            // Variable
            var    Num    = RandomNumber(1000, 9999).ToString();
            var    Nam    = "1" + RandomNumber(1000, 9999);
            var    name   = "1" + RandomNumber(1000, 9999);
            var    NewNum = RandomNumber(1000, 9999).ToString();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Redirect to create Amex Rates page");
                VisitCorp("masterdata/manage_amex_rates");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(5000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify title Manage Master Amex Rates");
                VerifyTitle("Manage Master Amex Rates");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Enter Processor name");
                corp_MasterData_AmexRateHelper.TypeText("MCCCode", Num);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Enter ProcessorCode");
                corp_MasterData_AmexRateHelper.TypeText("AmexRate", name);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Enter Amex Per Rate");
                corp_MasterData_AmexRateHelper.TypeText("AmexPerItem", Nam);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Click On Save Btn");
                corp_MasterData_AmexRateHelper.ClickElement("Save1");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(6000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify Text The Amex Rates is successfully created!!");
                corp_MasterData_AmexRateHelper.WaitForText("The Amex Rates is successfully created!!", 5);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Search with  MCC Codes");
                corp_MasterData_AmexRateHelper.TypeText("SecrhMCCCodes", Num);
                corp_MasterData_AmexRateHelper.WaitForWorkAround(4000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Click on Edit Icon");
                corp_MasterData_AmexRateHelper.ClickElement("Edit");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(5000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Enter ProcessorCode");
                corp_MasterData_AmexRateHelper.TypeText("AmexRate", NewNum);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Enter Amex Per Rate");
                corp_MasterData_AmexRateHelper.TypeText("AmexPerItem", NewNum);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Click on Save Edited value.");
                corp_MasterData_AmexRateHelper.ClickElement("Save1");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(5000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify The Amex Rates is successfully updated!!");
                corp_MasterData_AmexRateHelper.WaitForText("The Amex Rates is successfully updated!!", 5);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Click To Push To Office Frm Corp");
                corp_MasterData_AmexRateHelper.ClickElement("PushOffice");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Accept alert message.");
                corp_MasterData_AmexRateHelper.AcceptAlert();

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Wait for success message.");
                corp_MasterData_AmexRateHelper.WaitForText("Amex Rates successfully pushed to offices.", 40);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Logout from application.");
                VisitCorp("logout");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Login with valid username and password");
                Login(username[0], password[0]);
                corp_MasterData_AmexRateHelper.WaitForWorkAround(3000);

                if (GetWebDriver().Title == "Login")
                {
                    Login(username[0], password[0]);
                }

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Redirect Amex Rate");
                VisitOffice("amex_rates");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify page title.");
                VerifyTitle("Master Amex Rates");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Search with  MCC Codes");
                corp_MasterData_AmexRateHelper.TypeText("SecrhMCCCodes", Num);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify Page text");
                corp_MasterData_AmexRateHelper.VerifyPageText(NewNum);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Logout from the application.");
                VisitOffice("logout");
                corp_MasterData_AmexRateHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Redirect to create Amex Rates page");
                VisitCorp("masterdata/manage_amex_rates");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Verify title Manage Master Amex Rates");
                VerifyTitle("Manage Master Amex Rates");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Search with  MCC Codes");
                corp_MasterData_AmexRateHelper.TypeText("SecrhMCCCodes", Num);
                corp_MasterData_AmexRateHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Click on delete icon.");
                corp_MasterData_AmexRateHelper.ClickElement("Delete");

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Accept alert message.");
                corp_MasterData_AmexRateHelper.AcceptAlert();

                executionLog.Log("EditAmexRatesCorpVerifyInOffice", "Accept alert message.");
                corp_MasterData_AmexRateHelper.WaitForText("The Amex Rates is successfully deleted!!", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

            var oXMLData = new XMLParse();

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

            username1 = oXMLData.getData("settings/Credentials", "username_office");
            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 office_ClientsHelper          = new Office_ClientsHelper(GetWebDriver());
            var officeActivities_EmailsHelper = new OfficeActivities_EmailsHelper(GetWebDriver());


            var DBA   = "ClientDBA" + RandomNumber(111, 999999);
            var email = DBA + "@yopmail.com";

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

            try
            {
                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Login to office portal with valid username and password");
                Login(username1[0], password[0]);

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

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to Create Merchant page");
                VisitOffice("clients/create");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter DBA name");
                office_ClientsHelper.TypeText("ClientDBAName", DBA);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Select the client status");
                office_ClientsHelper.SelectByText("Status", "New");

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "select the responsibility");
                office_ClientsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on save btn");
                office_ClientsHelper.ClickElement("Save");
                office_ClientsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter Legal Name");
                office_ClientsHelper.TypeText("ClientLegalName", DBA);
                //office_ClientsHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Save button");
                office_ClientsHelper.ClickElement("CDSave");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Send Email button");
                office_ClientsHelper.ClickElement("CDSendEmailBtn");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Enter email in To");
                officeActivities_EmailsHelper.TypeText("To", email);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on Send button");
                officeActivities_EmailsHelper.ClickElement("Send");
                officeActivities_EmailsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Logout from office portal");
                VisitOffice("logout");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Login to corp portal with valid username and password");
                Login(username[0], password[0]);

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

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to All Merchant page");
                VisitCorp("merchants");
                corp_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Redirect to Create Merchant page");
                corp_MerchantHelper.TypeText("EnterClinentToSearch", DBA);
                corp_MerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Open created merchant");
                corp_MerchantHelper.ClickElement("OpenMerchant");
                corp_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Open sent email");
                corp_MerchantHelper.ClickElement("ClickOnActivityAny");
                corp_MerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Verify Legal Name");
                corp_MerchantHelper.VerifyText("LegalName", DBA);
                Console.WriteLine("Legal Name is appearing on View Email page");

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Logout from the corp portal");
                VisitCorp("logout");
                corp_MerchantHelper.WaitForWorkAround(3000);

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

                VisitOffice("clients");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Search the company Name");
                office_ClientsHelper.TypeText("SearchClient", DBA);
                office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Click on check box");
                office_ClientsHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("VerifyLegalNameOnEmailOnCorpMerchant", "Delete the client");
                office_ClientsHelper.ClickJS("DeleteClient");
                office_ClientsHelper.AcceptAlert();
                office_ClientsHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            // Initializing the objects
            var executionLog = new ExecutionLog();
            var loginHelper = new LoginHelper(GetWebDriver());
            var CorpMasterdata_PricingPlanHelper = new CorpMasterdata_PricingPlanHelper(GetWebDriver());
            username = oXMLData.getData("settings/Credentials", "username_corp");
            password = oXMLData.getData("settings/Credentials", "password");

            // Variable
            var name = "Test" + RandomNumber(99, 999);
            var Test = "New" + RandomNumber(99, 999);
            var NewNmae = "New Name" + RandomNumber(1, 999);

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

            try
            {

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

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

                executionLog.Log("CreatePricingPlan", "Procing plan page");
                VisitCorp("masterdata/pricing_plans");
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeletePricingPlan", "Verify Page title");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("CreatePricingPlan", "Click On Create");
                CorpMasterdata_PricingPlanHelper.ClickElement("Create");
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeletePricingPlan", "Verify Page title");
                VerifyTitle("Manage Master Pricing Plans");

                executionLog.Log("CreatePricingPlan", "Enter Pricing plan name");
                CorpMasterdata_PricingPlanHelper.TypeText("PricingPlan", name);

                executionLog.Log("CreatePricingPlan", "Select Processor Code");
                CorpMasterdata_PricingPlanHelper.SelectByText("SelectProcessor", "First Data Omaha");

                executionLog.Log("CreatePricingPlan", "Click On Save Btn");
                CorpMasterdata_PricingPlanHelper.ClickElement("Save");
                //CorpMasterdata_PricingPlanHelper.WaitForWorkAround(5000);

                executionLog.Log("CreatePricingPlan", "Wait for success message.");
                CorpMasterdata_PricingPlanHelper.WaitForText("The pricing plan is successfully created!!", 10);
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAndDeletePricingPlan", "Search");
                CorpMasterdata_PricingPlanHelper.TypeText("SearchPricingPlan", name);
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAndDeletePricingPlan", "Click on Edit");
                CorpMasterdata_PricingPlanHelper.ClickElement("ClickOnEdit");

                executionLog.Log("EditAndDeletePricingPlan", "Enter Processor name");
                CorpMasterdata_PricingPlanHelper.TypeText("PricingPlan", NewNmae);

                executionLog.Log("CreatePricingPlan", "Enter Processor Code");
                CorpMasterdata_PricingPlanHelper.SelectByText("SelectProcessor", "First Data Omaha");
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(1000);

                executionLog.Log("EditAndDeletePricingPlan", "Click Save");
                CorpMasterdata_PricingPlanHelper.ClickElement("Save");
                

                executionLog.Log("EditAndDeletePricingPlan", "Verify text present");
                CorpMasterdata_PricingPlanHelper.WaitForText("The pricing plan is successfully updated!!", 10);
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAndDeletePricingPlan", "Search");
                CorpMasterdata_PricingPlanHelper.TypeText("SearchPricingPlan", NewNmae);
                CorpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("EditAndDeletePricingPlan", "Click to Delete pricing");
                CorpMasterdata_PricingPlanHelper.ClickElement("DeletePricing");
                //CorpMasterdata_PricingPlanHelper.WaitForWorkAround(3000);

                executionLog.Log("EditAndDeletePricingPlan", "Click ok to confirm");
                CorpMasterdata_PricingPlanHelper.AcceptAlert();

                executionLog.Log("EditAndDeletePricingPlan", "Verify page text");
                CorpMasterdata_PricingPlanHelper.WaitForText("The pricing plan is successfully deleted!!", 10);

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

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

            }
            finally
            {
                executionLog.DeleteFile("EditAndDeletePricingPlan");
                executionLog.WriteInExcel("Edit And Delete Pricing Plan", Status, JIRA, "Corp Master Data");
            }
        }
        public void verifyCreatedIframeForClientUser()
        {
            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 corpIntegration_IframeAppsHelper = new CorpIntegration_IframeAppsHelper(GetWebDriver());

            // Variable
            var Tab      = "Tab" + RandomNumber(99, 999);
            var UserName = "******" + RandomNumber(99, 999);

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

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

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Redirect at Iframe apps page.");
                VisitCorp("iframes");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on create button.");
                corpIntegration_IframeAppsHelper.ClickJava("Create");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on save button.");
                corpIntegration_IframeAppsHelper.ClickJava("Save");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify required text for tab name");
                corpIntegration_IframeAppsHelper.VerifyText("TabNameError", "This field is required.");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify required text for user name.");
                corpIntegration_IframeAppsHelper.VerifyText("UserNameerror", "This field is required.");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify required text for password.");
                corpIntegration_IframeAppsHelper.VerifyText("PassWordError", "This field is required.");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify required text for URL.");
                corpIntegration_IframeAppsHelper.VerifyText("URLError", "This field is required.");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on Cancel button.");
                corpIntegration_IframeAppsHelper.ClickJava("Cancel");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify Page title");
                VerifyTitle("Users");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Redirect at Iframe apps page.");
                VisitCorp("iframes");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on create button.");
                corpIntegration_IframeAppsHelper.ClickJava("Create");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify Page title.");
                VerifyTitle("Create Iframe");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter tab name.");
                corpIntegration_IframeAppsHelper.TypeText("TabName", Tab);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter user name field name.");
                corpIntegration_IframeAppsHelper.TypeText("UserName", "User");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter Password field name");
                corpIntegration_IframeAppsHelper.TypeText("Paasword", "PIN");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter invalid URL.");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "Abcd@gmail");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify validation for invalid url.");
                corpIntegration_IframeAppsHelper.VerifyText("URLError2", "Invalid URL");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter a valid URL");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "https://www.google.co.in");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Wait for locator to be present.");
                corpIntegration_IframeAppsHelper.WaitForElementPresent("TabAppearOnOffice", 10);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearOnOffice");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearClient");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on tab appear on chk box.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearPartner");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter User Name for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("UsrNAme", UserName);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter Password for Iframe.");
                corpIntegration_IframeAppsHelper.TypeText("Passwrd", "Pegasus");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Wait for locator to be present.");
                corpIntegration_IframeAppsHelper.WaitForElementPresent("AllOffices", 10);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Select which office to iframe displayed.");
                corpIntegration_IframeAppsHelper.ClickJava("AllOffices");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on save button.");
                corpIntegration_IframeAppsHelper.ClickJava("Save");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Wait for iframe creation success text.");
                corpIntegration_IframeAppsHelper.WaitForText("Iframe created successfully.", 10);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Logout from corp module.");
                VisitCorp("logout");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(7000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Login using client user credentials.");
                Login("agarry177649", "welcome2pegasus");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                if (GetWebDriver().Title == "Login")

                {
                    Login("agarry177649", "welcome2pegasus");
                }

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify page title.");
                VerifyTitle("Files Share");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify created iframe present on client user page.");
                corpIntegration_IframeAppsHelper.IsElementPresent("//span[text()='" + Tab + "']");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on the created iframe.");
                corpIntegration_IframeAppsHelper.ClickViaJavaScript("//span[text()='" + Tab + "']");

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify user iframe id present.");
                corpIntegration_IframeAppsHelper.WaitForElementPresent("UserID", 05);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Switch to the iframe..");
                corpIntegration_IframeAppsHelper.GetWebDriver().SwitchTo().Frame(0);
                corpIntegration_IframeAppsHelper.WaitForWorkAround(1000);

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Login using corp credentials.");
                Login(username[0], password[0]);

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

                executionLog.Log("VerifyCreatedIframeForClientUser", "Redirect at Iframe apps page.");
                VisitCorp("iframes");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                //executionLog.Log("VerifyCreatedIframeForClientUser", "Wait for locator to be present.");
                //corpIntegration_IframeAppsHelper.WaitForElementPresent("SearchTabName", 10);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Enter tab name to be searched.");
                corpIntegration_IframeAppsHelper.TypeText("SearchTabName", Tab);
                corpIntegration_IframeAppsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Click on delete icon.");
                corpIntegration_IframeAppsHelper.ClickJava("Delete");
                corpIntegration_IframeAppsHelper.AcceptAlert();

                executionLog.Log("VerifyCreatedIframeForClientUser", "Wait for deletion success.");
                corpIntegration_IframeAppsHelper.WaitForText("Iframe deleted successfully.", 10);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Logout from corp module.");
                VisitCorp("logout");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(7000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Login using client user credentials.");
                Login("agarry177649", "welcome2pegasus");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);


                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify page title.");
                VerifyTitle("Files Share");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCreatedIframeForClientUser", "Verify deleted iframe not present on client user page.");
                corpIntegration_IframeAppsHelper.ElementNotAvailable("//span[text()='" + Tab + "']");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

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

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


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

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

                executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Redirect to employee agents page.");
                VisitOffice("employees");
                agents_EmployeesHelper.WaitForWorkAround(3000);

                var loc = "//table[@id='list1']/tbody/tr[2]";
                agents_EmployeesHelper.WaitForElementPresent(loc, 10);
                if (agents_EmployeesHelper.IsElementPresent(loc))
                {
                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Sale Agent");
                    agents_EmployeesHelper.ClickElement("ClikOnEmployeeAgent");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create btn Adjmnt");
                    agents_EmployeesHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on SaleAgent");
                    agents_EmployeesHelper.ClickElement("ClickSaleManager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for element to present.");
                    agents_EmployeesHelper.WaitForElementPresent("EnterAdjustmentName", 10);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "EnterAdjustmentName");
                    agents_EmployeesHelper.TypeText("EnterAdjustmentName", Adjustment);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectProcessor");
                    agents_EmployeesHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectRuleType", "1");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Amount");
                    agents_EmployeesHelper.TypeText("EnterAmount", "20");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "AddRemove");
                    agents_EmployeesHelper.Select("AddRemove", "Add");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Save Btn ");
                    agents_EmployeesHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify message");
                    agents_EmployeesHelper.WaitForText("Master Adjustment Rules Created Successfully.", 10);

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

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

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

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

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

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for delete success.");
                    residualIncome_MasterDataHelper.WaitForText("Ruleset deleted successfully.", 10);
                }
                else
                {
                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create Employee Btn");
                    agents_EmployeesHelper.ClickElement("Create");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select Salutation");
                    agents_EmployeesHelper.Select("SelectSalutation", "Mr");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter FirstNAME");
                    agents_EmployeesHelper.TypeText("FirstNAME", "Employee Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter LastName");
                    agents_EmployeesHelper.TypeText("LastName", "Tester");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Date Of Birth");
                    agents_EmployeesHelper.TypeText("BirthDay", "1991-03-02");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select eAddressType");
                    agents_EmployeesHelper.Select("eAddressType", "E-Mail");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select eAddressLebel");
                    agents_EmployeesHelper.Select("eAddressLebel", "Work");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter eAddressType");
                    agents_EmployeesHelper.TypeText("eAddress", "*****@*****.**");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select SelectPhoneType");
                    agents_EmployeesHelper.Select("SelectPhoneType", "Work");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter PhoneNumber");
                    agents_EmployeesHelper.TypeText("PhoneNumber", "121212121");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Select Address Type");
                    agents_EmployeesHelper.Select("AddressType", "Office");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter AddressLine1");
                    agents_EmployeesHelper.TypeText("AddressLine1", "FC 89");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

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

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on save button.");
                    agents_EmployeesHelper.ClickElement("ClickSaveNskin");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Wait for success message");
                    agents_EmployeesHelper.WaitForText("The employee is successfully added", 10);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter agent name to search");
                    agents_EmployeesHelper.TypeText("EnterAgentName", "Employee Agent Tester");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    agents_EmployeesHelper.Select("SelectStatusAdjtmnt", "");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Sale Agent");
                    agents_EmployeesHelper.ClickElement("ClikOnEmployeeAgent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click On Create btn Adjmnt");
                    agents_EmployeesHelper.ClickElement("ClickOnCreatebtnAdjmnt");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Click on SaleAgent");
                    agents_EmployeesHelper.ClickElement("ClickSaleManager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "EnterAdjustmentName");
                    agents_EmployeesHelper.TypeText("EnterAdjustmentName", "Employee Sale Manager");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectAdjustmentFor", "Agent");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("AdjustmentType", "Transaction");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectReportingPeriod", "00");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectProcessor");
                    agents_EmployeesHelper.Select("SelectProcessor", "Any");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "SelectAdjustmentFor");
                    agents_EmployeesHelper.Select("SelectRuleType", "1");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Enter Amount");
                    agents_EmployeesHelper.TypeText("EnterAmount", "20");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "AddRemove");
                    agents_EmployeesHelper.Select("AddRemove", "Add");

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                    agents_EmployeesHelper.WaitForWorkAround(3000);

                    executionLog.Log("RevenueAdjustmentSaleManagerEmployeeAddPercentage", "Verify Message");
                    agents_EmployeesHelper.VerifyPageText("Master Adjustment Rules Created Successfully.");

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Redirect To URL");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(5000);

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

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify last name column is visible on the page.");
                equipment_VendorsHelper.IsElementPresent("HeadLastName");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify first name column is visible on the page.");
                equipment_VendorsHelper.IsElementPresent("HeadFirstName");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify modified column is visible on the page.");
                equipment_VendorsHelper.IsElementPresent("HeadModified");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Select first name in displayed columns.");
                equipment_VendorsHelper.SelectByText("DisplayedCols", "First Name");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Select last name in displayed columns.");
                equipment_VendorsHelper.SelectByText("DisplayedCols", "Last Name");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Select modified in displayed columns.");
                equipment_VendorsHelper.SelectByText("DisplayedCols", "Modified");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Click on Apply button.");
                equipment_VendorsHelper.ClickElement("Apply");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify status not present on page.");
                equipment_VendorsHelper.IsElementNotPresent("HeadStatus");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify last name not present on page.");
                equipment_VendorsHelper.IsElementNotPresent("HeadLastName");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify first name not present on page.");
                equipment_VendorsHelper.IsElementNotPresent("HeadFirstName");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify modified not present on page.");
                equipment_VendorsHelper.IsElementNotPresent("HeadModified");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Redirect To URL");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(5000);

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify default position of last name name column.");
                equipment_VendorsHelper.IsElementPresent("HeadLastName4");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify default position of status column.");
                equipment_VendorsHelper.IsElementPresent("HeadStatus5");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Redirect at vendors page again.");
                VisitOffice("vendors");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Select last name in displayed column.");
                equipment_VendorsHelper.SelectByText("DisplayedCols", "Last Name");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Move last name 1 step up.");
                equipment_VendorsHelper.ClickElement("MoveUp");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Move last name 1 step up.");
                equipment_VendorsHelper.ClickElement("MoveUp");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Move last name 1 step up.");
                equipment_VendorsHelper.ClickElement("MoveUp");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Select status in displayed column.");
                equipment_VendorsHelper.SelectByText("DisplayedCols", "Status");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Move status 1 step down.");
                equipment_VendorsHelper.ClickElement("MoveDown");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Click on Apply button.");
                equipment_VendorsHelper.ClickElement("Apply");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify changed position of last name name column.");
                equipment_VendorsHelper.IsElementPresent("HeadLastName2");
                equipment_VendorsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyEquipmentVendorsAdvanceFilterColumnOrder", "Verify changed position of status column.");
                equipment_VendorsHelper.IsElementPresent("HeadStatus6");
                equipment_VendorsHelper.WaitForWorkAround(3000);

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

            XMLParse oXMLData = new XMLParse();

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

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

            var    ProcessCode = "Code" + RandomNumber(1, 999);
            var    ProcessName = "Process" + GetRandomNumber();
            String JIRA        = "";
            String Status      = "Pass";

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

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

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

                executionLog.Log("CreateProcessorWithoutError", "Go to Processor page");
                VisitCorp("masterdata/processor_types");
                corpMasterData_ProcessorsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateProcessorWithoutError", "Verify title");
                VerifyTitle("Master Processors");

                executionLog.Log("CreateProcessorWithoutError", "Verify created Processor is available");
                bool available = corpMasterData_ProcessorsHelper.verifyAvatarAvailable(ProcessName);

                if (available)
                {
                    executionLog.Log("CreateProcessorWithoutError", "Delete the processor");
                    corpMasterData_ProcessorsHelper.deleteProcessor(ProcessName);
                }

                executionLog.Log("CreateProcessorWithoutError", "Go to create Processor page");
                VisitCorp("masterdata/manage_processors");
                corpMasterData_ProcessorsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateProcessorWithoutError", "Verify Title");
                VerifyTitle("Manage Processor");

                executionLog.Log("CreateProcessorWithoutError", "Enter Process name");
                corpMasterData_ProcessorsHelper.TypeText("ProcessorName", ProcessName);

                executionLog.Log("CreateProcessorWithoutError", "Enter Process Code");
                corpMasterData_ProcessorsHelper.TypeText("ProcessorCode", ProcessCode);

                executionLog.Log("CreateProcessorWithoutError", "Click on Save button");
                corpMasterData_ProcessorsHelper.ClickElement("Save");
                corpMasterData_ProcessorsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateProcessorWithoutError", "Verify title");
                VerifyTitle("Master Processors");

                executionLog.Log("CreateProcessorWithoutError", "Verify process added sussfully");
                Assert.IsTrue(corpMasterData_ProcessorsHelper.verifyAvatarAvailable(ProcessName));

                executionLog.Log("CreateProcessorWithoutError", "Delete created processor");
                corpMasterData_ProcessorsHelper.deleteProcessor(ProcessName);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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


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

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

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

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

                executionLog.Log("IntegrationCodeAPICancel", "Redirect To API Codes page");
                VisitOffice("api_codes");

                executionLog.Log("IntegrationCodeAPICancel", "Click on cancel button");
                integration_APIHelper.ClickElement("ClickCanelApi");

                executionLog.Log("IntegrationCodeAPICancel", "Verify API Keys");
                integration_APIHelper.WaitForText("API Keys", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("IntegrationCodeAPICancel");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Integration Code API Cancel");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Integration Code API Cancel", "Bug", "Medium", "Integration API page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Integration Code API Cancel");
                        TakeScreenshot("IntegrationCodeAPICancel");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\IntegrationCodeAPICancel.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("IntegrationCodeAPICancel");
                        string id            = loginHelper.getIssueID("Integration Code API Cancel");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\IntegrationCodeAPICancel.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Integration Code API Cancel"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Integration Code API Cancel");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("IntegrationCodeAPICancel");
                executionLog.WriteInExcel("Integration Code API Cancel", Status, JIRA, "Integration API");
            }
        }
Example #28
0
        //check data type and data format
        void checkDataTypeandFormat(FieldValidationHelper helper, ExecutionLog log)
        {
            log.Log("FieldValidationFrame", "check datatype:Numeric");
            changeDataType(helper, "numeric", log);
            log.Log("FieldValidationFrame", "check datatype:Numeric data range");
            helper.TypeText("LengthMin", "5");
            helper.TypeText("LengthMax", "10");
            helper.ClickElement("SaveVali");
            log.Log("FieldValidationFrame", "check datatype:Numeric go to client");
            goToClient(helper, log);
            log.Log("FieldValidationFrame", "check datatype:Numeric clear legal name text box");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Numeric illegal input string");
            helper.TypeText("LegalNameInput", "fdsf");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Numeric illegal input string pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Numeric small input");
            helper.TypeText("LegalNameInput", "1");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Numeric small input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Numeric large input");
            helper.TypeText("LegalNameInput", "12");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Numeric large input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Numeric illegal input decimal");
            helper.TypeText("LegalNameInput", "6.5");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Numeric illegal input decimal pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Numeric legal input");
            helper.TypeText("LegalNameInput", "6");
            helper.ClickElement("Save");
            string nameinput = helper.GetTextContent("LegalNameInput");

            Assert.IsTrue(nameinput == "6");
            log.Log("FieldValidationFrame", "check datatype:Numeric legal input pass");

            log.Log("FieldValidationFrame", "check datatype:Decimal");
            changeDataType(helper, "decimal", log);
            log.Log("FieldValidationFrame", "check datatype:Decimal range");
            helper.TypeText("LengthMax", "10");
            helper.ClickElement("SaveVali");
            log.Log("FieldValidationFrame", "check datatype:Decimal go to client");
            goToClient(helper, log);
            log.Log("FieldValidationFrame", "check datatype:Decimal clear legal name text box");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Decimal illegal input string");
            helper.TypeText("LegalNameInput", "fdsf");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Decimal illegal input string pass");
            log.Log("FieldValidationFrame", "check datatype:Decimal clear input box");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Decimal small input");
            helper.TypeText("LegalNameInput", "1.5");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Decimal small input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Decimal large input");
            helper.TypeText("LegalNameInput", "12.5");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check datatype:Decimal large input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check datatype:Decimal legal input");
            helper.TypeText("LegalNameInput", "6.5");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput == "6.5");
            log.Log("FieldValidationFrame", "check datatype:Decimal legal input pass");

            log.Log("FieldValidationFrame", "check format:Email");
            changeDataFormat(helper, "email", log);
            log.Log("FieldValidationFrame", "check format:Email go to client");
            goToClient(helper, log);
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:Email illegal input");
            helper.TypeText("LegalNameInput", "gg");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "check format:Email illegal input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:Email legal input");
            helper.TypeText("LegalNameInput", "*****@*****.**");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput == "*****@*****.**");
            log.Log("FieldValidationFrame", "check format:Email legal input pass");

            log.Log("FieldValidationFrame", "check format:ssn");
            changeDataFormat(helper, "ssn", log);
            log.Log("FieldValidationFrame", "check format:ssn go to client");
            goToClient(helper, log);
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:ssn illegal input string");
            helper.TypeText("LegalNameInput", "gg");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:ssn illegal input string pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:ssn short input");
            helper.TypeText("LegalNameInput", "44");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:ssn short input pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:ssn long input");
            helper.TypeText("LegalNameInput", "543737345245273762");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 11);
            log.Log("FieldValidationFrame", "check format:ssn long input pass");

            log.Log("FieldValidationFrame", "check format:Phone");
            changeDataFormat(helper, "phone", log);
            log.Log("FieldValidationFrame", "check format:Phone go to client");
            goToClient(helper, log);
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:Phone inllegal input string");
            helper.TypeText("LegalNameInput", "gg");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:Phone illegal input string pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:Phone short");
            helper.TypeText("LegalNameInput", "44");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:Phone short pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:Phone long");
            helper.TypeText("LegalNameInput", "543737345245273762");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 14);
            log.Log("FieldValidationFrame", "check format:Phone long pass");


            log.Log("FieldValidationFrame", "check format:TaxID");
            changeDataFormat(helper, "taxid", log);
            goToClient(helper, log);
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:TaxID illegal input string");
            helper.TypeText("LegalNameInput", "gg");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:TaxID illegal input string pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:TaxID short");
            helper.TypeText("LegalNameInput", "44");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 0);
            log.Log("FieldValidationFrame", "check format:TaxID short pass");
            helper.ClearText("LegalNameInput");
            log.Log("FieldValidationFrame", "check format:TaxID long");
            helper.TypeText("LegalNameInput", "543737345245273762");
            helper.ClickElement("Save");
            nameinput = helper.GetTextContent("LegalNameInput");
            Assert.IsTrue(nameinput.Length == 10);
            log.Log("FieldValidationFrame", "check format:TaxID long pass");
        }
        public void createClientSectionMasterData()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("CreateClientSectionMasterData", " Redirect To URL");
                VisitOffice("sections");

                executionLog.Log("CreateClientSectionMasterData", "  Verify title");
                VerifyTitle("Section Management");

                executionLog.Log("CreateClientSectionMasterData", " Select Module");
                office_FieldDictionary_SectionsHelper.Selectbytext("SelectModule", "Clients");

                executionLog.Log("CreateClientSectionMasterData", " Click on Create Btn");
                office_FieldDictionary_SectionsHelper.ClickElement("Create");
                office_FieldDictionary_SectionsHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateClientSectionMasterData", " Select TAB");
                office_FieldDictionary_SectionsHelper.Selectbytext("TabName", "Company Details");
                office_FieldDictionary_SectionsHelper.WaitForWorkAround(1000);

                executionLog.Log("CreateClientSectionMasterData", " Enter Name");
                office_FieldDictionary_SectionsHelper.TypeText("Name", name);

                executionLog.Log("CreateClientSectionMasterData", " Click on save button");
                office_FieldDictionary_SectionsHelper.ClickElement("Save");
                office_FieldDictionary_SectionsHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateClientSectionMasterData", " Accept Alert");
                office_FieldDictionary_SectionsHelper.AcceptAlert();
                office_FieldDictionary_SectionsHelper.WaitForWorkAround(1000);

                executionLog.Log("CreateClientSectionMasterData", " Go to clients Tab ");
                VisitOffice("clients");

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

                executionLog.Log("CreateClientSectionMasterData", " Click On Any Client");
                office_ClientsHelper.ClickElement("Client1");

                executionLog.Log("CreateClientSectionMasterData", " Click on Company Details Tab");
                office_ClientsHelper.ClickElement("CompanyDetails");

                executionLog.Log("CreateClientSectionMasterData", " Redirect To URL");
                VisitOffice("sections");

                executionLog.Log("CreateClientSectionMasterData", "  Verify title");
                VerifyTitle("Section Management");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateClientSectionMasterData", " Deletes the created section.");
                office_FieldDictionary_SectionsHelper.DeleteSection(name);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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


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

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

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

                executionLog.Log("CorpResidualIncomeViewTransactionUrlChange", "Go To Residual Income");
                VisitCorp("rir/imports");

                executionLog.Log("CorpResidualIncomeViewTransactionUrlChange", "Click On View Transaction");
                corp_ResidualIncome_ImportHelper.ClickElement("ClickOnViewTransaction");
                corp_ResidualIncome_ImportHelper.WaitForWorkAround(2000);

                executionLog.Log("CorpResidualIncomeViewTransactionUrlChange", "Change the url with the url number of another Corp");
                VisitCorp("rir/transactions/1016");

                executionLog.Log("CorpResidualIncomeViewTransactionUrlChange", "Verify Validation");
                corp_ResidualIncome_ImportHelper.WaitForText("oops something went wrong", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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