コード例 #1
0
        public void emailNoteForward()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

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

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

                executionLog.Log("EmailNoteForward", "Redirect to Notes create page");
                VisitOffice("notes/create");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EmailNoteForward", "Enter Subject ");
                officeActivities_NotesHelper.TypeText("Subject", "Email This Note");

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

                executionLog.Log("EmailNoteForward", "Verify Confirmation");
                officeActivities_NotesHelper.WaitForText("Note saved successfully.", 10);

                executionLog.Log("EmailNoteForward", "Search Note");
                officeActivities_NotesHelper.TypeText("EnterSubject", "Email This Note");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("EmailNoteForward", "Click on Note");
                officeActivities_NotesHelper.ClickElement("ClickOnNote");

                executionLog.Log("EmailNoteForward", "Wait for locator to be present.");
                officeActivities_NotesHelper.WaitForElementPresent("ClickOnEmail", 10);

                executionLog.Log("EmailNoteForward", "Click On Email This NOte");
                officeActivities_NotesHelper.ClickElement("ClickOnEmail");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("EmailNoteForward", "Verify Page title.");
                VerifyTitle("Compose");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteForward", "Enter Sender name");
                officeActivities_NotesHelper.TypeText("EnterToFiled", "*****@*****.**");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteForward", "Click send Button");
                officeActivities_NotesHelper.ClickElement("ClickSendBtn");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteForward", "Verify Email sent successfully");
                officeActivities_NotesHelper.WaitForText("E-Mail Sent Successfully.", 20);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("ActivitiesBulkUpdateNotes", "Go to notes page");
                VisitOffice("notes");

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

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on Bulk Update");
                officeActivities_NotesHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on Change Status");
                officeActivities_NotesHelper.ClickElement("ChangeStatus");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Verify alert text for selecting note.");
                officeActivities_NotesHelper.VerifyAlertText("Please select atleast one record to proceed.");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Accept alert message by clickin ok.");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first note.");
                officeActivities_NotesHelper.ClickElement("SelectNote1");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second note.");
                officeActivities_NotesHelper.ClickElement("SelectNote2");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update.");
                officeActivities_NotesHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change status.");
                officeActivities_NotesHelper.ClickElement("ChangeStatus");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Select status to be updated.");
                officeActivities_NotesHelper.SelectByText("SelectStatus", "Inactive");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button.");
                officeActivities_NotesHelper.ClickElement("UpdateStatus");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text.");
                officeActivities_NotesHelper.WaitForText("Note status updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateNotes", "Redirect at notes page.");
                VisitOffice("notes");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Verify Page title as notes.");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first notes.");
                officeActivities_NotesHelper.ClickElement("SelectNote1");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second notes.");
                officeActivities_NotesHelper.ClickElement("SelectNote2");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update.");
                officeActivities_NotesHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change owner.");
                officeActivities_NotesHelper.ClickElement("ChangeOwner");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Select owner to be updated.");
                officeActivities_NotesHelper.SelectByText("SelectOwner", "Ikuta Toma");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button.");
                officeActivities_NotesHelper.ClickElement("UpdateOwner");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text.");
                officeActivities_NotesHelper.WaitForText("Note owner updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdateNotes", "Redirect at notes page.");
                VisitOffice("notes");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Verify Page title as notes.");
                VerifyTitle("Notes");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on first note.");
                officeActivities_NotesHelper.ClickElement("SelectNote1");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on second note.");
                officeActivities_NotesHelper.ClickElement("SelectNote2");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on bulk update.");
                officeActivities_NotesHelper.ClickElement("BulkUpdate");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on change user group.");
                officeActivities_NotesHelper.ClickElement("ChangeGroup");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Select user group to be updated.");
                officeActivities_NotesHelper.Select("SelectGroup", "169");

                executionLog.Log("ActivitiesBulkUpdateNotes", "Click on update button.");
                officeActivities_NotesHelper.ClickElement("UpdateGroup");
                officeActivities_NotesHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdateNotes", "Wait for success text.");
                officeActivities_NotesHelper.WaitForText("Note user group updated successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("ActivitiesBulkUpdateNotes");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Activities Bulk Update Notes");
                if (!result)
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Activities Bulk Update Notes", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Activities Bulk Update Notes");
                        TakeScreenshot("ActivitiesBulkUpdateNotes");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesBulkUpdateNotes.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 5)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("ActivitiesBulkUpdateNotes");
                        string id            = loginHelper.getIssueID("Activities Bulk Update Notes");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\ActivitiesBulkUpdateNotes.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Activities Bulk Update Notes"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Activities Bulk Update Notes");
                executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("ActivitiesBulkUpdateNotes");
                executionLog.WriteInExcel("Activities Bulk Update Notes", Status, JIRA, "Office Activities");
            }
        }
