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

            XMLParse oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var    executionLog             = new ExecutionLog();
            var    loginHelper              = new LoginHelper(GetWebDriver());
            var    tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

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

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

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

                executionLog.Log("AdminMasterDataResolutionUrlChange", "Goto master data Resolution");
                VisitOffice("tickets/masterdata/resolution");

                executionLog.Log("AdminMasterDataResolutionUrlChange", "Click On Issue");
                tickets_MasterDataHelper.ClickElement("ClicKOnIssueResolved");
                tickets_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminMasterDataResolutionUrlChange", "Change the Url");
                VisitOffice("tickets/masterdata/edit/resolution/121");
                tickets_MasterDataHelper.WaitForWorkAround(3000);

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdminMasterDataResolutionUrlChange");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Admin Master Data Resolution Url Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Admin Master Data Resolution Url Change", "Bug", "Medium", "Office Admin", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Admin Master Data Resolution Url Change");
                        TakeScreenshot("AdminMasterDataResolutionUrlChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataResolutionUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdminMasterDataResolutionUrlChange");
                        string id            = loginHelper.getIssueID("Admin Master Data Resolution Url Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminMasterDataResolutionUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Admin Master Data Resolution Url Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Admin Master Data Resolution Url Change");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdminMasterDataResolutionUrlChange");
                executionLog.WriteInExcel("Admin Master Data Resolution Url Change", Status, JIRA, "Admin Tickets");
            }
        }
Пример #2
0
        public void createEquipments()
        {
            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" + GetRandomNumber();
            var    Id     = "12345" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("CreateEquipments", "Click On  Admin");
                VisitOffice("admin");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Redirect To URL");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateEquipments", " Click On Create");
                eqiupment_EquipmentHelper.Clickjs("Create");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment Create");

                executionLog.Log("CreateEquipments", "Enter Equipment Name");
                eqiupment_EquipmentHelper.TypeText("Name", name);
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Select DownloadsIDName");
                eqiupment_EquipmentHelper.Select("Type", "Check Reader");
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Equipment Id");
                eqiupment_EquipmentHelper.TypeText("EquipmentId", Id);
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Version");
                eqiupment_EquipmentHelper.TypeText("Version", "5.1");
                eqiupment_EquipmentHelper.WaitForWorkAround(500);

                executionLog.Log("CreateEquipments", "Enter Description");
                eqiupment_EquipmentHelper.TypeText("Description", "This is Testing Description");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors1");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", "Click On First CheckBox");
                eqiupment_EquipmentHelper.ClickElement("ApplicableProcessors2");
                eqiupment_EquipmentHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateEquipments", " Click on Save button ");
                eqiupment_EquipmentHelper.Clickjs("Save");
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", " Wait for save equipment text ");
                eqiupment_EquipmentHelper.WaitForText("Equipment saved successfully", 20);

                executionLog.Log("CreateEquipments", "Redirect To URL");
                VisitOffice("equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(6000);

                executionLog.Log("CreateEquipments", "Verify title");
                VerifyTitle("Equipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(4000);

                executionLog.Log("CreateEquipments", "Enter Name to search");
                eqiupment_EquipmentHelper.TypeText("SearchId", Id);
                eqiupment_EquipmentHelper.WaitForWorkAround(5000);

                executionLog.Log("CreateEquipments", "cLICK Delete btn  ");
                eqiupment_EquipmentHelper.Clickjs("DeleteEuipment");
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEquipments", "Accept alert message. ");
                eqiupment_EquipmentHelper.AcceptAlert();
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateEquipments", "Wait for delete message. ");
                eqiupment_EquipmentHelper.WaitForText("Equipment deleted successfully", 30);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("CreateEquipments");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Create Equipments");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Create Equipments", "Bug", "Medium", "Create Eqiupment page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Create Equipments");
                        TakeScreenshot("CreateEquipments");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreateEquipments.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("CreateEquipments");
                        string id            = loginHelper.getIssueID("Create Equipments");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\CreateEquipments.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Create Equipments"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Create Equipments");
                //     executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("CreateEquipments");
                executionLog.WriteInExcel("Create Equipments", Status, JIRA, "Equipment Management");
            }
        }
Пример #3
0
        public void verifyFieldsInheritedForNewOffice()
        {
            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());
            var yopmail_Helper                      = new YopMailHelper(GetWebDriver());
            var office_LeadsHelper                  = new Office_LeadsHelper(GetWebDriver());
            var office_FieldDictionary_FieldsHelper = new Office_FieldDictionary_FieldsHelper(GetWebDriver());


            //  Variable random

            String JIRA       = "";
            String Status     = "Pass";
            var    officename = "Office" + RandomNumber(1, 999999999);
            var    username1  = "user" + RandomNumber(1, 9999);

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

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

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Create Office");
                VisitCorp("offices");
                Console.WriteLine("Redirected to All Office page");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Click on Create button");
                corp_Office_OfficeHelper.ClickElement("Create");

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

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Office name");
                corp_Office_OfficeHelper.TypeText("Name", officename);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Address Line 1");
                corp_Office_OfficeHelper.TypeText("AddressLine1", "Add 1");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Zip Code");
                corp_Office_OfficeHelper.TypeText("ZIpCode", "20001");
                corp_Office_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Deselect Auto generate password check box");
                corp_Office_OfficeHelper.ClickElement("AutoGenPassword");
                corp_Office_OfficeHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Username");
                corp_Office_OfficeHelper.TypeText("PrimaryUserName", username1);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Password");
                corp_Office_OfficeHelper.TypeText("PrimaryPassword", "123456");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter First Name");
                corp_Office_OfficeHelper.TypeText("FirstName", "Test");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Last Name");
                corp_Office_OfficeHelper.TypeText("LastName", "User");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Select eAddress label");
                corp_Office_OfficeHelper.Select("EaddressLabel", "Home");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter eAddress");
                corp_Office_OfficeHelper.TypeText("eAddress", "*****@*****.**");
                Console.WriteLine("Entered eAddress");


                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Click on Save");
                try
                {
                    corp_Office_OfficeHelper.ClickElement("Save");
                }
                catch (OpenQA.Selenium.WebDriverException)
                { }

                Console.WriteLine("Office Created");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Go to yopmail.com");
                GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/");
                Console.WriteLine("Redirected to yopmail.com");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter eAddress in yopmail");
                yopmail_Helper.TypeText("Yopmail", "aslam.pegasus");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Check Inbox");
                yopmail_Helper.ClickElement("YopmailClick");

                yopmail_Helper.switchFrame("ifmail");

                yopmail_Helper.VerifyText("MailSecondPoint", username1);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Click on Office Link");
                yopmail_Helper.ClickElement("OfficeLink");
                corp_Office_OfficeHelper.SwitchToWindow();

                yopmail_Helper.WaitForWorkAround(5000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Click on Profile Icon");
                corp_Office_OfficeHelper.ClickElement("ProfileIcon");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Click on Logout");
                corp_Office_OfficeHelper.ClickElement("Logout");
                Console.WriteLine("Redirected to Login Screen");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Username");
                loginHelper.TypeText("Login/Username", username1);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Enter Last Name");
                loginHelper.TypeText("Login/Password", "123456");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Verify Office");
                loginHelper.ClickElement("Login/Enter");
                Console.WriteLine("Logged into new office");

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

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Redirect at create Leads page");
                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username1 + "/leads/create");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Verify Company Name field appearing");
                office_LeadsHelper.verifyElementPresent("CompanyName");

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Redirect at Field Properties");
                GetWebDriver().Navigate().GoToUrl("https://www.mypegasuscrm.com/newthemecorp/" + username1 + "/fields");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Select Module");
                office_FieldDictionary_FieldsHelper.SelectByText("FSModule", "Clients");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyFieldsInheritedForNewOffice", "Verify fields available");
                Assert.IsFalse(GetWebDriver().PageSource.Contains("No Fields Available."));
                //office_LeadsHelper.WaitForWorkAround(3000);
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyFieldsInheritedForNewOffice");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Fields Inherited For New Office");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Fields Inherited For New Office", "Bug", "Medium", "Employee page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Fields Inherited For New Office");
                        TakeScreenshot("VerifyFieldsInheritedForNewOffice");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyFieldsInheritedForNewOffice.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyFieldsInheritedForNewOffice");
                        string id            = loginHelper.getIssueID("Verify Fields Inherited For New Office");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyFieldsInheritedForNewOffice.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Fields Inherited For New Office"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Fields Inherited For New Office");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyFieldsInheritedForNewOffice");
                executionLog.WriteInExcel("Verify Fields Inherited For New Office", Status, JIRA, "Corp Employees");
            }
        }
