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

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

                StatusNavigationBar testNavigationBar = new StatusNavigationBar(driver);

                /* Set of assertions */

                Assert.IsTrue(testNavigationBar.NavigationPanelIsNull);
                Assert.AreEqual(-1, testNavigationBar.NavigationPanelIsDisplayed);
                Assert.AreEqual("", testNavigationBar.GetPageName);

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

                Assert.AreEqual(-1, testNavigationBar.AssigneesSubpageIsNull);
                Assert.AreEqual(-1, testNavigationBar.AssigneesSubpageIsDisplayed);
                Assert.AreEqual(-1, testNavigationBar.AssigneesSubpageIsClicked);
            }
        }
Exemplo n.º 2
0
        public void ActivitiesFilterClick(IWebDriver driver)
        {
            statusFilters.FiltersPanelInitialization(driver);
            statusFilters.ActivitiesFilterClick(driver);

            statusNavigationBar = new StatusNavigationBar(driver);
        }
Exemplo n.º 3
0
        public void ClickAll(IWebDriver driver)
        {
            statusFilters.ClickAll(driver);

            statusNavigationBar = new StatusNavigationBar(driver);
            statusFilters       = new StatusFilters(driver);
        }
Exemplo n.º 4
0
        public void TargetLanguageFilterClick(IWebDriver driver)
        {
            statusFilters.FiltersPanelInitialization(driver);
            statusFilters.TargetLanguageFilterClick(driver);

            statusNavigationBar = new StatusNavigationBar(driver);
        }
        public void ClickAll(IWebDriver driver)
        {
            assigneeFilters.ClickAll(driver);

            assigneeNavigationBar = new StatusNavigationBar(driver);
            assigneeFilters       = new AssigneesFilters(driver);
        }
Exemplo n.º 6
0
        public void ChosenGetTargetLanguageClick(IWebDriver driver, string chosenLanguageCode)
        {
            TargetLanguageFilterClick(driver);
            statusFilters.ChosenGetTargetLanguageClick(driver, chosenLanguageCode);

            statusNavigationBar = new StatusNavigationBar(driver);
            statusFilters       = new StatusFilters(driver);
        }
Exemplo n.º 7
0
        public void ChosenActivityClick(IWebDriver driver, string chosenActivityName)
        {
            ActivitiesFilterClick(driver);
            statusFilters.ChosenActivityClick(driver, chosenActivityName);

            statusNavigationBar = new StatusNavigationBar(driver);
            statusFilters       = new StatusFilters(driver);
        }
        public int ChosenGetTargetLanguageClick(IWebDriver driver, string chosenLanguageCode)
        {
            TargetLanguageFilterClick(driver);
            int outcome = assigneeFilters.ChosenGetTargetLanguageClick(driver, chosenLanguageCode);

            assigneeNavigationBar = new StatusNavigationBar(driver);
            assigneeFilters       = new AssigneesFilters(driver);

            return(outcome);
        }
        public int ChosenActivityClick(IWebDriver driver, string chosenActivityName)
        {
            ActivitiesFilterClick(driver);
            int outcoume = assigneeFilters.ChosenActivityClick(driver, chosenActivityName);

            assigneeNavigationBar = new StatusNavigationBar(driver);
            assigneeFilters       = new AssigneesFilters(driver);

            return(outcoume);
        }
        /* Constructors */

        public AssigneesPage(IWebDriver driver)
        {
            if (driver.Url == "https://tms.lionbridge.com/")
            {
                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));
                IReadOnlyCollection <IWebElement> auxiliaryCollection;

                assigneeNavigationBar = new StatusNavigationBar(driver);
                assigneeFilters       = new AssigneesFilters(driver);

                string auxiliaryString;

                /*if (wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("cup_fp_btn"))) != null)
                 * {
                 *
                 *  isParsedCorrectly = true;
                 *
                 *  auxiliaryCollection = driver.FindElements(By.Id("sel_mnu_itm"));
                 *  if (auxiliaryCollection.Count > 0) pageName = auxiliaryCollection.ElementAt(0);
                 *
                 *  auxiliaryCollection = driver.FindElements(By.Id("sel_mnu_vws"));
                 *  if (auxiliaryCollection.Count > 0) viewBar = auxiliaryCollection.ElementAt(0);
                 *
                 *  if (viewBar != null)
                 *  {
                 *
                 *      auxiliaryCollection = viewBar.FindElements(By.Id("status"));
                 *      if (auxiliaryCollection.Count > 0) activitiesSubpageButton = auxiliaryCollection.Where(x => x.Text == "Activities").First();
                 *
                 *      auxiliaryCollection = viewBar.FindElements(By.Id("statusassignees"));
                 *      if (auxiliaryCollection.Count > 0) assigneesSubpageButton = auxiliaryCollection.ElementAt(0);
                 *
                 *  }
                 *
                 *  auxiliaryCollection = driver.FindElements(By.Id("cup_fp_btn"));
                 *  if (auxiliaryCollection.Count > 0) filtersButton = auxiliaryCollection.ElementAt(0);
                 *
                 *  auxiliaryString = filtersButton.GetAttribute("class");
                 *  if (auxiliaryString.Contains("icn_flt_on")) isFilterClicked = true;
                 *
                 *  if (isFilterClicked == false)
                 *  {
                 *
                 *      filtersButton.Click();
                 *      wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("cup_fpName_msdd")));
                 *
                 *      auxiliaryCollection = driver.FindElements(By.Id("cup_fpName_msdd"));
                 *      if (auxiliaryCollection.Count == 1) activityFilter = auxiliaryCollection.ElementAt(0);
                 *
                 *  }
                 * }*/
            }
        }
        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);
            }
        }
Exemplo n.º 12
0
        /* Constructors */

        public StatusPage(IWebDriver driver)
        {
            if (driver.Url == "https://tms.lionbridge.com/")
            {
                IReadOnlyCollection <IWebElement> auxiliaryCollection;
                string auxiliaryString;

                var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));
                wait.Until(driver1 => ((IJavaScriptExecutor)driver).ExecuteScript("return document.readyState").Equals("complete"));

                auxiliaryCollection = driver.FindElements(By.Id("jnotify-item-msg"));
                if (auxiliaryCollection.Count != 0)
                {
                    errorMessage = auxiliaryCollection.ElementAt(0);
                }

                statusNavigationBar = new StatusNavigationBar(driver);
                statusFilters       = new StatusFilters(driver);
            }
        }