コード例 #3
0
        public void leadsNotesUrlChange()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

            // Variable
            var Subject   = "Subject" + RandomNumber(1, 999);
            var FirstName = "LeadQA" + RandomNumber(1, 50);

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

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

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

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

                //office_LeadsHelper.TypeText("SearchLName", "Aslam Lead");
                //office_LeadsHelper.WaitForWorkAround(3000);

                executionLog.Log("LeadsNotesUrlChange", "Click On Advanced Filter");
                office_LeadsHelper.ClickElement("AdvanceFilter");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "Click On Show Activities");
                office_LeadsHelper.ClickElement("ShowActivities");
                office_LeadsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "Click On Client with notes");
                office_LeadsHelper.ClickElement("LeadWithNote");
                //office_ClientsHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "Click On Apply Filter");
                office_LeadsHelper.ClickElement("Apply");
                office_LeadsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("LeadsNotesUrlChange", "Select Activity >> Notes");
                office_LeadsHelper.Select("SelectActivityType", "Notes");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "select all in created by field");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "Click On Notes");
                office_LeadsHelper.PressEnter("ClickNotes1");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("LeadsNotesUrlChange", "Change the url with the url number of another office");
                VisitOffice("notes/view/765589");

                executionLog.Log("LeadsNotesUrlChange", "Verify Validation");
                officeActivities_NotesHelper.WaitForText("You don't have privileges to view this note.", 10);
                //officeActivities_NotesHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect To URL");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify subject column is visible on the page..");
                officeActivities_NotesHelper.IsElementPresent("HeadSubject");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify related to column is visible on the page.");
                officeActivities_NotesHelper.IsElementPresent("HeadRelatedTo");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify created column is visible on the page.");
                officeActivities_NotesHelper.IsElementPresent("HeadCreated");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select subject in displayed columns.");
                officeActivities_NotesHelper.SelectByText("DisplayedCols", "Subject");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols.");
                officeActivities_NotesHelper.ClickElement("RemoveCols");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select related to in displayed columns.");
                officeActivities_NotesHelper.SelectByText("DisplayedCols", "Related To");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols");
                officeActivities_NotesHelper.ClickElement("RemoveCols");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select created in displayed columns.");
                officeActivities_NotesHelper.SelectByText("DisplayedCols", "Created");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Click arrow to move column to avail cols");
                officeActivities_NotesHelper.ClickElement("RemoveCols");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify subject not present on page.");
                officeActivities_NotesHelper.IsElementNotPresent("HeadSubject");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify related to not present on page.");
                officeActivities_NotesHelper.IsElementNotPresent("HeadRelatedTo");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify created not present on page.");
                officeActivities_NotesHelper.IsElementNotPresent("HeadCreated");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect at tasks page.");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify default position of related to column.");
                officeActivities_NotesHelper.IsElementPresent("HeadRelatedTO2");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify default position of created by column.");
                officeActivities_NotesHelper.IsElementPresent("HeadCreatedBy3");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Redirect at tasks page.");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select related to in displayed column.");
                officeActivities_NotesHelper.SelectByText("DisplayedCols", "Related To");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Move related to 1 step up.");
                officeActivities_NotesHelper.ClickElement("MoveUp");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Select created by in displayed column.");
                officeActivities_NotesHelper.SelectByText("DisplayedCols", "Created By");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Move created by 1 step down.");
                officeActivities_NotesHelper.ClickElement("MoveDown");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify changed position of related to column.");
                officeActivities_NotesHelper.IsElementPresent("HeadRelatedTO1");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyNotesAdvanceFilerColumnOrder", "Verify changed position of created by column.");
                officeActivities_NotesHelper.IsElementPresent("HeadCreatedBy4");
                //officeActivities_NotesHelper.WaitForWorkAround(3000);

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

            XMLParse oXMLData = new XMLParse();

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

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

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

            // Random Variables
            var    FilerExe = GetPathToFile() + "chrome.exe";
            String JIRA     = "";
            String Status   = "Pass";


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

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

                executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Redirect at Create Note page");
                VisitOffice("notes/create");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Select Related To >> Tickets");
                officeActivities_NotesHelper.SelectByText("NoteParent", "Ticket");
                officeActivities_NotesHelper.WaitForWorkAround(1000);

                executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Click 'Select' button");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyRelatedToTicketsPopupInNotes", "Verify Ticket popup opened");
                officeActivities_NotesHelper.VerifyTextAvailable("Select Ticket");
            }

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyRelatedToTicketsPopupInNotes");
                String Error       = executionLog.GetAllTextFile("Error");
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Related To Tickets Popup In Notes");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Related To Tickets Popup In Notes", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Related To Tickets Popup In Notes");
                        TakeScreenshot("VerifyRelatedToTicketsPopupInNotes");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyRelatedToTicketsPopupInNotes.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyRelatedToTicketsPopupInNotes");
                        string id            = loginHelper.getIssueID("Verify Related To Tickets Popup In Notes");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyRelatedToTicketsPopupInNotes.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Related To Tickets Popup In Notes"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Related To Tickets Popup In Notes");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyRelatedToTicketsPopupInNotes");
                executionLog.WriteInExcel("Verify Related To Tickets Popup In Notes", Status, JIRA, "Office Activities");
            }
        }