Пример #4
0
        public void leadPhoneUpdate()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("LeadPhoneUpdate", "Verify page title. ");
                VerifyTitle("Create a Lead");
                office_LeadsHelper.WaitForWorkAround(1000);

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

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

                executionLog.Log("LeadPhoneUpdate", "Select Lead Responsibility");
                office_LeadsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("LeadPhoneUpdate", "Click on Save");
                office_LeadsHelper.ClickElement("SaveLeadButton");
                office_LeadsHelper.WaitForWorkAround(1000);

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

                executionLog.Log("LeadPhoneUpdate", "Enter Last Name");
                office_LeadsHelper.TypeText("LeadLastName", "Tester");

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

                executionLog.Log("LeadPhoneUpdate", "Click on Save");
                office_LeadsHelper.ClickElement("SaveLeadButton");
                office_LeadsHelper.WaitForWorkAround(4000);

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

                    executionLog.Log("LeadPhoneUpdate", "Click on duplicate btn");
                    office_LeadsHelper.Click(LocDub);
                    office_LeadsHelper.WaitForWorkAround(4000);

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

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

                    executionLog.Log("LeadPhoneUpdate", "Enter Company Name");
                    office_LeadsHelper.TypeText("CompanySearch", Company);

                    executionLog.Log("LeadPhoneUpdate", "Wait for checkbox to appear.");
                    office_LeadsHelper.WaitForElementPresent("CheckDocToDel", 10);

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

                    executionLog.Log("LeadPhoneUpdate", "Click on delete lead");
                    office_LeadsHelper.ClickElement("DeleteLead");

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

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

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("VerifyModifiedMovementIssue", "Redirect To URL");
                VisitOffice("leads");
                office_LeadsHelper.WaitForWorkAround(5000);

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

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

                executionLog.Log("VerifyModifiedMovementIssue", "Select 'Modified' in displayed columns.");
                office_LeadsHelper.SelectByText("DisplayedCols", "Modified");
                office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyModifiedMovementIssue", "Move column to available columns");
                office_LeadsHelper.ClickElement("RemoveCols");
                office_LeadsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("VerifyModifiedMovementIssue", "Verify unexpected error message not present on the page.");
                office_LeadsHelper.VerifyTextNot("OOPS you are trying to access a non existing page on the website.");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyModifiedMovementIssue", "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("VerifyModifiedMovementIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Modified Movement Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Modified Movement Issue", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Modified Movement Issue");
                        TakeScreenshot("VerifyModifiedMovementIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyModifiedMovementIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyModifiedMovementIssue");
                        string id            = loginHelper.getIssueID("Verify Modified Movement Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyModifiedMovementIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Modified Movement Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Modified Movement Issue");
                //      executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyModifiedMovementIssue");
                executionLog.WriteInExcel("Verify Modified Movement Issue", Status, JIRA, "Opportunities Management");
            }
        }
Пример #6
0
        public void verifyEditPartnerAssociationConnectUsername()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Redirect at shipping carriers page.");
                VisitOffice("shipping_carriers");

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Click on Edit button.");
                equipment_ShippingCarrierHelper.ClickElement("Edit");

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Wait for tracking Url.");
                equipment_ShippingCarrierHelper.WaitForElementPresent("TrackingURL", 10);

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Enter Tracking Url.");
                equipment_ShippingCarrierHelper.TypeText("TrackingURL", "Test");

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Click on Save button.");
                equipment_ShippingCarrierHelper.ClickElement("Save");

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Wait for tracking Url error validation.");
                equipment_ShippingCarrierHelper.WaitForElementPresent("TrackingError2", 10);

                executionLog.Log("ShippingCarrierSaveWithInvalidURLIssue", "Verify Please enter a valid URL.");
                equipment_ShippingCarrierHelper.VerifyText("TrackingError2", "Please enter a valid URL.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ShippingCarrierSaveWithInvalidURLIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Shipping Carrier Save With Invalid URL Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Shipping Carrier Save With Invalid URL Issue", "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("Shipping Carrier Save With Invalid URL Issue");
                        TakeScreenshot("ShippingCarrierSaveWithInvalidURLIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ShippingCarrierSaveWithInvalidURLIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ShippingCarrierSaveWithInvalidURLIssue");
                        string id            = loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ShippingCarrierSaveWithInvalidURLIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Shipping Carrier Save With Invalid URL Issue");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ShippingCarrierSaveWithInvalidURLIssue");
                executionLog.WriteInExcel("Shipping Carrier Save With Invalid URL Issue", Status, JIRA, "Admin Equipments");
            }
        }
        public void verifyCorpCreatedIframeOnSaleAgentPage()
        {
            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("VerifyCorpCreatedIframeOnSaleAgentPage", "Login with valid credentials");
                Login(username[0], password[0]);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Enter invalid numerical URL.");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "12234");

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Enter invalid web address URL.");
                corpIntegration_IframeAppsHelper.TypeText("LoginUrl", "www.google.com");

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click on tab to be appear in office portal.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearOnOffice");

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click on tab to be appear in partner portal.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearPartner");

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

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

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

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

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Login using sales agent credentials.");
                Login("DilliAgent", "1qaz!QAZ");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                {
                    Login("DilliAgent", "1qaz!QAZ");
                }

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify page title.");
                VerifyTitle("Details");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

                var loc = "//span[text()='" + Tab + "']";
                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify created iframe present on sale agent portal.");
                corpIntegration_IframeAppsHelper.IsElementPresent(loc);
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click on the created iframe.");
                corpIntegration_IframeAppsHelper.ClickViaJavaScript(loc);

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify page title as iframe name..");
                VerifyTitle(Tab);

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

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

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

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

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

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click on edit icon.");
                corpIntegration_IframeAppsHelper.ClickJava("Edit");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify page title as edit iframe.");
                VerifyTitle("Edit Iframe");

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click to uncheck the chechbox.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearOnOffice");

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Click to uncheck the chechbox.");
                corpIntegration_IframeAppsHelper.ClickJava("TabAppearPartner");

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Wait for iframe creation success text.");
                corpIntegration_IframeAppsHelper.WaitForText("Iframe updated Successfully.", 10);

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "logout from corp module.");
                VisitCorp("logout");

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Login using sale agent credentials.");
                Login("DilliAgent", "1qaz!QAZ");
                corpIntegration_IframeAppsHelper.WaitForWorkAround(3000);

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

                {
                    Login("DilliAgent", "1qaz!QAZ");
                }

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify page title.");
                VerifyTitle("Details");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Verify deleted iframe not present in sale agent portal.");
                corpIntegration_IframeAppsHelper.ElementNotAvailable(loc);
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(5000);

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyCorpCreatedIframeOnSaleAgentPage", "Logout from corp module.");
                VisitCorp("logout");
                //corpIntegration_IframeAppsHelper.WaitForWorkAround(7000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter = executionLog.readLastLine("counter");
                Console.WriteLine("Counter value is    " + counter);
                String Description = executionLog.GetAllTextFile("VerifyCorpCreatedIframeOnSaleAgentPage");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("VerifyCorpCreatedIframeOnSaleAgentPage");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("VerifyCorpCreatedIframeOnSaleAgentPage", "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("VerifyCorpCreatedIframeOnSaleAgentPage");
                        TakeScreenshot("VerifyCorpCreatedIframeOnSaleAgentPage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyCorpCreatedIframeOnSaleAgentPage.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyCorpCreatedIframeOnSaleAgentPage");
                        string id            = loginHelper.getIssueID("VerifyCorpCreatedIframeOnSaleAgentPage");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyCorpCreatedIframeOnSaleAgentPage.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("VerifyCorpCreatedIframeOnSaleAgentPage"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("VerifyCorpCreatedIframeOnSaleAgentPage");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyCorpCreatedIframeOnSaleAgentPage");
                executionLog.WriteInExcel("VerifyCorpCreatedIframeOnSaleAgentPage", Status, JIRA, "Iframe Management");
            }
        }
