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

            var oXMLData = new XMLParse();

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

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

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


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

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

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

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Redirect To Document");
                VisitOffice("documents");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Click On Create");
                officeActivities_DocumentHelper.ClickElement("ClickOnDoc");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "ClickOnCreate");
                officeActivities_DocumentHelper.TypeText("Name", "DELETE DOCUMENT");
                string pathtofile = GetPathToFile() + "index.jpg";

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Attach File");
                officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Click on Save");
                officeActivities_DocumentHelper.ClickElement("Save");

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Verify message");
                officeActivities_DocumentHelper.WaitForText("Document saved successfully.", 05);
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Search Documet ");
                officeActivities_DocumentHelper.TypeText("SearchDocumet", "DELETE DOCUMENT");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

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

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Click on Checkbox");
                officeActivities_DocumentHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Click On delete");
                officeActivities_DocumentHelper.ClickElement("ClickOndelete");

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Accept alert messsage.");
                officeActivities_DocumentHelper.AcceptAlert();

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Verify Document deleted successfully.");
                officeActivities_DocumentHelper.WaitForText("Document deleted successfully.", 10);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Click on Recycle bin");
                officeActivities_DocumentHelper.ClickElement("ClickOnReycleBin");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Search Documet ");
                officeActivities_DocumentHelper.TypeText("SearchDocumet", "DELETE DOCUMENT");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

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

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "ClickOnDeletePer");
                officeActivities_DocumentHelper.ClickElement("ClickOnDeletePer");

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "Accept alert messsage.");
                officeActivities_DocumentHelper.AcceptAlert();
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("PermanentlyDeleteDocumentNewSkin", "verify Document Permanently Deleted.");
                officeActivities_DocumentHelper.WaitForText("Document Permanently Deleted.", 10);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

            // Variable
            var    name        = "Doc" + RandomNumber(1, 9999);
            var    email       = "Test" + GetRandomNumber() + "@gmail.com";
            var    ValidFile   = GetPathToFile() + "index.jpg";
            var    InvalidFile = GetPathToFile() + "chrome.exe";
            String JIRA        = "";
            String Status      = "Pass";

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

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

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Redirect at create document page");
                VisitOffice("documents/create");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

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

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

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Redirect at document page");
                VisitOffice("documents");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "verify page title");
                VerifyTitle("Documents");

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Search created document.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Click on any document.");
                officeActivities_DocumentsHelper.ClickElement("OpenDoc");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document status.");
                officeActivities_DocumentsHelper.VerifyText("VerifyStatus", "Active");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document category.");
                officeActivities_DocumentsHelper.VerifyText("VerifyCategory", "click to add");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document responsibility.");
                officeActivities_DocumentsHelper.VerifyText("VerifyResponsibility", "Howard Tang");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Click on edit button.");
                officeActivities_DocumentsHelper.ClickElement("EditLink");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Select status for document.");
                officeActivities_DocumentsHelper.SelectByText("Status", "InActive");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Select category for document.");
                officeActivities_DocumentsHelper.SelectByText("Category", "pdf");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Select owner for document.");
                officeActivities_DocumentsHelper.SelectByText("AssignOwner", "Howard Tang");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document status.");
                officeActivities_DocumentsHelper.VerifyText("VerifyStatus", "InActive");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document category.");
                officeActivities_DocumentsHelper.VerifyText("Category2", "pdf");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Verify label for document responsibility.");
                officeActivities_DocumentsHelper.VerifyText("VerifyResponsibility", "Howard Tang");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Click on delete icon.");
                officeActivities_DocumentsHelper.ClickElement("DeleteVersion");
                officeActivities_DocumentsHelper.AcceptAlert();

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

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Redirect at documents recyclebin page.");
                VisitOffice("documents/recyclebin");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Search document by name.");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", name);
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Select 'All' at Owner Field");
                officeActivities_DocumentsHelper.SelectByText("OwnerField", "All");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Click on delete icon.");
                officeActivities_DocumentsHelper.ClickElement("DeleteRecycle");

                executionLog.Log("VerifyQuickLookLabelsForDocuments", "Acccept alert to delete doc.");
                officeActivities_DocumentsHelper.AcceptAlert();

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

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

            XMLParse oXMLData = new XMLParse();

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

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

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

            // Random Variable
            String JIRA    = "";
            String Status  = "Pass";
            var    docname = "Testdoc" + RandomNumber(111, 9999);

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

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

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Redirect to Create Document page");
                VisitOffice("documents/create");

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Enter document name");
                officeActivities_DocumentsHelper.TypeText("Name", docname);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Upload document");
                officeActivities_DocumentsHelper.UploadFile("//*[@id='DocumentFile']", "C:/Users/Public/Pictures/Sample Pictures/Desert.jpg");

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Select User Group");
                officeActivities_DocumentsHelper.SelectByText("UserGroup", "Secondary");

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Click on Save button");
                officeActivities_DocumentsHelper.ClickElement("Save");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Enter document name in Search field");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", docname);
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Open document");
                officeActivities_DocumentsHelper.ClickElement("OpenDoc");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Click on User Group");
                officeActivities_DocumentsHelper.ClickElement("AssgnUserGroup");
                officeActivities_DocumentsHelper.WaitForWorkAround(4000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Verify User not directed to Compose Email page");
                officeActivities_DocumentsHelper.VerifyTextNotAvailable("E-Mails");
                Console.WriteLine("User is not redirected to Compose Email page");

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Redirect to All Document page");
                VisitOffice("documents");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Enter document name in Search field");
                officeActivities_DocumentsHelper.TypeText("SearchDocumet", docname);
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Select document");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Click on Delete button");
                officeActivities_DocumentsHelper.ClickElement("ClickOndelete");
                //officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("VerifyRedirectedToEmailPageIssue", "Accept Alert");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForText("Document deleted successfully.", 05);
                Console.WriteLine("Document Deleted");
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            XMLParse oXMLData = new XMLParse();

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

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

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

            // Variable
            var    name        = "Doc" + RandomNumber(1, 9999);
            var    email       = "Test" + GetRandomNumber() + "@gmail.com";
            String ValidFile   = GetPathToFile() + "index.jpg";
            String InvalidFile = GetPathToFile() + "chrome.exe";
            String JIRA        = "";
            String Status      = "Pass";


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                VerifyTitle("Documents");

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

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

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

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

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

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

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

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

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

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

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

                VerifyTitle("Documents");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Select created in displayed columns.");
                officeActivities_DocumentHelper.SelectByText("DisplayedCols", "Created");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Select owner in displayed columns.");
                officeActivities_DocumentHelper.SelectByText("DisplayedCols", "Owner");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

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

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

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

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify created not present on page.");
                officeActivities_DocumentHelper.IsElementNotPresent("HeadCreated");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify owner not present on page.");
                officeActivities_DocumentHelper.IsElementNotPresent("HeadOwner");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify Modified not present on page.");
                officeActivities_DocumentHelper.IsElementNotPresent("HeadModified");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Redirect at leads page.");
                VisitOffice("leads");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify page title as documents");
                VerifyTitle("Documents");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify default position of owner column.");
                officeActivities_DocumentHelper.IsElementPresent("HeadOwner6");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

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

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeActivities_DocumentHelper.ClickElement("MoveUp");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeActivities_DocumentHelper.ClickElement("MoveUp");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Move status 1 step up.");
                officeActivities_DocumentHelper.ClickElement("MoveUp");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Select owner in displayed column.");
                officeActivities_DocumentHelper.SelectByText("DisplayedCols", "Owner");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Move owner 1 step down.");
                officeActivities_DocumentHelper.ClickElement("MoveDown");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

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

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify changed position of status column.");
                officeActivities_DocumentHelper.IsElementPresent("HeadStatus3");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "Verify changed position of owner column.");
                officeActivities_DocumentHelper.IsElementPresent("HeadOwner7");
                officeActivities_DocumentHelper.WaitForWorkAround(3000);

                executionLog.Log("VerifyDocumentsAdvanceFilerColumnOrder", "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("VerifyDocumentsAdvanceFilerColumnOrder");
                String Error       = executionLog.GetAllTextFile("Error");
                Console.WriteLine(Error);
                if (counter == "")
                {
                    counter = "0";
                }
                bool result = loginHelper.CheckExstingIssue("Verify Documents Advance Filer Column Order");
                if (!result)
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        loginHelper.CreateIssue("Verify Documents 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 Documents Advance Filer Column Order");
                        TakeScreenshot("VerifyDocumentsAdvanceFilerColumnOrder");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDocumentsAdvanceFilerColumnOrder.png";
                        loginHelper.AddAttachment(location, id);
                    }
                }
                else
                {
                    if (Int16.Parse(counter) < 9)
                    {
                        executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString());
                        TakeScreenshot("VerifyDocumentsAdvanceFilerColumnOrder");
                        string id            = loginHelper.getIssueID("Verify Documents Advance Filer Column Order");
                        string directoryName = loginHelper.GetnewDirectoryName(GetPath());
                        var    location      = directoryName + "\\VerifyDocumentsAdvanceFilerColumnOrder.png";
                        loginHelper.AddAttachment(location, id);
                        loginHelper.AddComment(loginHelper.getIssueID("Verify Documents Advance Filer Column Order"), "This issue is still occurring");
                    }
                }
                JIRA = loginHelper.getIssueID("Verify Documents Advance Filer Column Order");
                //   executionLog.DeleteFile("Error");
                throw;
            }
            finally
            {
                executionLog.DeleteFile("VerifyDocumentsAdvanceFilerColumnOrder");
                executionLog.WriteInExcel("Verify Documents Advance Filer Column Order", Status, JIRA, "Tasks Management");
            }
        }
