public void PageBar_GoToNextPage_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.AreEqual(0, testPageBar.CurrentPageIsNull);
                Assert.AreEqual(1, testPageBar.CurrentPageIsFirst);
                Assert.AreEqual(0, testPageBar.CurrentPageIsLast);

                Assert.AreEqual(1, testPageBar.GetCurrentPageNumber);
                Assert.AreEqual(1, testPageBar.PreviousPageIsNull);
                Assert.AreEqual(0, testPageBar.NextPageIsNull);
            }
        }
        public void PageBar_ItemsPerPageClick_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.IsTrue(testPageBar.IsParsingCorrect);
                Assert.AreEqual(0, testPageBar.ItemsPerPageOptionsContainerIsDisplayed);

                testPageBar.ItemsPerPageClick(driver);
                Assert.AreEqual(1, testPageBar.ItemsPerPageOptionsContainerIsDisplayed);
            }
        }
        public void WholeProgram_NewParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectName = ""; // Project Name
                ProjectsPage testPage    = new ProjectsPage(driver, projectName);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                ViewsMenu assigneesViewsMenu = new ViewsMenu(driver);
                assigneesViewsMenu.JobsView.ButtonClick();

                Thread.Sleep(5000);


                //IWebElement auxiliaryJob2 = driver.FindElements(By.ClassName("r_L")).ElementAt(2);



                //driver.FindElement(By.Id("jobsactivity")).Click();
                //Thread.Sleep(7000);
                //driver.FindElement(By.Id("SelectDeselectAll")).Click();
                //Thread.Sleep(7000);

                //auxiliaryJob.FindElement(By.TagName("div")).Click();
                //Thread.Sleep(7000);

                IWebElement auxiliaryJob = driver.FindElements(By.ClassName("r_L")).ElementAt(0);
                IReadOnlyCollection <IWebElement> childNodes = auxiliaryJob.FindElements(By.TagName("td"));

                ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].dispatchEvent(new Event('rowSelected'))", auxiliaryJob);

                Actions Action = new Actions(driver);

                for (int i = 0; i < 100; i++)
                {
                    Action.MoveToElement(auxiliaryJob).MoveByOffset(-100 - 1, 14).Click().Build().Perform();
                    Thread.Sleep(7000);
                }
                childNodes.ElementAt(0).Click();
                Thread.Sleep(7000);
            }
        }
        public void StatusFilters_ChosenActivityClick_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusFilters statusFiltersTest = new StatusFilters(driver);

                statusFiltersTest.FiltersPanelInitialization(driver);
                statusFiltersTest.ChosenActivityClick(driver, "Buffer_For_FreewayReview_H");

                statusFiltersTest = new StatusFilters(driver);
                statusFiltersTest.FiltersPanelInitialization(driver);

                /* Set of assertions */

                Assert.IsFalse(statusFiltersTest.FiltersButtonIsNull);
                Assert.AreEqual(1, statusFiltersTest.FiltersButtonIsDisplayed);
                Assert.AreEqual(1, statusFiltersTest.FiltersButtonIsClicked);

                Assert.AreEqual(0, statusFiltersTest.FiltersPanelIsNull);
                Assert.AreEqual(1, statusFiltersTest.FiltersPanelIsDisplayed);

                Assert.AreEqual(0, statusFiltersTest.LanguageFilterIsNull);
                Assert.AreEqual(1, statusFiltersTest.LanguageFilterIsDisplayed);
                Assert.AreEqual(0, statusFiltersTest.LanguagesFilterIsExpanded);
                Assert.AreEqual("Target Language", statusFiltersTest.LanguageFilterSelection);

                Assert.AreEqual(0, statusFiltersTest.ActivitiesFilterIsNull);
                Assert.AreEqual(1, statusFiltersTest.ActivitiesFilterIsDisplayed);
                Assert.AreEqual(0, statusFiltersTest.ActivitiesFilterIsExpanded);
                Assert.AreEqual("Buffer_For_FreewayReview_H", statusFiltersTest.ActivitiesFilterSelection);

                Assert.IsFalse(statusFiltersTest.ShowAllButtonIsNull);
                Assert.AreEqual(1, statusFiltersTest.ShowAllButtonIsEnabled);
                Assert.AreEqual(0, statusFiltersTest.ShowAllButtonIsClicked);
            }
        }
        public void PageBar_ParsingCorrectly_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Qlik";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.ActivitiesFilterClick(driver);
                testStatusPage.ChosenActivityClick(driver, "Buffer_for_FreewayReview_H");

                PageBar testPageBar = new PageBar(driver);

                /* Set of assertions */

                Assert.IsFalse(testPageBar.PageBarContainerIsNull);
                Assert.AreEqual(1, testPageBar.PageBarContainerIsDisplayed);

                Assert.AreEqual(0, testPageBar.NumberOfAllItemsIsNull);
                Assert.AreEqual(1, testPageBar.NumberOfAllItemsIsDisplayed);

                Assert.IsTrue(testPageBar.IsParsingCorrect);
                Assert.IsTrue(testPageBar.GetNumberOfAllItems > 0);

                Assert.AreEqual(1, testPageBar.PageNavigationContainerIsNull);

                Assert.AreEqual(-1, testPageBar.CurrentPageIsFirst);
                Assert.AreEqual(-1, testPageBar.GetCurrentPageNumber);

                Assert.AreEqual(-1, testPageBar.CurrentPageIsLast);
                Assert.AreEqual(-1, testPageBar.GetLastPageNumber);

                Assert.AreEqual(-1, testPageBar.NextPageIsNull);
                Assert.AreEqual(-1, testPageBar.PreviousPageIsNull);
            }
        }
        public void StatusNavigationBat_AssigneesButton_Test_2()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = "Corteva";
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusNavigationBar testNavigationBar = new StatusNavigationBar(driver);

                testNavigationBar.AssigneesClick(driver);
                testNavigationBar = new StatusNavigationBar(driver);

                testNavigationBar.AssigneesClick(driver);
                testNavigationBar = new StatusNavigationBar(driver);

                /* Set of assertions */

                Assert.IsFalse(testNavigationBar.NavigationPanelIsNull);
                Assert.AreEqual(1, testNavigationBar.NavigationPanelIsDisplayed);
                Assert.AreEqual("status", testNavigationBar.GetPageName);

                Assert.AreEqual(0, testNavigationBar.ActivitiesSubpageIsNull);
                Assert.AreEqual(1, testNavigationBar.ActivitiesSubpageIsDisplayed);
                Assert.AreEqual(0, testNavigationBar.ActivitiesSubpageIsClicked);

                Assert.AreEqual(0, testNavigationBar.AssigneesSubpageIsNull);
                Assert.AreEqual(1, testNavigationBar.AssigneesSubpageIsDisplayed);
                Assert.AreEqual(1, testNavigationBar.AssigneesSubpageIsClicked);
            }
        }
        public void ParticularProjectPage_ChangingItemsPerPage_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectTitle = ""; // Project Name
                ProjectsPage testPage     = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                /* Set of assertions */

                Assert.AreEqual("Your Profile has been saved successfully!", testProjectPage.GetInfoMessage);
            }
        }
        static void Main(string[] args)
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */


                string projectTitle  = ""; // Project Name
                string firstStepName = "InternalReview";

                Console.WriteLine("Hi, please chose TMS project name: \n" +
                                  "1) Porsche BAL 2.0 \n" +
                                  "2) Porsche Cosima");

                int projectChose = Int32.Parse(Console.ReadLine());

                switch (projectChose)
                {
                case 1:
                    projectTitle = "Porsche BAL 2.0";
                    break;

                case 2:
                    projectTitle = "Porsche Cosima";
                    break;

                default:
                    System.Environment.Exit(1);
                    break;
                }

                Console.WriteLine("Now, please chose TMS setting name: \n" +
                                  "1) Internal Review; " +
                                  "2) Editing");

                int settingChose = Int32.Parse(Console.ReadLine());

                switch (settingChose)
                {
                case 1:
                    firstStepName = "InternalReview";
                    break;

                case 2:
                    firstStepName = "Editing";
                    break;

                default:
                    System.Environment.Exit(1);
                    break;
                }

                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                ProjectsPage testPage = new ProjectsPage(driver, projectTitle);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                if (porscheAssigneesPage.ChosenActivityClick(driver, firstStepName) != 1)
                {
                    Console.WriteLine("There is no {0} steps!", firstStepName);
                    return;
                }
                porscheAssigneesPage = new AssigneesPage(driver);

                PageBar testPageBar = new PageBar(driver);
                testPageBar.ItemsPerPageSetMaximalValue(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                List <StatusAssigneeInfo> listOfStatusAssgineeInfo = new List <StatusAssigneeInfo>();
                StatusAssigneeInfo        auxiliary;

                foreach (var ass in asob.assigneesJobsList)
                {
                    Console.WriteLine(ass.GetJobsName);
                }


                foreach (Assignee ass in asob.assigneesList)
                {
                    for (int i = 0; i < ass.GetAssingeeJobsNumberInt; i++)
                    {
                        auxiliary = new StatusAssigneeInfo(ass, asob.assigneesJobsList.ElementAt(i));
                        listOfStatusAssgineeInfo.Add(auxiliary);
                    }
                    for (int i = 0; i < ass.GetAssingeeJobsNumberInt; i++)
                    {
                        asob.assigneesJobsList.RemoveAt(0);
                    }

                    Console.WriteLine(ass.GetAssigneeName + " " + ass.GetAssingeeJobsNumberInt);
                }

                foreach (var ass in listOfStatusAssgineeInfo)
                {
                    Console.WriteLine(ass.jobName + " " + ass.reviewerName + " " + ass.sourceLanguage);
                }

                asob = new AssigneesAndJobs(driver);
                asob.TagMultipleJobs(driver, 0, asob.GetAssigneeJobsListSize - 1);

                ViewsMenu assigneesViewsMenu = new ViewsMenu(driver);
                assigneesViewsMenu.JobsView.ButtonClick();

                JobsSectionJobs jsj = new JobsSectionJobs(driver);
                jsj.jobsPageBar.ItemsPerPageSetMaximalValue(driver);

                jsj = new JobsSectionJobs(driver);

                IReadOnlyCollection <IWebElement> auxiliaryCollection;
                ResultJob   auxiliaryJobs = new ResultJob();
                IWebElement jobsResultsContainer;

                IJavaScriptExecutor jse;

                string path = Path.Combine(Directory.GetCurrentDirectory(), "TestFile.csv");

                using (StreamWriter sw = new StreamWriter(path))
                {
                    string[] values1 = { "Job Name", "Reviewer Name", "Translator Name", "Source Language", "Target Language", "Effort", "Wordcount" };
                    string   line1   = String.Join(";", values1);

                    sw.WriteLine(line1);

                    foreach (var info in listOfStatusAssgineeInfo)
                    {
                        jse = (IJavaScriptExecutor)driver;
                        jse.ExecuteScript("arguments[0].scrollIntoView();", jsj.GetJobElement(driver, info.jobName));

                        jsj.ShowHistoryOfJob(driver, info.jobName);

                        JobHistoryFilter filter = new JobHistoryFilter(driver);

                        filter.FiltersPanelInitialization(driver);
                        filter.ChosenActivityClick(driver, "Translation");

                        filter = new JobHistoryFilter(driver);
                        filter.FiltersPanelInitialization(driver);

                        filter.SourceLanguageFilterClick(driver);
                        filter.ChosenSourceLanguageClick(driver, info.sourceLanguage);

                        filter = new JobHistoryFilter(driver);
                        filter.FiltersPanelInitialization(driver);

                        filter.TargetLanguageFilterClick(driver);
                        filter.ChosenTargetLanguageClick(driver, info.targetLanguage);

                        wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("r_L")));
                        auxiliaryCollection = driver.FindElements(By.Id("pup_avw"));

                        jobsResultsContainer = auxiliaryCollection.ElementAt(0);

                        auxiliaryCollection = jobsResultsContainer.FindElements(By.ClassName("r_L"));
                        auxiliaryJobs       = new ResultJob(auxiliaryCollection.ElementAt(0));

                        listOfStatusAssgineeInfo.ElementAt(listOfStatusAssgineeInfo.IndexOf(info)).TranslatorName = auxiliaryJobs.GetTranlatorName;

                        PopUpBody popuPBody = new PopUpBody(driver);
                        popuPBody.CloseButtonClick(driver);

                        string[] values = { info.jobName, info.reviewerName, info.translatorName, info.sourceLanguage, info.targetLanguage, info.effort, info.wordcount };
                        string   line   = String.Join(";", values);

                        sw.WriteLine(line);
                    }

                    sw.Flush();
                }


                // iterates over the users
                //foreach (var info in listOfStatusAssgineeInfo)
                //   {
                // creates an array of the user's values
                //  string[] values = { info.jobName, info.reviewerName, info.translatorName, info.sourceLanguage, info.targetLanguage };
                // creates a new line
                //   string line = String.Join(";", values);
                // writes the line
                // sw.WriteLine(line);
                //  }
                // flushes the buffer
                // sw.Flush();
                //  }
            }
        }
        public void AssigneesElement_ParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectName = ""; // Project Name
                ProjectsPage testPage    = new ProjectsPage(driver, projectName);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ActivitiesFilterClick(driver);
                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");

                PageBar pageBar = new PageBar(driver);
                pageBar.ItemsPerPageSetMaximalValue(driver);

                Thread.Sleep(5000);

                IReadOnlyCollection <IWebElement> r_LHObjects = driver.FindElements(By.ClassName("r_LH"));
                IReadOnlyCollection <IWebElement> r_LObjects  = driver.FindElements(By.ClassName("r_L"));

                //AssigneeAndHisJob firstAssingee = new AssigneeAndHisJob(r_LHObjects.ElementAt(0), r_LObjects.ElementAt(0));
                //Assert.AreNotEqual("", firstAssingee.assigneeName);
                //Assert.AreNotEqual("", firstAssingee.sourceLanguage);

                //AssigneesAndTheirJobs aTJ = new AssigneesAndTheirJobs(r_LHObjects, r_LObjects);
                //Assert.AreEqual(4, aTJ.assigneesAngTheirJobsList.Count);
                //Assert.AreEqual(0, aTJ.count);

                //IOrderedEnumerable<AssigneeAndHisJob> aTJOrdered = aTJ.assigneesAngTheirJobsList.OrderBy(x => x.targetLanguage);

                /*IEnumerable<AssigneeAndHisJob> auxiliaryEnumerable;
                 * List<string> differentLanguages = new List<string>();
                 *
                 * string auxiliaryString;
                 * int auxiliaryInt = 0;
                 *
                 * while (auxiliaryInt < aTJ.count)
                 * {
                 *  auxiliaryString = aTJOrdered.ElementAt(auxiliaryInt).targetLanguage;
                 *  if (auxiliaryString != "" && auxiliaryString != null)
                 *  {
                 *      differentLanguages.Add(auxiliaryString);
                 *  }
                 *
                 *  auxiliaryEnumerable = aTJ.assigneesAngTheirJobsList.Where(x => x.targetLanguage == auxiliaryString);
                 *  auxiliaryInt += auxiliaryEnumerable.Count();
                 * }
                 *
                 * //Assert.AreEqual(0, differentLanguages.Count);
                 *
                 * Actions a = new Actions(driver);
                 *
                 * a.Click(aTJ.assigneesAngTheirJobsList.ElementAt(0).webElement)
                 * .KeyDown(Keys.Shift)
                 * .MoveToElement(r_LObjects.ElementAt(2))
                 * .Click(aTJ.assigneesAngTheirJobsList.ElementAt(aTJ.count - 1).webElement)
                 * .Build()
                 * .Perform();
                 *
                 * AssingeesOnClickJobsMenu menu = new AssingeesOnClickJobsMenu(driver);
                 * menu.ClickTagJobsButton(driver);
                 *
                 * AssigneesPage afterTagging = new AssigneesPage(driver);
                 * afterTagging.ActivitiesClick(driver);*/

                StatusPage statusPageAfterTagging = new StatusPage(driver);
                statusPageAfterTagging.ClickAll(driver);

                Thread.Sleep(10000);
                StatusPage statusPageAll = new StatusPage(driver);
                Thread.Sleep(1000);
                statusPageAll.ActivitiesFilterClick(driver);
                Thread.Sleep(1000);

                statusPageAll.ChosenActivityClick(driver, "Translation");
                Thread.Sleep(10000);

                StatusPage translationPage = new StatusPage(driver);

                translationPage.TargetLanguageFilterClick(driver);
                Thread.Sleep(1000);

                //translationPage.ChosenGetTargetLanguageClick(driver, differentLanguages.ElementAt(1));

                Thread.Sleep(5000);

                pageBar = new PageBar(driver);
                pageBar.ItemsPerPageSetMaximalValue(driver);

                Thread.Sleep(5000);

                IReadOnlyCollection <IWebElement> r_LHTranslationJobs = driver.FindElements(By.ClassName("r_LH"));
                List <string> translationJobNames = new List <string>();

                IWebElement auxiliaryElement;

                foreach (IWebElement el in r_LHTranslationJobs)
                {
                    auxiliaryElement = el.FindElement(By.ClassName("grp_ttl"));
                    translationJobNames.Add(auxiliaryElement.Text);
                }

                //Assert.AreEqual("", differentLanguages.ElementAt(0));
                Assert.AreEqual("", translationJobNames.ElementAt(0));

                /* Set of assertions */

                /*AssigneeElement el = new AssigneeElement(assignees[0], assigneesJobs);
                 * Assert.AreEqual("bg-bg", el.AssigneeLanguage);
                 * Assert.AreEqual(el.GetAssigneeJobsNumberString, el.AssigneeJobsList.Count);*/

                Assert.AreEqual(0, r_LHObjects.Count);
                Assert.AreEqual(0, r_LObjects.Count);
            }
        }
        public void WholeProgram_NewParsingCorrectly_Test_3()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectName = ""; // Project Name
                ProjectsPage testPage    = new ProjectsPage(driver, projectName);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                PageBar testPageBar = new PageBar(driver);
                testPageBar.ItemsPerPageSetMaximalValue(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                List <StatusAssigneeInfo> listOfStatusAssgineeInfo = new List <StatusAssigneeInfo>();
                StatusAssigneeInfo        auxiliary;

                foreach (Assignee ass in asob.assigneesList)
                {
                    for (int i = 0; i < ass.GetAssingeeJobsNumberInt; i++)
                    {
                        auxiliary = new StatusAssigneeInfo(ass, asob.assigneesJobsList.ElementAt(i));
                        listOfStatusAssgineeInfo.Add(auxiliary);
                    }
                    asob.assigneesJobsList.RemoveRange(0, ass.GetAssingeeJobsNumberInt - 1);
                }

                asob = new AssigneesAndJobs(driver);
                asob.TagMultipleJobs(driver, 0, asob.GetAssigneeJobsListSize - 1);

                ViewsMenu assigneesViewsMenu = new ViewsMenu(driver);
                assigneesViewsMenu.JobsView.ButtonClick();

                JobsSectionJobs jsj = new JobsSectionJobs(driver);

                IReadOnlyCollection <IWebElement> auxiliaryCollection;
                ResultJob   auxiliaryJobs = new ResultJob();
                IWebElement jobsResultsContainer;

                foreach (var info in listOfStatusAssgineeInfo)
                {
                    jsj.ShowHistoryOfJob(driver, info.jobName);

                    JobHistoryFilter filter = new JobHistoryFilter(driver);

                    filter.FiltersPanelInitialization(driver);
                    filter.ChosenActivityClick(driver, "Translation");

                    filter = new JobHistoryFilter(driver);
                    filter.FiltersPanelInitialization(driver);

                    filter.SourceLanguageFilterClick(driver);
                    filter.ChosenSourceLanguageClick(driver, info.sourceLanguage);

                    filter = new JobHistoryFilter(driver);
                    filter.FiltersPanelInitialization(driver);

                    filter.TargetLanguageFilterClick(driver);
                    filter.ChosenTargetLanguageClick(driver, info.targetLanguage);

                    wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("r_L")));
                    auxiliaryCollection = driver.FindElements(By.Id("pup_avw"));

                    jobsResultsContainer = auxiliaryCollection.ElementAt(0);

                    auxiliaryCollection = jobsResultsContainer.FindElements(By.ClassName("r_L"));
                    auxiliaryJobs       = new ResultJob(auxiliaryCollection.ElementAt(0));

                    listOfStatusAssgineeInfo.ElementAt(listOfStatusAssgineeInfo.IndexOf(info)).TranslatorName = auxiliaryJobs.GetTranlatorName;

                    PopUpBody popuPBody = new PopUpBody(driver);
                    popuPBody.CloseButtonClick(driver);
                }


                string path = Path.Combine(Directory.GetCurrentDirectory(), "TestFile.csv");

                using (StreamWriter sw = new StreamWriter(path))
                {
                    // iterates over the users
                    foreach (var info in listOfStatusAssgineeInfo)
                    {
                        // creates an array of the user's values
                        string[] values = { info.jobName, info.reviewerName, info.translatorName, info.sourceLanguage, info.targetLanguage };
                        // creates a new line
                        string line = String.Join(";", values);
                        // writes the line
                        sw.WriteLine(line);
                    }
                    // flushes the buffer
                    sw.Flush();
                }
            }
        }
        public void WholeProgram_NewParsingCorrectly_Test_1()
        {
            using (var driver = new ChromeDriver())
            {
                /* Initialization */
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

                driver.Manage().Window.Maximize();
                driver.Navigate().GoToUrl("https://tms.lionbridge.com/");

                string       projectName = ""; // Project Name
                ProjectsPage testPage    = new ProjectsPage(driver, projectName);

                testPage.ClickChosenProject();
                ParticularProjectPage testProjectPage = new ParticularProjectPage(driver);

                testProjectPage.ProfileClick(driver);
                testProjectPage.ChangeItemsPerPageMin(driver);

                testProjectPage.StatusClick(driver);
                StatusPage testStatusPage = new StatusPage(driver);

                testStatusPage.AssigneesClick(driver);
                AssigneesPage porscheAssigneesPage = new AssigneesPage(driver);

                porscheAssigneesPage.ChosenActivityClick(driver, "InternalReview");
                porscheAssigneesPage = new AssigneesPage(driver);

                PageBar testPageBar = new PageBar(driver);
                testPageBar.ItemsPerPageSetMaximalValue(driver);

                AssigneesAndJobs asob = new AssigneesAndJobs(driver);

                List <StatusAssigneeInfo> listOfStatusAssgineeInfo = new List <StatusAssigneeInfo>();
                StatusAssigneeInfo        auxiliary;

                foreach (Assignee ass in asob.assigneesList)
                {
                    for (int i = 0; i < ass.GetAssingeeJobsNumberInt; i++)
                    {
                        auxiliary = new StatusAssigneeInfo(ass, asob.assigneesJobsList.ElementAt(i));
                        listOfStatusAssgineeInfo.Add(auxiliary);
                    }
                    asob.assigneesJobsList.RemoveRange(0, ass.GetAssingeeJobsNumberInt - 1);
                }

                asob = new AssigneesAndJobs(driver);
                asob.TagMultipleJobs(driver, 0, asob.GetAssigneeJobsListSize - 1);

                ViewsMenu assigneesViewsMenu = new ViewsMenu(driver);
                assigneesViewsMenu.JobsView.ButtonClick();

                JobsSectionJobs jsj = new JobsSectionJobs(driver);
                jsj.ShowHistoryOfJob(driver, listOfStatusAssgineeInfo.ElementAt(0).jobName.Trim());

                JobHistoryFilter filter = new JobHistoryFilter(driver);

                filter.FiltersPanelInitialization(driver);
                filter.ChosenActivityClick(driver, "Translation");

                filter = new JobHistoryFilter(driver);
                filter.FiltersPanelInitialization(driver);

                filter.SourceLanguageFilterClick(driver);
                filter.ChosenSourceLanguageClick(driver, listOfStatusAssgineeInfo.ElementAt(0).sourceLanguage);

                filter = new JobHistoryFilter(driver);
                filter.FiltersPanelInitialization(driver);

                filter.TargetLanguageFilterClick(driver);
                filter.ChosenTargetLanguageClick(driver, listOfStatusAssgineeInfo.ElementAt(0).targetLanguage);

                IReadOnlyCollection <IWebElement> auxiliaryCollection;
                ResultJob auxiliaryJobs = new ResultJob();

                wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("r_L")));
                auxiliaryCollection = driver.FindElements(By.Id("pup_avw"));

                IWebElement jobsResultsContainer = auxiliaryCollection.ElementAt(0);

                auxiliaryCollection = jobsResultsContainer.FindElements(By.ClassName("r_L"));
                auxiliaryJobs       = new ResultJob(auxiliaryCollection.ElementAt(0));

                listOfStatusAssgineeInfo.ElementAt(0).TranslatorName = auxiliaryJobs.GetTranlatorName;

                string path = Path.Combine(Directory.GetCurrentDirectory(), "TestFile");

                using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Create(path, SpreadsheetDocumentType.Workbook))
                {
                    // Add a WorkbookPart to the document.
                    WorkbookPart workbookpart = spreadsheetDocument.AddWorkbookPart();
                    workbookpart.Workbook = new Workbook();

                    // Add a WorksheetPart to the WorkbookPart.
                    WorksheetPart worksheetPart = workbookpart.AddNewPart <WorksheetPart>();
                    worksheetPart.Worksheet = new Worksheet(new SheetData());

                    // Add Sheets to the Workbook.
                    Sheets sheets = spreadsheetDocument.WorkbookPart.Workbook.
                                    AppendChild <Sheets>(new Sheets());

                    // Append a new worksheet and associate it with the workbook.
                    Sheet sheet = new Sheet()
                    {
                        Id = spreadsheetDocument.WorkbookPart.
                             GetIdOfPart(worksheetPart),
                        SheetId = 1,
                        Name    = "mySheet"
                    };


                    sheets.Append(sheet);
                    SheetData sheetData = worksheetPart.Worksheet.GetFirstChild <SheetData>();


                    UInt32 rowIndex = 0;

                    foreach (var info in listOfStatusAssgineeInfo)
                    {
                        var row = new Row()
                        {
                            RowIndex = rowIndex
                        };

                        var firstNameCell = new Cell()
                        {
                            CellReference = "A" + (rowIndex + 1)
                        };
                        firstNameCell.CellValue = new CellValue(info.jobName);
                        firstNameCell.DataType  = CellValues.String;

                        row.AppendChild(firstNameCell);

                        Cell secondNameCell = new Cell()
                        {
                            CellReference = "B" + (rowIndex + 1)
                        };
                        secondNameCell.CellValue = new CellValue(info.sourceLanguage);
                        secondNameCell.DataType  = new EnumValue <CellValues>(CellValues.String);

                        row.AppendChild(secondNameCell);

                        Cell thirdNameCell = new Cell()
                        {
                            CellReference = "C" + (rowIndex + 1)
                        };
                        thirdNameCell.CellValue = new CellValue(info.targetLanguage);
                        thirdNameCell.DataType  = new EnumValue <CellValues>(CellValues.String);

                        row.AppendChild(thirdNameCell);

                        Cell fourthNameCell = new Cell()
                        {
                            CellReference = "D" + (rowIndex + 1)
                        };
                        fourthNameCell.CellValue = new CellValue(info.reviewerName);
                        fourthNameCell.DataType  = new EnumValue <CellValues>(CellValues.String);

                        row.AppendChild(fourthNameCell);

                        Cell fifthNameCell = new Cell()
                        {
                            CellReference = "E" + (rowIndex + 1)
                        };
                        fifthNameCell.CellValue = new CellValue(info.TranslatorName);
                        fifthNameCell.DataType  = new EnumValue <CellValues>(CellValues.String);

                        row.AppendChild(fifthNameCell);

                        sheetData.AppendChild(row);

                        rowIndex++;
                    }

                    workbookpart.Workbook.Save();
                }


                /*SearchResults sr = new SearchResults(driver);
                 * Assert.AreEqual("", sr.jobsList.ElementAt(0).GetTranlatorName);*/

                /*jsj.ShowHistoryOfJob(driver, 0);
                 *
                 * PopUpBody body = new PopUpBody(driver);
                 * JobHistoryFilter filter = new JobHistoryFilter(driver);
                 *
                 * filter.FiltersPanelInitialization(driver);
                 * filter.ChosenActivityClick(driver, "Translation");*/

                //filter.ChosenSourceLanguageClick(driver, asob.)

                Thread.Sleep(5000);
            }
        }