Пример #9
0
        public void verifyingOfficeEadressIssues()
        {
            string[] username1 = null;
            string[] password1 = null;

            var oXMLData = new XMLParse();

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

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

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

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

            try
            {
                executionLog.Log("VerifyingOfficeEadressIssues", "Login with valid username and password");
                Login("newthemecorp", "pegasus");

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

                executionLog.Log("VerifyingOfficeEadressIssues", "Go to office page");
                VisitCorp("offices");

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

                executionLog.Log("VerifyingOfficeEadressIssues", "Click On Create button");
                corpOffice_OfficeHelper.ClickElement("Create");

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

                executionLog.Log("VerifyingOfficeEadressIssues", "Verify title");
                corpOffice_OfficeHelper.ClickElement("AddEmail");
                corpOffice_OfficeHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyingOfficeEadressIssues", "Verifies first eaddress label a drop down.");
                corpOffice_OfficeHelper.Select("EaddressLabel", "Home");
                corpOffice_OfficeHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyingOfficeEadressIssues", "Select eAddress type as social media.");
                corpOffice_OfficeHelper.Select("Eadresstype2", "Social Media");
                corpOffice_OfficeHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyingOfficeEadressIssues", "Verify eAddress label contains social media options.");
                corpOffice_OfficeHelper.VerifySocialMedia();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyingOfficeEadressIssues");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verifying Office Eadress Issues");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verifying Office Eadress Issues", "Bug", "Medium", "Office page", "QA", "Log in as: " + username1[0] + " / " + password1[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verifying Office Eadress Issues");
                        TakeScreenshot("VerifyingOfficeEadressIssues");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingOfficeEadressIssues.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyingOfficeEadressIssues");
                        string id            = loginHelper.getIssueID("Verifying Office Eadress Issues");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingOfficeEadressIssues.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verifying Office Eadress Issues"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verifying Office Eadress Issues");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyingOfficeEadressIssues");
                executionLog.WriteInExcel("Verifying Office Eadress Issues", Status, JIRA, "Corp Office");
            }
        }
Пример #10
0
        public void saveThemeIssue()
        {
            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 system_ThemesHelper = new System_ThemesHelper(GetWebDriver());

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

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

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

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

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

                executionLog.Log("SaveThemeIssue", "Enter the theme name");
                system_ThemesHelper.TypeText("EnterThemeSearch", "ThemeOffice");
                system_ThemesHelper.WaitForWorkAround(2000);

                executionLog.Log("SaveThemeIssue", "Click on edit icon");
                system_ThemesHelper.ClickElement("EditIcon");
                system_ThemesHelper.WaitForWorkAround(3000);

                executionLog.Log("SaveThemeIssue", "Enter the new theme name");
                system_ThemesHelper.TypeText("ThemeName", Theme);

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

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

                executionLog.Log("SaveThemeIssue", "Search the same themes");
                system_ThemesHelper.TypeText("EnterThemeSearch", Theme);
                system_ThemesHelper.WaitForWorkAround(2000);

                executionLog.Log("SaveThemeIssue", "Delete the theme");
                system_ThemesHelper.ClickElement("DeleteTheme");
                system_ThemesHelper.AcceptAlert();
                system_ThemesHelper.WaitForWorkAround(4000);
            }

            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("SaveThemeIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Save Theme Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Save Theme Issue", "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("Save Theme Issue");
                        TakeScreenshot("SaveThemeIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SaveThemeIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("SaveThemeIssue");
                        string id            = loginHelper.getIssueID("Save Theme Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\SaveThemeIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Save Theme Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Save Theme Issue");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("SaveThemeIssue");
                executionLog.WriteInExcel("Save Theme Issue", Status, JIRA, "System Theme");
            }
        }
