예제 #1
0
 public static SearchingPage Search(this JournalPage page, string word)
 {
     page.Wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath(@"//button[@id='btnGlobalSearchMagnifier']")));
     page.SearchBox.Clear();
     page.SearchBox.SendKeys(word);
     page.SearchButton.Click();
     return(new SearchingPage(page.driver));
 }
예제 #2
0
        public static JournalPage GoToJournal(this LoginPage page, string name)
        {
            page.Wait.Until(ExpectedConditions.ElementExists(By.XPath(validLoginXpath)));
            page.GetJournalByName(name).Click();
            page.driver.SwitchTo().Window(page.driver.WindowHandles.Last());
            JournalPage journalPage = new JournalPage(page.driver);

            return(journalPage);
        }
예제 #3
0
 public static MyFoldersPage AddFirstArticleToFavoritesFromList(this JournalPage page, string articleName, string folderName)
 {
     page.GetAddToFavoritesLinkFromListByArticleName(articleName).Click();
     page.WindowAddToFolder = new WindowAddToFolder(page.driver);
     CreateNewFolder(page.WindowAddToFolder, folderName);
     page.WindowAddToFolder.AddItemButton.Click();
     page.Wait.Until(ExpectedConditions.ElementExists(By.XPath("//input[@value='Go to My Favorites']")));
     page.WindowOperationStatus = new WindowOperationStatus(page.driver);
     page.WindowOperationStatus.GoToFavoritesButton.Click();
     return(new MyFoldersPage(page.driver));
 }
예제 #4
0
 private static IWebElement GetArticleLinkByName(this JournalPage page, string articleName)
 {
     return(page.driver.FindElement(By.XPath(string.Concat("//a[@title='", articleName, "']"))));
 }
예제 #5
0
 private static IWebElement GetAddToFavoritesLinkFromListByArticleName(this JournalPage page, string articleName)
 {
     return(page.driver.FindElement(By.XPath(string.Concat("//a[@title='", articleName, "']//ancestor::div[1]//a[contains(@onclick,'addToMyCollectionsLinkClicked')]"))));
 }