コード例 #6
0
        public void verifyNotesCreatedAndModifiedByCredits()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", " Click On Create");
                officeActivities_NotesHelper.ClickElement("Create");

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

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

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

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

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Redirect at notes page.");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Select All create by field ");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Click on searched notes.");
                officeActivities_NotesHelper.ClickElement("ClickOnNotes");

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Verify notes created by credits");
                officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Verify notes Modified by credits");
                officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang");

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Select note parent");
                officeActivities_NotesHelper.SelectByText("NoteParent", "Client");

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

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

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Verify notes created by credits");
                officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang");

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Verify notes Modified by credits");
                officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang");

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

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Select All create by field ");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

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

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

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

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

                executionLog.Log("VerifyNotesCreatedAndModifiedByCredits", "Select All create by field ");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

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

                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("VerifyNotesCreatedAndModifiedByCredits");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Notes Created And Modified By Credits");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Notes Created And Modified By Credits", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Verify Notes Created And Modified By Credits");
                        TakeScreenshot("VerifyNotesCreatedAndModifiedByCredits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyNotesCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyNotesCreatedAndModifiedByCredits");
                        string id            = loginHelper.getIssueID("Verify Notes Created And Modified By Credits");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyNotesCreatedAndModifiedByCredits.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Notes Created And Modified By Credits"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Notes Created And Modified By Credits");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyNotesCreatedAndModifiedByCredits");
                executionLog.WriteInExcel("Verify Notes Created And Modified By Credits", Status, JIRA, "Office Activities");
            }
        }
コード例 #7
0
        public void emailNoteWithRelatedTo()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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


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

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

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

                executionLog.Log("EmailNoteWithRelatedTo", "Redirect To notes");
                VisitOffice("notes");

                executionLog.Log("EmailNoteWithRelatedTo", "Click on Create ");
                officeActivities_NotesHelper.ClickElement("Create");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("EmailNoteWithRelatedTo", "Enter Note Subject");
                officeActivities_NotesHelper.TypeText("Subject", Subject);

                executionLog.Log("EmailNoteWithRelatedTo", "Select Client");
                officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client");

                executionLog.Log("EmailNoteWithRelatedTo", "ClickIconToSelectClient");
                officeActivities_NotesHelper.ClickElement("SelectClient");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

                executionLog.Log("EmailNoteWithRelatedTo", "Click On Client");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteWithRelatedTo", "Click on Save button");
                officeActivities_NotesHelper.ClickElement("Save");
                officeActivities_NotesHelper.WaitForWorkAround(6000);

                executionLog.Log("EmailNoteWithRelatedTo", "Click On Notes");
                officeActivities_NotesHelper.ClickElement("ClickOnNotes");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteWithRelatedTo", "Click on Email Note");
                officeActivities_NotesHelper.ClickElement("EmailNote");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EmailNoteWithRelatedTo", "Verify selected client.");
                officeActivities_NotesHelper.VerifyText("VerifySelectedClient", "Client");

                executionLog.Log("AddNotesAdmin", "Redirect at notes page.");
                VisitOffice("notes");

                executionLog.Log("AddNotesAdmin", "Redirect at notes page.");
                officeActivities_NotesHelper.WaitForElementPresent("EnterSubject", 10);

                executionLog.Log("AddNotesAdmin", "Search subject by note");
                officeActivities_NotesHelper.TypeText("EnterSubject", Subject);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("AddNotesAdmin", "Search subject by note");
                officeActivities_NotesHelper.ClickElement("SelectNote1");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("AddNotesAdmin", "Click on delete note.");
                officeActivities_NotesHelper.ClickElement("DeleteNote");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("AddNotesAdmin", "Wait for delete text");
                officeActivities_NotesHelper.WaitForText("Note deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";
                String counter     = executionLog.readLastLine("counter");
                String Description = executionLog.GetAllTextFile("EmailNoteWithRelatedTo");
                String Error       = executionLog.GetAllTextFile("Error");

                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Email Note With Related To");
                Console.WriteLine("Stepp 2 after existing");
                if (!result)
                {
                    if (Int16.Parse(counter) < 15)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssueTest("Email Note With Related To", "Bug", "Medium", "Email note page", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error);
                        string id = loginHelper.getIssueID("Email Note With Related To");
                        TakeScreenshot("EmailNoteWithRelatedTo");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EmailNoteWithRelatedTo.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 15)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("EmailNoteWithRelatedTo");
                        string id            = loginHelper.getIssueID("Email Note With Related To");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\EmailNoteWithRelatedTo.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Email Note With Related To"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Email Note With Related To");
                //  executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("EmailNoteWithRelatedTo");
                executionLog.WriteInExcel("Email Note With Related To", Status, JIRA, "Email Actitvities");
            }
        }