Пример #11
0
        public void pDFTemplatesPerminsions()
        {
            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 Corp_PDFTemplate_PDFTemplateHelper = new CorpPDFTemplate_TemplateHelper(GetWebDriver());

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

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

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

                executionLog.Log("PDFTemplatesPerminsions", "Redirect Pdf Template");
                VisitOffice("pdf_templates");

                executionLog.Log("PDFTemplatesPerminsions", "Click on PDF");
                Corp_PDFTemplate_PDFTemplateHelper.ClickElement("ClickPDF");

                executionLog.Log("PDFTemplatesPerminsions", "Wait for element present.");
                Corp_PDFTemplate_PDFTemplateHelper.WaitForElementPresent("ClickOnPermisions", 30);

                executionLog.Log("PDFTemplatesPerminsions", "Click On Permisions");
                Corp_PDFTemplate_PDFTemplateHelper.ClickElement("ClickOnPermisions");
                Corp_PDFTemplate_PDFTemplateHelper.WaitForWorkAround(1000);

                executionLog.Log("PDFTemplatesPerminsions", "Click On None Of These");
                Corp_PDFTemplate_PDFTemplateHelper.ClickElement("ClickOnNoneOfThese");

                executionLog.Log("PDFTemplatesPerminsions", "Click on Update");
                Corp_PDFTemplate_PDFTemplateHelper.ClickElement("ClickOnSaveBtnPDFTemp");
                Corp_PDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000);

                executionLog.Log("PDFTemplatesPerminsions", "Verify Text");
                Corp_PDFTemplate_PDFTemplateHelper.VerifyPageText("Pdf Permissions Updated Successfully.");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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


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

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

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

                executionLog.Log("AllUserPageInCorp", "Redirect at all users page.");
                VisitCorp("allusers");

                executionLog.Log("AllUserPageInCorp", "Select User Type");
                corpOffices_UsersHelper.Select("UserType", "Employee");
                corpOffices_UsersHelper.WaitForWorkAround(3000);

                executionLog.Log("AllUserPageInCorp", "Select User Type");
                corpOffices_UsersHelper.Select("UserType", "1099 Sales Agent");
                corpOffices_UsersHelper.WaitForWorkAround(3000);

                executionLog.Log("AllUserPageInCorp", "Select User Type");
                corpOffices_UsersHelper.Select("UserType", "Client");
                corpOffices_UsersHelper.WaitForWorkAround(3000);

                executionLog.Log("AllUserPageInCorp", "Select User Type");
                corpOffices_UsersHelper.Select("UserType", "Partner");
                corpOffices_UsersHelper.WaitForWorkAround(3000);
            }

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

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

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

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

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

                executionLog.Log("CorpEmployeeUrlChange", "Go To Employee");
                VisitCorp("employees");
                corp_EmployeesHelper.WaitForWorkAround(3000);

                executionLog.Log("CorpEmployeeUrlChange", "Enter the name of employee");
                corp_EmployeesHelper.TypeText("SearchEmpName", "Aslam Tester");
                corp_EmployeesHelper.WaitForWorkAround(2000);

                executionLog.Log("CorpEmployeeUrlChange", "Click On any  Employee");
                corp_EmployeesHelper.ClickElement("ClickOnEmployee");
                corp_EmployeesHelper.WaitForWorkAround(2000);

                executionLog.Log("CorpEmployeeUrlChange", "Change the url with the url number of another Corp");
                VisitCorp("employees/view/1108");
                corp_EmployeesHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("CustomColumnsOpportunities", "Click on Plus icon");
                listManagementHelper.ClickViaJavaScript("//*[@id='modalHeaderColumnsleft']/div[2]/div[2]/div[6]/div/i");
                listManagementHelper.WaitForWorkAround(1000);

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

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

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

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

                executionLog.Log("CustomColumnsOpportunities", "Click on Plus icon");
                listManagementHelper.ClickViaJavaScript("//*[@id='modalHeaderColumnsleft']/div[2]/div[2]/div[4]/div/i");
                listManagementHelper.WaitForWorkAround(1000);

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

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

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

                executionLog.Log("CustomColumnsOpportunities", "Verify the Field");
                listManagementHelper.VerifyTextAvailable("Category");
                listManagementHelper.WaitForWorkAround(1000);
                Console.WriteLine("Field Is Not Saved");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed.");
                office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 10 of");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 20.");
                office_LeadsHelper.SelectByText("ResultsPerPage", "20");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed.");
                office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 20 of");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 50.");
                office_LeadsHelper.SelectByText("ResultsPerPage", "50");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed.");
                office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 50 of");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Select number of records to 100.");
                office_LeadsHelper.SelectByText("ResultsPerPage", "100");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsAdvanceFilterResultsPP", "Verify number of records displayed.");
                office_LeadsHelper.VerifyText("No.ofResults", "Showing 1 - 100 of");
                //office_LeadsHelper.WaitForWorkAround(3000);

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Redirect To URL");
                VisitOffice("documents");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify page title.");
                VerifyTitle("Documents");

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

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Get text of all the displayed columns.");
                var text = officeActivities_DocumentHelper.GetTextByXpath("//*[@id='display_cols']");
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Print all column names on thr console.");
                Console.WriteLine(text);
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify owner column present in displayed column.");
                Assert.IsTrue(text.Contains("Owner"));
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify modified column present in displayed column.");
                Assert.IsTrue(text.Contains("Modified"));
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Redirect To URL");
                VisitOffice("documents");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify page title.");
                VerifyTitle("Documents");

                executionLog.Log("VerifyDocumentDisplayedColumnIssue", "Verify owner column is visible on the page.");
                officeActivities_DocumentHelper.IsElementPresent("HeadOwner");
                //officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyDocumentDisplayedColumnIssue");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Document Displayed Column Issue");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Document Displayed Column Issue", "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 Document Displayed Column Issue");
                        TakeScreenshot("VerifyDocumentDisplayedColumnIssue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDocumentDisplayedColumnIssue.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyDocumentDisplayedColumnIssue");
                        string id            = loginHelper.getIssueID("Verify Document Displayed Column Issue");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDocumentDisplayedColumnIssue.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Document Displayed Column Issue"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Document Displayed Column Issue");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyDocumentDisplayedColumnIssue");
                executionLog.WriteInExcel("Verify Document Displayed Column Issue", Status, JIRA, "Tasks Management");
            }
        }