Beispiel #6
0
        public void activitiesBulkUpdatesDocs()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

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

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

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

            // Variable
            var    name        = "Doc" + RandomNumber(1, 9999);
            var    email       = "Test" + GetRandomNumber() + "@gmail.com";
            var    ValidFile   = GetPathToFile() + "index.jpg";
            var    InvalidFile = GetPathToFile() + "chrome.exe";
            String JIRA        = "";
            String Status      = "Pass";


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

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

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Redirect to document page");
                VisitOffice("documents");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "verify title documents.");
                VerifyTitle("Documents");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on Bulk Update");
                officeActivities_DocumentsHelper.ClickElement("BulkUpdate");
                officeActivities_DocumentsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on Change Status");
                officeActivities_DocumentsHelper.ClickElement("ChangeStatus");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Verify alert text for selecting document.");
                officeActivities_DocumentsHelper.VerifyAlertText("Please select atleast one record to proceed.");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Accept alert message by clicking ok.");
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on first document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on second document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox2");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on bulk update.");
                officeActivities_DocumentsHelper.ClickElement("BulkUpdate");
                officeActivities_DocumentsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on change status.");
                officeActivities_DocumentsHelper.ClickElement("ChangeStatus");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

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

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on update button.");
                officeActivities_DocumentsHelper.ClickElement("UpdateStatus");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);
                officeActivities_DocumentsHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Wait for success text.");
                officeActivities_DocumentsHelper.WaitForText("Document status updated successfully.", 5);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Redirect to create document page");
                VisitOffice("documents");
                officeActivities_DocumentsHelper.WaitForWorkAround(3000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "verify title");
                VerifyTitle("Documents");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on first document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on second document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox2");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on bulk update.");
                officeActivities_DocumentsHelper.ClickElement("BulkUpdate");
                officeActivities_DocumentsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on change owner.");
                officeActivities_DocumentsHelper.ClickJs("ChangeOwner");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Select owner to be updated.");
                officeActivities_DocumentsHelper.SelectByText("SelectOwner", "Howard Tang");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on update button.");
                officeActivities_DocumentsHelper.ClickElement("UpdateOwner");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);
                officeActivities_DocumentsHelper.AcceptAlert();

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Wait for success text.");
                officeActivities_DocumentsHelper.WaitForText("Document owner updated successfully.", 10);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on first document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on second document.");
                officeActivities_DocumentsHelper.ClickElement("ClickOnCheckBox2");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on bulk update.");
                officeActivities_DocumentsHelper.ClickElement("BulkUpdate");
                officeActivities_DocumentsHelper.WaitForWorkAround(1000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on change user group.");
                officeActivities_DocumentsHelper.ClickJs("ChangeUserGroup");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Select group to be updated.");
                officeActivities_DocumentsHelper.SelectByText("SelectGroup", "Primary Group");

                executionLog.Log("ActivitiesBulkUpdatesDocs", "Click on update button.");
                officeActivities_DocumentsHelper.ClickForce("UpdateOwner");
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);
                officeActivities_DocumentsHelper.AcceptAlert();
                officeActivities_DocumentsHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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

            var oXMLData = new XMLParse();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            var oXMLData = new XMLParse();

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

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

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

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

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

                executionLog.Log("UniqueDocError", "Redirect To create Document page");
                VisitOffice("documents/create");

                executionLog.Log("UniqueDocError", "Verify title");
                VerifyTitle("Create a New Document");

                executionLog.Log("UniqueDocError", "ClickOnCreate");
                officeActivities_DocumentHelper.TypeText("Name", "Doc1");

                string pathtofile = GetPathToFile() + "Upload1.pdf";
                executionLog.Log("UniqueDocError", "Attach File");
                officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile);

                executionLog.Log("UniqueDocError", "Select releted to");
                officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client");

                executionLog.Log("UniqueDocError", "Select Client");
                officeActivities_DocumentHelper.ClickElement("Assign");
                officeActivities_DocumentHelper.WaitForWorkAround(4000);

                officeActivities_DocumentHelper.ClickElement("AssignUser");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Click on Save");
                officeActivities_DocumentHelper.ClickElement("Save");

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

                executionLog.Log("UniqueDocError", "Redirect To Document");
                VisitOffice("documents/create");

                executionLog.Log("UniqueDocError", "Verify title");
                VerifyTitle("Create a New Document");

                executionLog.Log("UniqueDocError", "ClickOnCreate");
                officeActivities_DocumentHelper.TypeText("Name", "Doc2");

                pathtofile = GetPathToFile() + "Upload2.pdf";
                executionLog.Log("UniqueDocError", "Attach File");
                officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile);

                executionLog.Log("UniqueDocError", "Select releted to");
                officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Select Client");
                officeActivities_DocumentHelper.ClickElement("Assign");
                officeActivities_DocumentHelper.WaitForWorkAround(4000);

                officeActivities_DocumentHelper.ClickElement("AssignUser");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Click on Save");
                officeActivities_DocumentHelper.ClickElement("Save");

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

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

                executionLog.Log("UniqueDocError", "Redirect To Document");
                VisitOffice("documents/create");

                executionLog.Log("UniqueDocError", "ClickOnCreate");
                officeActivities_DocumentHelper.TypeText("Name", "Doc3");

                pathtofile = GetPathToFile() + "Upload3.pdf";
                executionLog.Log("UniqueDocError", "Attach File");
                officeActivities_DocumentHelper.UploadFile("//*[@id='DocumentFile']", pathtofile);

                executionLog.Log("UniqueDocError", "Select releted to");
                officeActivities_DocumentHelper.SelectByText("ReletedTo", "Client");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Select Client");
                officeActivities_DocumentHelper.ClickElement("Assign");
                officeActivities_DocumentHelper.WaitForWorkAround(4000);

                officeActivities_DocumentHelper.ClickElement("AssignUser");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Click on Save");
                officeActivities_DocumentHelper.ClickElement("Save");

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

                executionLog.Log("UniqueDocError", "Go to client page");
                VisitOffice("clients");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Verify title");
                VerifyTitle();
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Open the client");
                office_ClientsHelper.ClickElement("Client1");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Click on info");
                office_ClientsHelper.ClickElement("Info");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);

                executionLog.Log("UniqueDocError", "Verify title");
                VerifyTitle("- Details");
                officeActivities_DocumentHelper.WaitForWorkAround(2000);
            }
            catch (Exception e)
            {
                executionLog.Log("Error", e.StackTrace);
                Status = "Fail";

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