コード例 #8
0
        public void verifyNoteWithExeForMeetingNotAdded()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            XMLParse oXMLData = new XMLParse();

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

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

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

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

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

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

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

                executionLog.Log("EditNotesAdmin", "Go to note page");
                VisitOffice("notes");

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

                executionLog.Log("EditNotesAdmin", " Click On Create");
                officeActivities_NotesHelper.ClickElement("Create");

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

                executionLog.Log("EditNotesAdmin", "Enter Name");
                officeActivities_NotesHelper.TypeText("Subject", name);

                executionLog.Log("EditNotesAdmin", "cLICK on Save  ");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("EditNotesAdmin", "Wait for text");
                officeActivities_NotesHelper.WaitForText("Note saved successfully. ", 10);

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

                executionLog.Log("EditNotesAdmin", "Select All in Created by fields");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("EditNotesAdmin", "Edit Subject");
                officeActivities_NotesHelper.TypeText("Subject", "Test");

                executionLog.Log("EditNotesAdmin", "Click On Save Btn");
                officeActivities_NotesHelper.ClickElement("Save");

                executionLog.Log("EditNotesAdmin", "Wait for text");
                officeActivities_NotesHelper.WaitForText("Note Updated Success.", 10);

                executionLog.Log("EditNotesAdmin", "Go to note page");
                VisitOffice("notes");

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

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

                executionLog.Log("EditNotesAdmin", "Select All in Created by fields");
                officeActivities_NotesHelper.SelectByText("CreatedbyField", "All");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("EditNotesAdmin", "Select First Note");
                officeActivities_NotesHelper.ClickElement("SelectNote1");
                officeActivities_NotesHelper.WaitForWorkAround(1000);

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

                executionLog.Log("EditNotesAdmin", "Accept alert message. ");
                officeActivities_NotesHelper.AcceptAlert();
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("EditNoteChangeHistory", "Redirect to URL");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(1000);

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

                executionLog.Log("EditNoteChangeHistory", "Wait for element to present");
                officeActivities_NotesHelper.WaitForElementPresent("Edit", 10);

                executionLog.Log("EditNoteChangeClient", " Click On Edit Icon");
                officeActivities_NotesHelper.ClickElement("Edit");

                executionLog.Log("EditNoteChangeHistory", "Verify title");
                VerifyTitle("Edit Note");

                executionLog.Log("EditNoteChangeClient", "Enter note subj new");
                officeActivities_NotesHelper.TypeText("Subject", editname);

                executionLog.Log("EditNoteChangeClient", "Select Module");
                officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client");

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

                //executionLog.Log("EditNoteChangeHistory", "Wait for element to present");
                //officeActivities_NotesHelper.WaitForElementPresent("ClickOnClient2", 10);

                executionLog.Log("EditNoteChangeClient", " Click client to select.");
                officeActivities_NotesHelper.ClickElement("ClickONClientNS");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                //executionLog.Log("EditNoteChangeHistory", "Wait for success message.");
                //officeActivities_NotesHelper.WaitForText("Note Updated Success.", 20);

                //executionLog.Log("EditNoteChangeHistory", "Wait for element to present");
                //officeActivities_NotesHelper.WaitForElementPresent("EnterSubject", 03);

                executionLog.Log("EditNoteChangeHistory", "Search note by Subject");
                officeActivities_NotesHelper.TypeText("EnterSubject", editname);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                ////executionLog.Log("EditNoteChangeHistory", "Wait for element to present");
                ////officeActivities_NotesHelper.WaitForElementPresent("ClickOnNote", 08);

                //executionLog.Log("EditNoteChangeHistory", "Verify edited name");
                //officeActivities_NotesHelper.VerifyText("ClickOnNote", editname);
                //Console.WriteLine("Note edited");

                executionLog.Log("EditNoteChangeHistory", "Click on edited note");
                officeActivities_NotesHelper.ClickElement("ClickOnNote");

                executionLog.Log("EditNoteChangeHistory", "Wait for element to present");
                officeActivities_NotesHelper.WaitForElementPresent(editname, 04);

                executionLog.Log("EditNoteChangeHistory", "verify ");
                officeActivities_NotesHelper.VerifyNoteEdited(editname);
                //officeActivities_NotesHelper.WaitForWorkAround(3000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("OpportunitiesnNotesUrlChange", "Goto  Opportunities");
                VisitOffice("opportunities");

                executionLog.Log("OpportunitiesnNotesUrlChange", "Click On Any Opportunities tab");
                office_OpportunitiesHelper.ClickElement("OpenOpportunity");
                office_OpportunitiesHelper.WaitForWorkAround(2000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Click Add Note button");
                office_OpportunitiesHelper.ClickElement("AddNote");
                office_OpportunitiesHelper.WaitForWorkAround(10000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Enter Note Subject");
                officeActivities_NotesHelper.TypeText("Subject", Subject);
                office_OpportunitiesHelper.WaitForWorkAround(10000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Click Save");
                officeActivities_NotesHelper.ClickElement("SaveNoteoppo");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Select Activity >> Notes");
                officeActivities_NotesHelper.Select("SelectActivityType", "Notes");
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("OpportunitiesnNotesUrlChange", "Click On Notes ");
                officeActivities_NotesHelper.ClickForce("ClickNotes1");
                officeActivities_NotesHelper.WaitForWorkAround(4000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Change the url with the url number of another office");
                VisitOffice("notes/view/16");

                executionLog.Log("OpportunitiesnNotesUrlChange", "Verify Validation");
                officeActivities_NotesHelper.WaitForText("You don't have privileges to view this note.", 10);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

                executionLog.Log("OpportunitiesnNotesUrlChange", "Redirect at notes page.");
                VisitOffice("notes");

                executionLog.Log("OpportunitiesnNotesUrlChange", "Search subject by note");
                officeActivities_NotesHelper.TypeText("EnterSubject", Subject);
                officeActivities_NotesHelper.WaitForWorkAround(2000);

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

                executionLog.Log("OpportunitiesnNotesUrlChange", "Search subject by note");
                officeActivities_NotesHelper.ClickElement("SelectNote1");

                executionLog.Log("OpportunitiesnNotesUrlChange", "Click on delete note.");
                officeActivities_NotesHelper.ClickElement("DeleteNote");

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

                executionLog.Log("OpportunitiesnNotesUrlChange", "Wait for delete text");
                officeActivities_NotesHelper.WaitForText("Note deleted successfully.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

                executionLog.Log("NotesAdvanceFilterResultsPP", "Redirect To URL");
                VisitOffice("notes");
                officeActivities_NotesHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button.");
                officeActivities_NotesHelper.ClickElement("Apply");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10);

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

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

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

                executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button.");
                officeActivities_NotesHelper.ClickElement("Apply");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10);

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

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

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

                executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button.");
                officeActivities_NotesHelper.ClickElement("Apply");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10);

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

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

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

                executionLog.Log("NotesAdvanceFilterResultsPP", "Click on apply button.");
                officeActivities_NotesHelper.ClickElement("Apply");
                officeActivities_NotesHelper.WaitForWorkAround(3000);
                //officeActivities_NotesHelper.WaitForElementPresent("No.ofResults", 10);

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

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