Пример #17
0
        public void leadZipCode()
        {
            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    CompanyNameLead = "Lead" + GetRandomNumber();
            var    FirstName       = "Lead" + GetRandomNumber();
            var    Number          = "12345678" + GetRandomNumber();
            String JIRA            = "";
            String Status          = "Pass";

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

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

                executionLog.Log("LeadZipCode", "Redirect To Lead");
                VisitOffice("leads/create");
                Office_LeadsHelper.WaitForWorkAround(5000);

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

                executionLog.Log("LeadZipCode", "Click on Comapy Detail");
                Office_LeadsHelper.TypeText("CompanyName", CompanyNameLead);

                executionLog.Log("LeadZipCode", "Select Salutation");
                Office_LeadsHelper.Select("Salutaion", "Mr");

                executionLog.Log("LeadZipCode", "Enter First Name");
                Office_LeadsHelper.TypeText("FirstNameLead", FirstName);

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

                executionLog.Log("LeadZipCode", "Select the Status");
                Office_LeadsHelper.SelectByText("LeadStatus", "Marketing");

                executionLog.Log("LeadZipCode", "Select the Responsbility");
                Office_LeadsHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("LeadZipCode", "Click on Save Button button");
                Office_LeadsHelper.ClickElement("SaveLeadButton");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            // Variable

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

            var CompanyName = "QALeadCompany" + RandomNumber(1, 100);

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

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

                VisitOffice("leads");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Create button");
                processorNameOnSavingMerchantHelper.ClickElement("CreateBtn");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the Company Name");
                processorNameOnSavingMerchantHelper.TypeText("CompanyNameTab", CompanyName);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Select the status");
                processorNameOnSavingMerchantHelper.SelectByText("Status", "New");

                executionLog.Log("ProcessorNameOnSavingMerchant", "Select the responsibility");
                processorNameOnSavingMerchantHelper.SelectByText("Responsibility", "Howard Tang");

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Next button");
                processorNameOnSavingMerchantHelper.ClickElement("NextBtn");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Business details tab");
                processorNameOnSavingMerchantHelper.ClickElement("BusinessDetailsTab");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

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

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Business Banking Account tab");
                processorNameOnSavingMerchantHelper.ClickElement("BusinessBankAcc");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the routing number");
                processorNameOnSavingMerchantHelper.TypeText("RoutingNumber", "889876765");

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

                VisitOffice("leads");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);
                executionLog.Log("ProcessorNameOnSavingMerchant", "Search the company name");
                processorNameOnSavingMerchantHelper.TypeText("CompanySearchField", CompanyName);
                processorNameOnSavingMerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on first lead element");
                processorNameOnSavingMerchantHelper.ClickElement("FirstCompanyName");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Company details tab");
                processorNameOnSavingMerchantHelper.ClickElement("BusinessDetailsTab");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Enter the processor name");
                processorNameOnSavingMerchantHelper.TypeText("ProcessorName", "First Data Omaha");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on Save button");
                processorNameOnSavingMerchantHelper.ClickElement("SaveBtn");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(5000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Verify the added processor name ");
                processorNameOnSavingMerchantHelper.verifyFieldText("//*[@id='LeadDetailIfyesProcessorName']", "First Data Omaha");

                VisitOffice("leads");
                processorNameOnSavingMerchantHelper.WaitForWorkAround(3000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Search the company name");
                processorNameOnSavingMerchantHelper.TypeText("CompanySearchField", CompanyName);
                processorNameOnSavingMerchantHelper.WaitForWorkAround(2000);

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on first check box");
                processorNameOnSavingMerchantHelper.ClickElement("FirstCheckBox");

                executionLog.Log("ProcessorNameOnSavingMerchant", "Click on delete button");
                processorNameOnSavingMerchantHelper.ClickElement("DeleteBtn");
                processorNameOnSavingMerchantHelper.AcceptAlert();
                processorNameOnSavingMerchantHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ProcessorNameOnSavingMerchant");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Processor Name On Saving Merchant");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Processor Name On Saving Merchant", "Bug", "Medium", "Merchant page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Processor Name On Saving Merchant");
                        TakeScreenshot("ProcessorNameOnSavingMerchant");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ProcessorNameOnSavingMerchant.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ProcessorNameOnSavingMerchant");
                        string id            = loginHelper.getIssueID("Processor Name On Saving Merchant");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ProcessorNameOnSavingMerchant.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Processor Name On Saving Merchant"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Processor Name On Saving Merchant");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ProcessorNameOnSavingMerchant");
                executionLog.WriteInExcel("Processor Name On Saving Merchant", Status, JIRA, "Office Merchant data");
            }
        }
Пример #19
0
        public void clientTextTab()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

            // Initializing the objects
            var    executionLog         = new ExecutionLog();
            var    loginHelper          = new LoginHelper(GetWebDriver());
            var    office_ClientsHelper = new Office_ClientsHelper(GetWebDriver());
            String JIRA   = "";
            String Status = "Pass";

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

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

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

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

                executionLog.Log("ClientTextTab", "Open a client");
                office_ClientsHelper.ClickElement("Client1");

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

                executionLog.Log("ClientTextTab", "Click on 'Owner' tab");
                office_ClientsHelper.ClickElement("OwnerTab");

                executionLog.Log("ClientTextTab", "Verify title");
                VerifyTitle(" Owners");

                executionLog.Log("ClientTextTab", "Verify text displayed properly");
                office_ClientsHelper.verifyElementVisible("TextOwnwerInfo");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("LeadsEmailUrlChange", "Go to Leads page");
                VisitOffice("leads");
                officeActivities_EmailHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsEmailUrlChange", "Click On Send Email");
                office_LeadsHelper.ClickElement("SendEmail");
                officeActivities_EmailHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsEmailUrlChange", "Enter Email Id");
                officeActivities_EmailHelper.TypeText("Sendto", SendTo);
                officeActivities_EmailHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsEmailUrlChange", "Enter  Subject");
                officeActivities_EmailHelper.TypeText("EmailName", "Email Subject");
                officeActivities_EmailHelper.WaitForWorkAround(1000);

                executionLog.Log("LeadsEmailUrlChange", "Click on Send button");
                officeActivities_EmailHelper.ClickElement("SendEmailActivity");
                officeActivities_EmailHelper.WaitForWorkAround(2000);

                //executionLog.Log("LeadsEmailUrlChange", "Wait for element to present.");
                //officeActivities_EmailHelper.WaitForText("Description", 10);

                executionLog.Log("LeadsEmailUrlChange", "Select Activity >> Emails");
                officeActivities_EmailHelper.Select("SelectActivityType", "E-Mails");
                officeActivities_EmailHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsEmailUrlChange", "Click On E-mail");
                officeActivities_EmailHelper.PressEnter("ClickOnNoteOppSubj");
                officeActivities_EmailHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsEmailUrlChange", "Change the url with the url number of another office");
                VisitOffice("mails/view/57");
                officeActivities_EmailHelper.WaitForWorkAround(4000);

                executionLog.Log("LeadsEmailUrlChange", "Verify Validation");
                officeActivities_EmailHelper.WaitForText("You don't have privileges to view this E-Mail.", 10);
                officeActivities_EmailHelper.WaitForWorkAround(1000);

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

                executionLog.Log("LeadsEmailUrlChange", "Verify page title");
                VerifyTitle("Sent");
                //officeActivities_EmailHelper.WaitForWorkAround(2000);

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

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

                executionLog.Log("LeadsEmailUrlChange", "Select searched email.");
                officeActivities_EmailHelper.ClickJS("CheckBox1");
                officeActivities_EmailHelper.WaitForWorkAround(1000);

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

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("LeadsEmailUrlChange");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Leads Email Url Change");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Leads Email 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 Email Url Change");
                        TakeScreenshot("LeadsEmailUrlChange");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LeadsEmailUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("LeadsEmailUrlChange");
                        string id            = loginHelper.getIssueID("Leads Email Url Change");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\LeadsEmailUrlChange.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Leads Email Url Change"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Leads Email Url Change");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("LeadsEmailUrlChange");
                executionLog.WriteInExcel("Leads Email Url Change", Status, JIRA, "Leads Email");
            }
        }
        public void verifyingPricingPlanPushtoOfficeError()
        {
            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 random
            var    name   = "Test" + GetRandomNumber();
            var    Test   = "New" + GetRandomNumber();
            String JIRA   = "";
            String Status = "Pass";

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

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

                executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Procing plan page");
                VisitCorp("masterdata/pricing_plans");
                VerifyTitle("Master Pricing Plans");

                executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Click On Push Office");
                corpMasterdata_PricingPlanHelper.ClickElement("PushOffice");
                corpMasterdata_PricingPlanHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Click Ok to Accept alert.");
                corpMasterdata_PricingPlanHelper.AcceptAlert();

                executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Verify 500 Interanl error not occured.");
                corpMasterdata_PricingPlanHelper.VerifyTextNotPresent("500 Internal Server Error");

                executionLog.Log("VerifyingPricingPlanPushtoOfficeError", "Verify Success message for push to office");
                corpMasterdata_PricingPlanHelper.WaitForText("Pricing Plans successfully pushed to offices.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyingPricingPlanPushtoOfficeError");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Pricing Plan Push to office error");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Pricing Plan Push to office error", "Bug", "Medium", "Corp Pricing plan page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Create Pricing Plan");
                        TakeScreenshot("VerifyingPricingPlanPushtoOfficeError");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingPricingPlanPushtoOfficeError.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyingPricingPlanPushtoOfficeError");
                        string id            = loginHelper.getIssueID("Verify Pricing Plan Push to office error");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyingPricingPlanPushtoOfficeError.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Pricing Plan Push to office error"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Pricing Plan Push to office error");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyingPricingPlanPushtoOfficeError");
                executionLog.WriteInExcel("Verify Pricing Plan Push to Office error", Status, JIRA, "Corp Master Data");
            }
        }
