public void Login_InvalidLoginInvalidPassword_DontEnter() { IWebDriver driver = Driver.GetDriver(MethodBase.GetCurrentMethod().Name); LoginPage page = LogicSteps.NavigateToPage(driver, ConfigurationManager.AppSettings["url"]) .LoginAs(ConfigurationManager.AppSettings["InvalidLogin"], ConfigurationManager.AppSettings["InvalidPassword"]); bool actual = page.IsValidLogin(); page.Close(); Assert.AreEqual(false, actual); }
public void SearchWord_ResultsMoreThanHundred_True() { IWebDriver driver = Driver.GetDriver(MethodBase.GetCurrentMethod().Name); SearchingPage page = LogicSteps.NavigateToPage(driver, ConfigurationManager.AppSettings["url"]) .LoginAs(ConfigurationManager.AppSettings["ValidLogin"], ConfigurationManager.AppSettings["ValidPassword"]) .ChooseBeginningSymbol(ConfigurationManager.AppSettings["BeginningSymbol"]) .GoToJournal(ConfigurationManager.AppSettings["JournalPlasticAndReconstructiveSurgery"]) .Search(ConfigurationManager.AppSettings["WordForSearch"]); bool actual = page.IsResultsCountMoreThanHundred(); page.Close(); Assert.AreEqual(true, actual); }
public void SearchRussianArticle_ArticleInSearchResults_False() { IWebDriver driver = Driver.GetDriver(MethodBase.GetCurrentMethod().Name); SearchingPage page = LogicSteps.NavigateToPage(driver, ConfigurationManager.AppSettings["url"]) .LoginAs(ConfigurationManager.AppSettings["ValidLogin"], ConfigurationManager.AppSettings["ValidPassword"]) .ChooseBeginningSymbol(ConfigurationManager.AppSettings["BeginningSymbol"]) .GoToJournal(ConfigurationManager.AppSettings["JournalPlasticAndReconstructiveSurgery"]) .Search(ConfigurationManager.AppSettings["RussianArticleForSearch"]); bool actual = page.IsArticleInSearchResults(ConfigurationManager.AppSettings["RussianArticleForSearch"]); page.Close(); Assert.AreEqual(false, actual); }
public void AddToFavoriteFromArticle() { IWebDriver driver = Driver.GetDriver(MethodBase.GetCurrentMethod().Name); MyFoldersPage page = LogicSteps.NavigateToPage(driver, ConfigurationManager.AppSettings["url"]) .LoginAs(ConfigurationManager.AppSettings["ValidLogin"], ConfigurationManager.AppSettings["ValidPassword"]) .GoToJournal(ConfigurationManager.AppSettings["JournalNameAACaseReports"]) .AddFirstArticleToFavoritesFolderFromArticle(ConfigurationManager.AppSettings["ArticleNameSpinCordSrimulation"], ConfigurationManager.AppSettings["FolderName2"]) .GoFolder(ConfigurationManager.AppSettings["FolderName2"]); bool actual = page.IsArticleInFavorites(ConfigurationManager.AppSettings["ArticleNameSpinCordSrimulation"]); page.DeleteFolder(); page.Close(); Assert.AreEqual(true, actual); }
public void SaveSearch() { IWebDriver driver = Driver.GetDriver(MethodBase.GetCurrentMethod().Name); MyFoldersPage page = LogicSteps.NavigateToPage(driver, ConfigurationManager.AppSettings["url"]) .LoginAs(ConfigurationManager.AppSettings["ValidLogin"], ConfigurationManager.AppSettings["ValidPassword"]) .ChooseBeginningSymbol(ConfigurationManager.AppSettings["BeginningSymbol"]) .GoToJournal(ConfigurationManager.AppSettings["JournalPlasticAndReconstructiveSurgery"]) .Search(ConfigurationManager.AppSettings["WordForSearch"]) .Save(ConfigurationManager.AppSettings["SearchNameForSave"]) .GoToSavedSearchesResultsPage(); bool actual = page.IsSearchSuccessful(ConfigurationManager.AppSettings["SearchNameForSave"], ConfigurationManager.AppSettings["WordForSearch"]); page.Close(); Assert.AreEqual(true, actual); }