Ejemplo n.º 1
0
 public static void DeleteSearch(this MyFoldersPage page, string searchName)
 {
     page.GetDeleteLinkForSearch(searchName).Click();
     page.DeleteButton.Click();
     page.Wait.Until(ExpectedConditions.ElementIsVisible(By.XPath(@"//span[contains(@id,'ucDeleteSavedSearchItem_searchNameMessage')]")));
     page.ClosePopUp.Click();
 }
Ejemplo n.º 2
0
        public static bool IsSearchSuccessful(this MyFoldersPage page, string nameSearch, string wordSearch)
        {
            SearchingPage searchingPage = page.GoToSearchpage(nameSearch);

            searchingPage.Wait.Until(ExpectedConditions.ElementIsVisible(By.XPath(@"//div[@id='main-container-content']")));
            bool          result     = searchingPage.driver.FindElement(By.XPath(@"//div[@class='searchUserKeywords']")).Text.Contains(wordSearch);
            MyFoldersPage folderPage = searchingPage.GoToSavedSearchesResultsPage();

            folderPage.DeleteSearch(nameSearch);
            return(result);
        }
Ejemplo n.º 3
0
        public static bool IsArticleInFavorites(this MyFoldersPage page, string articleName)
        {
            bool result = true;

            try
            {
                page.Wait.Until(ExpectedConditions.ElementExists(By.XPath(string.Concat("//a[@title='", articleName, "']"))));
            }
            catch (WebDriverException)
            {
                result = false;
            }
            return(result);
        }
Ejemplo n.º 4
0
 public static MyFoldersPage GoFolder(this MyFoldersPage page, string folderName)
 {
     page.GetFolder(folderName).Click();
     return(page);
 }
Ejemplo n.º 5
0
 private static IWebElement GetLinkForSearch(this MyFoldersPage page, string name)
 {
     return(page.driver.FindElement(By.XPath(string.Concat("//a[contains(@id,'linkMySearch') and text()='", name, "']"))));
 }
Ejemplo n.º 6
0
 private static IWebElement GetDeleteLinkForSearch(this MyFoldersPage page, string name)
 {
     return(page.driver.FindElement(By.XPath(string.Concat("//a[contains(@onclick,'", name, "') and contains(text(),'Delete')]"))));
 }
Ejemplo n.º 7
0
 private static IWebElement GetFolder(this MyFoldersPage page, string folderName)
 {
     return(page.driver.FindElement(By.XPath(string.Concat("//tr//a[text()='", folderName, "']"))));
 }
Ejemplo n.º 8
0
 public static SearchingPage GoToSearchpage(this MyFoldersPage page, string name)
 {
     page.GetLinkForSearch(name).Click();
     return(new SearchingPage(page.driver));
 }
Ejemplo n.º 9
0
 public static void DeleteFolder(this MyFoldersPage page)
 {
     page.DeleteFolderLink.Click();
     page.WindowDeleteFolder = new WindowDeleteFolder(page.driver);
     page.WindowDeleteFolder.DeleteButton.Click();
 }