Пример #22
0
        public void agentEmployeePage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                //executionLog.Log("AgentEmployeePage", "Click on 'Menu' icon ");
                //agents_EmployeesHelper.ClickElement("MenuIcon");

                executionLog.Log("AgentEmployeePage", "Click on Agent tab");
                agents_EmployeesHelper.ClickElement("AgentTab");

                executionLog.Log("AgentEmployeePage", "Click On Employee");
                VisitOffice("employees");
                agents_EmployeesHelper.WaitForWorkAround(3000);

                executionLog.Log("AgentEmployeePage", "Verify title");
                agents_EmployeesHelper.VerifyText("EmployeeHead", "Employee");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            ExecutionLog executionLog = new ExecutionLog();
            LoginHelper  loginHelper  = new LoginHelper(GetWebDriver());
            AdminCheckFieldRelationshipsHelper adminHelper = new AdminCheckFieldRelationshipsHelper(GetWebDriver());

            // Testing Variables
            string[] dateDropdownArray = { "Yesterday", "ThisWeek", "ThisMonth", "LastMonth", "ThisQuarter", "LastQuarter", "ThisYear", "LastYear", "Last12Months", "Custom" };

            var    name   = "Testing Subject" + GetRandomNumber();
            var    email  = "Test" + GetRandomNumber() + "@gmail.com";
            String JIRA   = "";
            String Status = "Pass";

            try
            {
                // Initiating Test
                executionLog.Log("AdminCheckFieldRelationships", "Login");
                Login(username[0], password[0]);

                executionLog.Log("AdminCheckFieldRelationships", "Write information");
                Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

                executionLog.Log("AdminCheckFieldRelationships", "Checking Master Data Tab");
                VerifyTitle("Dashboard");

                executionLog.Log("AdminCheckFieldRelationships", "Verify Office admin");
                VisitOffice("admin");

                // Testing Rates and Fees Section
                executionLog.Log("AdminCheckFieldRelationships", "Checking Master Data Tab");

                VisitOffice("rates_fees");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Checking Temp1234");
                adminHelper.ClickElement("Temp1234");

                executionLog.Log("AdminCheckFieldRelationships", "Wait");
                adminHelper.WaitForWorkAround(6000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Processor Type");
                adminHelper.SelectByText("ProcessorType", "First Data Omaha");
                adminHelper.WaitForWorkAround(2000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking FirstDataOmahaOption");
                adminHelper.ClickElement("FirstDataOmahaOption");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for  DiscountCollected");
                adminHelper.ElementVisible("DiscountCollected");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking FirstDataNorthOption");
                adminHelper.ClickElement("FirstDataNorthOption");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking DiscountFrequency");
                adminHelper.ElementVisible("DiscountFrequency");

                VisitOffice("user_statistics");
                adminHelper.WaitForWorkAround(3000);

                for (int i = 0; i < dateDropdownArray.Length - 1; i++)
                {
                    executionLog.Log("AdminCheckFieldRelationships", "Clicking DateDropDown");
                    adminHelper.ClickElement("DateDropDown");

                    executionLog.Log("AdminCheckFieldRelationships", ("Clicking" + dateDropdownArray[i]));
                    adminHelper.ClickElement(dateDropdownArray[i]);

                    executionLog.Log("AdminCheckFieldRelationships", "Wait");
                    adminHelper.WaitForWorkAround(3000);
                }

                VisitOffice("tickets/settings");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking ReportingTimeStamp");
                adminHelper.ClickElement("ReportingTimeStamp");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking StatusChangeOption");
                adminHelper.ClickElement("StatusChangeOption");

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for SelectStatus");
                adminHelper.ElementVisible("SelectStatus");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking ClosedTimeStamp");
                adminHelper.ClickElement("ClosedTimeStamp");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking StatusChangeTimeStamp");
                adminHelper.ClickElement("StatusChangeTimeStamp");

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for SelectStatus");
                adminHelper.ElementVisible("SelectStatus");

                VisitOffice("sections");
                adminHelper.WaitForWorkAround(3000);
                executionLog.Log("AdminCheckFieldRelationships", "Clicking SelectModule");
                adminHelper.ClickElement("SelectModule");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking ClientsOption");
                adminHelper.ClickElement("ClientsOption");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyAddress");
                adminHelper.ElementVisible("CompanyAddress");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking LeadsOption");
                adminHelper.ClickElement("LeadsOption");

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for Processor");
                adminHelper.ElementVisible("Processor");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking OpportunitiesOption");
                adminHelper.ClickElement("OpportunitiesOption");

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for Details");
                adminHelper.ElementVisible("Details");

                executionLog.Log("AdminCheckFieldRelationships", "Wait");
                VisitOffice("fields");
                adminHelper.WaitForWorkAround(3000);

                adminHelper.SelectByText("Module", "Clients");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Search");
                adminHelper.ClickElement("Search");
                adminHelper.WaitForWorkAround(5000);

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for AmexVolume");
                adminHelper.ElementVisible("AmexVolume");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Module");
                adminHelper.ClickElement("Module");
                adminHelper.WaitForWorkAround(4000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Leads");
                adminHelper.ClickElement("Leads");
                adminHelper.WaitForWorkAround(4000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Search");
                adminHelper.ClickElement("Search");
                adminHelper.WaitForWorkAround(4000);

                executionLog.Log("AdminCheckFieldRelationships", "Waiting for Salutation");
                adminHelper.ElementVisible("Salutation");

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Module");
                adminHelper.ClickElement("Module");
                executionLog.Log("AdminCheckFieldRelationships", "Wait");
                adminHelper.WaitForWorkAround(3000);

                // Checking opportuniteis
                executionLog.Log("AdminCheckFieldRelationships", "Clicking Opportunities");
                adminHelper.ClickElement("Opportunities");

                executionLog.Log("AdminCheckFieldRelationships", "Wait");
                adminHelper.WaitForWorkAround(4000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Search");
                adminHelper.ClickElement("Search");
                adminHelper.WaitForWorkAround(4000);

                // Validating change
                executionLog.Log("AdminCheckFieldRelationships", "Waiting for OpportunityName");
                adminHelper.ElementVisible("OpportunityName");

                VisitOffice("field_order_management");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Module2");
                adminHelper.ClickElement("Module2");
                adminHelper.WaitForWorkAround(3000);

                // Viewing a client
                executionLog.Log("AdminCheckFieldRelationships", "Clicking Clients2");
                adminHelper.ClickElement("Clients2");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Tab");
                adminHelper.ClickElement("Tab");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyDetails2");
                adminHelper.ClickElement("CompanyDetails2");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Section");
                adminHelper.ClickElement("Section");
                adminHelper.WaitForWorkAround(3000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking CompanyDetails3");
                adminHelper.ClickElement("CompanyDetails3");
                adminHelper.WaitForWorkAround(5000);

                executionLog.Log("AdminCheckFieldRelationships", "Clicking Search2");
                adminHelper.ClickElement("Search2");
                adminHelper.WaitForWorkAround(5000);

                // Validating change
                executionLog.Log("AdminCheckFieldRelationships", "Waiting for BusinessDBAName");
                adminHelper.ElementVisible("BusinessDBAName");

                // Beginning Aslam's code for JIRA
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("AdminCheckFieldRelationships");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Admin Check Field Relationships");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Admin Check Field Relationships", "Bug", "Medium", "Document page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Admin Check Field Relationships");
                        TakeScreenshot("AdminCheckFieldRelationships");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminCheckFieldRelationships.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("AdminCheckFieldRelationships");
                        string id            = loginHelper.getIssueID("Admin Check Field Relationships");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\AdminCheckFieldRelationships.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Admin Check Field Relationships"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Admin Check Field Relationships");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("AdminCheckFieldRelationships");
                executionLog.WriteInExcel("Admin Check Field Relationships", Status, JIRA, "Office Activities");
            }
        }
Пример #24
0
        public void activitiesDocumentManagement2()
        {
            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_DocumentsHelper = new OfficeActivities_DocumentHelper(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        = "Doc" + RandomNumber(1, 9999);
            var    email       = "Test" + GetRandomNumber() + "@gmail.com";
            String ValidFile   = GetPathToFile() + "index.jpg";
            String InvalidFile = GetPathToFile() + "chrome.exe";
            String JIRA        = "";
            String Status      = "Pass";


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

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

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

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect to create document page");
                VisitOffice("documents/create");

                executionLog.Log("ActivitiesDocumentManagement2", "verify title");
                VerifyTitle("Create a New Document");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for name.");
                officeActivities_DocumentsHelper.VerifyText("NameError", "This field is required.");

                executionLog.Log("ActivitiesDocumentManagement2", "Verify validation message for attachment.");
                officeActivities_DocumentsHelper.VerifyText("AttachmentError", "This field is required.");

                executionLog.Log("ActivitiesDocumentManagement2", "Enter Document name");
                officeActivities_DocumentsHelper.TypeText("Name", name);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on document version");
                officeActivities_DocumentsHelper.ClickElement("DocumentVersion");

                executionLog.Log("ActivitiesDocumentManagement2", "Upload an invalid File ");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", InvalidFile);

                executionLog.Log("ActivitiesDocumentManagement2", "Verify alert message for invalid file.");
                officeActivities_DocumentsHelper.VerifyAlertText("please select a valid file!");
                officeActivities_DocumentsHelper.AcceptAlert();

                executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File.");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile);

                executionLog.Log("ActivitiesDocumentManagement2", "Select Assign owner");
                officeActivities_DocumentsHelper.SelectByText("AssignOwner", "Howard Tang");

                executionLog.Log("ActivitiesDocumentManagement2", "Select status");
                officeActivities_DocumentsHelper.Select("Status", "Active");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document saved successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");

                executionLog.Log("ActivitiesDocumentManagement2", "Select document related to.");
                officeActivities_DocumentsHelper.Select("ReletedTo", "18");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon.");
                officeActivities_DocumentsHelper.ClickElement("Assign");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on any meeting.");
                officeActivities_DocumentsHelper.ClickElement("AssignUser");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect at meetings page.");
                VisitOffice("meetings");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("ClickOnAnyMeeting", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on any meeting.");
                office_ClientsHelper.ClickElement("ClickOnAnyMeeting");
                office_ClientsHelper.WaitForWorkAround(3000);

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

                VerifyTitle("Documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select document related to.");
                officeActivities_DocumentsHelper.SelectByText("ReletedTo", "Client");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on find list icon.");
                officeActivities_DocumentsHelper.ClickElement("Assign");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on any task.");
                officeActivities_DocumentsHelper.ClickElement("AssignUser");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document updated successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect at tasks page.");
                VisitOffice("tasks");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("OpenTask", 10);

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

                VerifyTitle("Documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Select All in owner field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on edit icon.");
                officeActivities_DocumentsHelper.ClickElement("EditDoc");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on add new version.");
                officeActivities_DocumentsHelper.ClickElement("NewVersion");
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Upload a valid File.");
                officeActivities_DocumentsHelper.Upload("BrowseAttachment", ValidFile);
                office_ClientsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Write a comment about version.");
                officeActivities_DocumentsHelper.TypeText("DocCommnet", "This is newly added version.");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on save button.");
                officeActivities_DocumentsHelper.ClickElement("AddVersionSave");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("New Version File Uploaded successfully.", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect to document page");
                VisitOffice("documents");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("SearchDocumet", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Checkbox");
                officeActivities_DocumentsHelper.ClickElement("CheckDocToDel");

                executionLog.Log("ActivitiesDocumentManagement2", "Click on Delete button");
                officeActivities_DocumentsHelper.ClickElement("DeleteDoc");

                executionLog.Log("ActivitiesDocumentManagement2", "Acccept alert to delete doc.");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message.");
                officeActivities_DocumentsHelper.WaitForText("Document deleted successfully.", 20);

                executionLog.Log("ActivitiesDocumentManagement2", "Redirect at recyclebin page.");
                VisitOffice("documents/recyclebin");

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for locator to be present.");
                officeActivities_DocumentsHelper.WaitForElementPresent("DeleteRecycle", 10);

                executionLog.Log("ActivitiesDocumentManagement2", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Click on delete icon.");
                officeActivities_DocumentsHelper.ClickElement("DeleteRecycle");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesDocumentManagement2", "Wait for success message..");
                officeActivities_DocumentsHelper.WaitForText("Document Permanently Deleted.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

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

                executionLog.Log("VerifyLabelSelectForMeeting", "Click on any Task");
                officeActivities_MeetingHelper.ClickElement("ClickOnAnyMeeting");

                executionLog.Log("VerifyLabelSelectForMeeting", "Verify Select for category");
                officeActivities_MeetingHelper.VerifyText("CategoryLabel", "Select");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyLabelSelectForMeeting");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Label Select For Meeting");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Label Select For Meeting", "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("Verify Label Select For Meeting");
                        TakeScreenshot("VerifyLabelSelectForMeeting");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyLabelSelectForMeeting.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyLabelSelectForMeeting");
                        string id            = loginHelper.getIssueID("Verify Label Select For Meeting");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyLabelSelectForMeeting.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Label Select For Meeting"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Label Select For Meeting");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyLabelSelectForMeeting");
                executionLog.WriteInExcel("Verify Label Select For Meeting", Status, JIRA, "Office Activities");
            }
        }
Пример #26
0
        public void editOfficeDetail()
        {
            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_Admin_DashboardHelper = new DashBoard_CreateDashboardHelper(GetWebDriver());

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

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

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

                executionLog.Log("EditOfficeDetail", "Visit admin page");
                VisitOffice("admin");
                office_Admin_DashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("EditOfficeDetail", "Click on Edit Office details button");
                office_Admin_DashboardHelper.ClickElement("ClickOnEditOfficeCode");
                office_Admin_DashboardHelper.WaitForWorkAround(1000);

                executionLog.Log("EditOfficeDetail", "Click on Save button");
                office_Admin_DashboardHelper.ClickElement("SaveDashboard");

                executionLog.Log("EditOfficeDetail", "Verify Confirmation");
                office_Admin_DashboardHelper.WaitForText("Office codes updated successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EditOfficeDetail");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Edit Office Detail");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Client Addresses", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Edit Office Detail");
                        TakeScreenshot("EditOfficeDetail");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EditOfficeDetail.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EditOfficeDetail");
                        string id            = loginHelper.getIssueID("Edit Office Detail");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ClientAddresses.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Edit Office Detail"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Edit Office Detail");
                //    executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EditOfficeDetail");
                executionLog.WriteInExcel("Edit Office Detail", Status, JIRA, "Client Management");
            }
        }
Пример #27
0
        public void employeeAgentBirthdateOnInfoPage()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

            // Variable

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

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

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

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Goto Opportinuties");
                VisitOffice("employees");

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Open Employee 1");
                agents_EmployeesHelper.ClickElement("EditEmployee1");
                agents_EmployeesHelper.WaitForWorkAround(5000);

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Select Birth Date");
                agents_EmployeesHelper.TypeText("BirthDay", "11/18/1992");
                agents_EmployeesHelper.WaitForWorkAround(3000);

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Click On Save Button");
                agents_EmployeesHelper.clickJS("SaveEmployee");
                agents_EmployeesHelper.WaitForWorkAround(9000);

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Open Employee 1");
                agents_EmployeesHelper.ClickElement("EditEmployee1");
                agents_EmployeesHelper.WaitForWorkAround(5000);

                executionLog.Log("EmployeeAgentBirthdateOnInfoPage", "Verify birthdate on Employee I page.");
                agents_EmployeesHelper.IsElementPresent("//div[contains(text(),'11/18/1992')]");
                agents_EmployeesHelper.WaitForWorkAround(5000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

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

                executionLog.Log("CreateCategoryTickets", "Redirect To URL");
                VisitOffice("tickets/masterdata/category");
                tickets_MasterDataHelper.WaitForWorkAround(3000);

                executionLog.Log("CreateCategoryTickets", "Verify title");
                VerifyTitle("Master Data");

                executionLog.Log("CreateCategoryTickets", " Click On Create");
                tickets_MasterDataHelper.ClickElement("Create");
                tickets_MasterDataHelper.WaitForWorkAround(3000);

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

                executionLog.Log("CreateCategoryTickets", "Enter Name");
                tickets_MasterDataHelper.TypeText("Name", name);

                executionLog.Log("CreateCategoryTickets", "Click on Save  ");
                tickets_MasterDataHelper.ClickElement("Save");
                tickets_MasterDataHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateCategoryTickets", "Wait for text");
                tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 10);

                executionLog.Log("CreateCategoryTickets", "Click on delete item");
                tickets_MasterDataHelper.ClickElement("DeleteItem");
                tickets_MasterDataHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateCategoryTickets", "Delete item.");
                tickets_MasterDataHelper.DeleteCategory(name);

                executionLog.Log("CreateCategoryTickets", "Select replace with ");
                tickets_MasterDataHelper.SelectByText("ReplaceWith", "Other");
                //tickets_MasterDataHelper.WaitForWorkAround(2000);

                executionLog.Log("CreateCategoryTickets", "Confirm delete by clicking save. ");
                tickets_MasterDataHelper.ClickElement("SaveDelete");
                tickets_MasterDataHelper.AcceptAlert();
                tickets_MasterDataHelper.WaitForWorkAround(4000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("EquipmentModifierError", "Redirect to equipment page.");
                VisitOffice("equipment");

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

                executionLog.Log("EquipmentModifierError", "Click on Save button");
                eqiupment_EquipmentHelper.ClickElement("Save");

                executionLog.Log("EquipmentModifierError", "Verify modifier is not mandatory");
                Assert.IsFalse(eqiupment_EquipmentHelper.IsElementPresent("//*[@id='EquipmentModifier-error']"));
                eqiupment_EquipmentHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EquipmentModifierError");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Equipment Modifier Error");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Equipment Modifier Error", "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("Equipment Modifier Error");
                        TakeScreenshot("EquipmentModifierError");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentModifierError.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EquipmentModifierError");
                        string id            = loginHelper.getIssueID("Equipment Modifier Error");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EquipmentModifierError.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Equipment Modifier Error"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Equipment Modifier Error");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EquipmentModifierError");
                executionLog.WriteInExcel("Equipment Modifier Error", Status, JIRA, "Equipment Management");
            }
        }
Пример #30
0
        public void verifyMerchantCategoryCreated()
        {
            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 masterData_CategoryHelper = new MasterData_CategoryHelper(GetWebDriver());

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

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

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

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

                executionLog.Log("VerifyMerchantCategoryCreated", "Visit Craete Client");
                VisitOffice("categories");
                masterData_CategoryHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Search Cients");
                masterData_CategoryHelper.TypeText("SearchName", "Clients");
                masterData_CategoryHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Open category");
                masterData_CategoryHelper.ClickElement("Category1");
                masterData_CategoryHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Click on Create button");
                masterData_CategoryHelper.ClickElement("MerchantCreate");
                masterData_CategoryHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Enter Name of category");
                masterData_CategoryHelper.TypeText("CategoryName", CatName);

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

                executionLog.Log("VerifyMerchantCategoryCreated", "Verify creation message");
                masterData_CategoryHelper.WaitForText("Category saved successfully.", 05);
                masterData_CategoryHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Enter Merchant Category name to search");
                masterData_CategoryHelper.TypeText("SearchMerchant", CatName);
                masterData_CategoryHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyMerchantCategoryCreated", "Click on Delete icon");
                masterData_CategoryHelper.ClickElement("DeleteMerchant1");
                masterData_CategoryHelper.AcceptAlert();
                masterData_CategoryHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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