Esempio n. 1
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);
        }
Esempio n. 2
0
        public void AddToExistingFromList()
        {
            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));
            //select an existing folder
            IWebElement selectedFolder = articles.ExistingFolderList;
            var         selectElement  = new SelectElement(selectedFolder);

            //add article in existing folder
            FolderActions.AddInExistingFolder(articles.ExistingFolderRadioButton, selectElement, articles.AddButton, EXISTINGFOLDER);
            articles.GoToFavouritesListButton.Click();
            //check if article is in folder
            Assert.IsTrue(favouritesPage.ElementInFavourites(articlename).Displayed);
        }