public void verifyOfficeCreatedSuccessfully()
        {
            string[] username1 = null;
            string[] password1 = null;

            var oXMLData = new XMLParse();

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

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

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

            // Variable random

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyOfficeCreatedSuccessfully", " Click on save button");
                corpOffice_OfficeHelper.ClickElement("Save");

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

                executionLog.Log("VerifyOfficeCreatedSuccessfully", "Verify unexpected text not present.");
                corpOffice_OfficeHelper.VerifyTextNot("Array  ....");

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

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

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

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

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

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

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

                executionLog.Log("VerifyOfficeCreatedSuccessfully", "Wait for delete message. ");
                corpOffice_OfficeHelper.WaitForText("Office deleted successfully.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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


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

            //Variable random
            var    usernme = "TESTUSER" + RandomNumber(676, 99999);
            var    name    = "Meeting" + RandomNumber(99, 999);
            String JIRA    = "";
            String Status  = "Pass";

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

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

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Redirect at office page.");
                VisitCorp("offices");

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

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Click on any office..");
                corpOffice_OfficeHelper.ClickElement("ClickOnAnyCorp");

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Click on add meeting.");
                corpOffice_OfficeHelper.ClickElement("NewMeeting");

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Enter meeting subject.");
                corpOffice_OfficeHelper.TypeText("MeetingSubject", name);

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Enter start date.");
                corpOffice_OfficeHelper.TypeText("StartDate", "2015-03-25");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Enter same due date as start date..");
                corpOffice_OfficeHelper.TypeText("DueDate", "2015-03-25");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Select start time");
                corpOffice_OfficeHelper.Select("StartHour", "02");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Select start minute");
                corpOffice_OfficeHelper.Select("StartMinute", "00");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);


                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Select due hour");
                corpOffice_OfficeHelper.Select("DueHour", "01");

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Click on save meeting.");
                corpOffice_OfficeHelper.ClickElement("SaveMeeting");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Verify alert text for lesser start date and time.");
                corpOffice_OfficeHelper.VerifyAlertText("Start Date & Time should lesser than or equal to End Date & Time.");

                executionLog.Log("VerifyMeetingTImeIssueForOffices", "Click ok to accept alert.");
                corpOffice_OfficeHelper.AcceptAlert();
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

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

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

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Visit Corp offices");
                VisitCorp("offices");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Click on create office button");
                corpOffice_OfficeHelper.ClickElement("Create");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

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

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

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("VendorName", "VenderTEST");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("VendorCode", "1234");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("OfficePhoneNumber", "1234567890");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("BusinessPhoneNumber", "1234567890");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("FaxNumber", "1234567890");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("LinkedURL", "Linked.com");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("FacebookURL", "Facebook.com");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter TwitterURL");
                corpOffice_OfficeHelper.TypeText("TwitterURL", "Twitter.com");

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Select Zip Code");
                corpOffice_OfficeHelper.TypeText("ZIpCode", "60601");
                corpOffice_OfficeHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter PrimaryUserName");
                corpOffice_OfficeHelper.TypeText("PrimaryUserName", usernme);

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Click on AutoGenPassword checkbox");
                corpOffice_OfficeHelper.ClickElement("AutoGenPassword");
                corpOffice_OfficeHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Enter PrimaryPassword");
                corpOffice_OfficeHelper.TypeText("PrimaryPassword", "1qaz!QAZ");

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

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Select eAddress type as e-mail.");
                corpOffice_OfficeHelper.Select("EaddressType", "E-Mail");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Select e-Address label as home.");
                corpOffice_OfficeHelper.Select("EaddressLabel", "Home");

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Click on save button.");
                corpOffice_OfficeHelper.ClickElement("Save");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Wait for success message");
                corpOffice_OfficeHelper.WaitForText("Office created successfully.", 10);

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

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Click on edit icon.");
                corpOffice_OfficeHelper.ClickElement("EditOffice");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Wait for locator to present.");
                corpOffice_OfficeHelper.WaitForElementPresent("EaddressLabel", 10);

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Verify eaddress label not changed to work.");
                corpOffice_OfficeHelper.VerifyText("EaddressLabel", "Home");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Click on save.");
                corpOffice_OfficeHelper.ClickElement("SaveEdit");

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Wait for updation success text.");
                corpOffice_OfficeHelper.WaitForText("Office updated successfully.", 10);

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

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

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

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

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

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

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

                executionLog.Log("VerifyEadressLabelNotChangedAutomatically", "Wait for delete message. ");
                corpOffice_OfficeHelper.WaitForText("Office deleted successfully.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyEadressLabelNotChangedAutomatically");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Eadress Label Not Changed Automatically");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Eadress Label Not Changed Automatically", "Bug", "Medium", "Create Office page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Eadress Label Not Changed Automatically");
                        TakeScreenshot("VerifyEadressLabelNotChangedAutomatically");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEadressLabelNotChangedAutomatically.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyEadressLabelNotChangedAutomatically");
                        string id            = loginHelper.getIssueID("Verify Eadress Label Not Changed Automatically");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyEadressLabelNotChangedAutomatically.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Eadress Label Not Changed Automatically"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Eadress Label Not Changed Automatically");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyEadressLabelNotChangedAutomatically");
                executionLog.WriteInExcel("Verify Eadress Label Not Changed Automatically", Status, JIRA, "Corp Office");
            }
        }
