Esempio n. 1
0
        public void AddToNewFromBody()
        {
            ArticleBodyPage article        = new ArticleBodyPage(driver);
            FavouritesPage  favouritesPage = new FavouritesPage(driver);

            //go to the article
            Navigation.Navigate(driver, articleUrl);
            //add article in new folder
            article.favouritesLinkBody.Click();
            FolderActions.AddInNewFolder(article.NewFolderRadioButton, article.FolderTextBox, NEWFOLDER, article.AddButton);
            article.GoToFavouritesListButton.Click();
            //check if the article is in folder
            if (favouritesPage.FolderLink(NEWFOLDER).Displayed == true)
            {
                favouritesPage.FolderLink(NEWFOLDER).Click();
            }
            Assert.IsTrue(favouritesPage.ElementInFavourites(articlename).Displayed);
        }
Esempio n. 2
0
        public static void TearDown()
        {
            Navigation.Navigate(driver, favouritesPageUrl);
            FavouritesPage favouritesPage = new FavouritesPage(driver);

            if (favouritesPage.FolderLink(NEWFOLDER).Displayed == true)
            {
                favouritesPage.FolderLink(NEWFOLDER).Click();
                FavouritesActions.DeleteFolder(favouritesPage.deleteLink, favouritesPage.deleteButton);
            }
            Navigation.Navigate(driver, favouritesPageUrl);
            if (favouritesPage.FolderLink(NEWFOLDER1).Displayed == true)
            {
                favouritesPage.FolderLink(NEWFOLDER).Click();
                FavouritesActions.DeleteFolder(favouritesPage.deleteLink, favouritesPage.deleteButton);
            }
            Navigation.Navigate(driver, mainPage);
            driver.Close();
        }
Esempio n. 3
0
        public void AddToNewFromList()
        {
            ArticleList    articles       = new ArticleList(driver);
            FavouritesPage favouritesPage = new FavouritesPage(driver);

            //go to journal
            Navigation.Navigate(driver, journalUrl);
            //choose an article to add in folder
            var LinksList = articles.favouritesLinkList;

            ArticleListActions.ClickFavFromList(LinksList.ElementAt(0));
            //add article in new folder
            FolderActions.AddInNewFolder(articles.NewFolderRadioButton, articles.FolderTextBox, NEWFOLDER1, articles.AddButton);
            //check if an article is in folder
            articles.GoToFavouritesListButton.Click();
            if (favouritesPage.FolderLink(NEWFOLDER1).Displayed == true)
            {
                favouritesPage.FolderLink(NEWFOLDER1).Click();
            }
            Assert.IsTrue(favouritesPage.ElementInFavourites(articlename).Displayed);
        }