Esempio n. 4
0
        public void corporatePortal1()
        {
            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 corpOffice_OfficeHelper = new CorpOffice_OfficeHelper(GetWebDriver());

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

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

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

                executionLog.Log("CorporatePortal1", "Redircet to office");
                VisitCorp("offices");

                executionLog.Log("CorporatePortal1", "Click On Create New Button");
                corpOffice_OfficeHelper.ClickElement("Create");

                executionLog.Log("CorporatePortal1", "Enter Name");
                corpOffice_OfficeHelper.TypeText("Name", Office);

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

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

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

                executionLog.Log("CorporatePortal1", "Enter VenderName");
                corpOffice_OfficeHelper.TypeText("VendorName", "VenderTEST");

                executionLog.Log("CorporatePortal1", "Enter Vender code");
                corpOffice_OfficeHelper.TypeText("VendorCode", "1234");

                executionLog.Log("CorporatePortal1", "Enter office phone number");
                corpOffice_OfficeHelper.TypeText("OfficePhoneNumber", "1234567890");

                executionLog.Log("CorporatePortal1", "Enter BusinessPhoneNumber");
                corpOffice_OfficeHelper.TypeText("BusinessPhoneNumber", "1234567890");

                executionLog.Log("CorporatePortal1", "Enter FaxNumber");
                corpOffice_OfficeHelper.TypeText("FaxNumber", "1234567890");

                executionLog.Log("CorporatePortal1", "Enter LinkedURL");
                corpOffice_OfficeHelper.TypeText("LinkedURL", "Linked.com");

                executionLog.Log("CorporatePortal1", "Enter FacebookURL");
                corpOffice_OfficeHelper.TypeText("FacebookURL", "Facebook.com");

                executionLog.Log("CorporatePortal1", "Enter TwitterURL");
                corpOffice_OfficeHelper.TypeText("TwitterURL", "Twitter.com");

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

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

                executionLog.Log("CorporatePortal1", "Enter Zip Code");
                corpOffice_OfficeHelper.TypeText("ZIpCode", "60601");
                corpOffice_OfficeHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal1", "Enter PrimaryUserName");
                corpOffice_OfficeHelper.TypeText("PrimaryUserName", usernme);

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

                executionLog.Log("CorporatePortal1", "Enter Primary Password");
                corpOffice_OfficeHelper.TypeText("PrimaryPassword", "1qaz!QAZ");

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

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

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

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

                executionLog.Log("CorporatePortal1", "Save");
                corpOffice_OfficeHelper.ClickElement("Save");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Wait for Confirmation");
                corpOffice_OfficeHelper.WaitForText("Office created successfully.", 50);

                executionLog.Log("CorporatePortal1", "Visit Office");
                VisitCorp("offices");

                executionLog.Log("CorporatePortal1", "Enter Name To Search");
                corpOffice_OfficeHelper.TypeText("EnterNameToSearch", Office);

                executionLog.Log("CorporatePortal1", "Click on Edit Icon");
                corpOffice_OfficeHelper.ClickElement("EditOffice");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal1", "Click on Save");
                corpOffice_OfficeHelper.ClickElement("SaveEdit");
                corpOffice_OfficeHelper.WaitForWorkAround(3000);

                executionLog.Log("CorporatePortal1", "Wait for Confirmation");
                corpOffice_OfficeHelper.WaitForText("Office updated successfully.", 50);

                executionLog.Log("CorporatePortal1", "Goto Office");
                VisitCorp("offices");

                executionLog.Log("CorporatePortal1", "Enter Name To Search");
                corpOffice_OfficeHelper.TypeText("EnterNameToSearch", Office);

                executionLog.Log("CorporatePortal1", "Click On Office");
                corpOffice_OfficeHelper.ClickElement("ClickOnOffice");

                executionLog.Log("CorporatePortal1", "Click On Send Email");
                corpOffice_OfficeHelper.ClickElement("ClickOnSendEmail");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Enter Email");
                corpOffice_OfficeHelper.TypeText("EnterToEmail", "*****@*****.**");

                executionLog.Log("CorporatePortal1", "Enter Email Subject");
                corpOffice_OfficeHelper.TypeText("EnterSubjectEmail", "Test Subject");

                executionLog.Log("CorporatePortal1", "Click On Send Email Pop Up");
                corpOffice_OfficeHelper.ClickElement("ClickOnSendEmailPopUp");
                corpOffice_OfficeHelper.WaitForWorkAround(4000);

                executionLog.Log("CorporatePortal1", "Verify Confirmation");
                corpOffice_OfficeHelper.WaitForText("Email Sent Successfully.", 20);

                executionLog.Log("CorporatePortal1", "Click On Add Notes");
                corpOffice_OfficeHelper.ClickElement("ClickOnAddNotes");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Enter Notes Subject");
                corpOffice_OfficeHelper.TypeText("EnterNoteSubject", "Test Subject");

                executionLog.Log("CorporatePortal1", "Click Save");
                corpOffice_OfficeHelper.ClickElement("SaveNotesOffice");

                executionLog.Log("CorporatePortal1", "Enter Notes Subject");
                corpOffice_OfficeHelper.WaitForText("Note Created Successfully", 10);

                executionLog.Log("CorporatePortal1", "Click on Add Documnet");
                corpOffice_OfficeHelper.ClickElement("AddDocumentOff");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Enter Subject");
                corpOffice_OfficeHelper.TypeText("NameDocumentOff", "Test Doc Name");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Add attachment.");
                var FileName = GetPathToFile() + "index.jpg";
                corpOffice_OfficeHelper.UploadFile("//*[@id='DocumentFiles']", FileName);

                executionLog.Log("CorporatePortal1", "Click Save");
                corpOffice_OfficeHelper.ClickDisplayed("//a[@title='Save']");

                executionLog.Log("CorporatePortal1", "Verify");
                corpOffice_OfficeHelper.WaitForText("Documents successfully Added.", 10);

                executionLog.Log("CorporatePortal1", "Add Meeting");
                corpOffice_OfficeHelper.ClickElement("ClickOnMeeting");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Enter Subject");
                corpOffice_OfficeHelper.TypeText("EnterSubjectMeeting", "Test Subject");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Enter Meeting");
                corpOffice_OfficeHelper.TypeText("EnterMeetingStartDate", "2015-11-03");

                executionLog.Log("CorporatePortal1", "Click Save");
                corpOffice_OfficeHelper.ClickDisplayed("//a[@title='Save']");

                executionLog.Log("CorporatePortal1", "Verify");
                corpOffice_OfficeHelper.WaitForText("Meeting Created Successfully.", 20);

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

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

                executionLog.Log("CorporatePortal1", "Enter Name to search");
                corpOffice_OfficeHelper.TypeText("EnterSelenium", Office);
                corpOffice_OfficeHelper.WaitForWorkAround(5000);

                executionLog.Log("CorporatePortal1", "Click Delete btn  ");
                corpOffice_OfficeHelper.ClickElement("DeleteOffice");
                corpOffice_OfficeHelper.WaitForWorkAround(4000);

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

                executionLog.Log("CorporatePortal1", "Click Delete btn  ");
                corpOffice_OfficeHelper.ClickElement("ConfirmDelete");
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Accept alert message. ");
                corpOffice_OfficeHelper.AcceptAlert();
                corpOffice_OfficeHelper.WaitForWorkAround(2000);

                executionLog.Log("CorporatePortal1", "Wait for delete message. ");
                corpOffice_OfficeHelper.WaitForText("Office deleted successfully.", 50);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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