public void ChooseRussianLanguage() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.ChangeSiteLanguage(); Assert.AreEqual(mainPage.GetSiteLanguage(), "Планируйте и бронируйте"); }
public void ChangeLanguageToItaliano() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.ChooseItaliano(); Assert.AreEqual(mainPage.GetCurrentLanguage(), "Cercs"); }
public void ChangeLanguageToDeutsch() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.ChooseEspanol(); Assert.AreEqual(mainPage.GetCurrentLanguage(), "Suchen"); }
public bool IsLogin(string login, string password) //войти { mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.Authorization(login, password); return(mainPage.IsLoginLabelExist(login)); }
public bool FillDate(string typeDate) { Pages.MainPage mainPage = new Pages.MainPage(driver); if (typeDate == "normal") { mainPage.FillDate(); return(true); } if (typeDate == "complex") { mainPage.FillComplexDate(); return(true); } else if (typeDate == "early") { if (mainPage.FillEarlyDate()) { return(true); } else { return(false); } } return(true); }
public void EnterCities(string cityOfDeparture, string cityOfArrival) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.EnterCityOfDeparture(cityOfDeparture); mainPage.EnterCityOfArrival(cityOfArrival); }
public void FindRouteWithoutDate(string from, string to) { mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.FillAirports(from, to); mainPage.SearchClick(); }
/// <summary> /// Handles succesful login callback /// </summary> /// <param name="sender"></param> /// <param name="e">Contains credentials</param> public void loginWindow_LoginSuccesful(object sender, LoginWindowEventArgs e) { Credentials = e.Credentials; LoggedAsLabel.Content += AccountUtils.LoginFromCredentials(Credentials); _gridViewPage = new Pages.MainPage(); Main.Content = _gridViewPage; }
public void ChangeLanguageToEnglish() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.ChooseEnglish(); Assert.AreEqual(mainPage.GetCurrentLanguage(), "Search"); }
public void SearchingNonexistentDepartureCity() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.EnterCityOfDepartureWhithoutAccept("somecity"); Assert.AreEqual(mainPage.GetErrorCityChoosing(), "Unfortunately, we do not fly to/from somecity"); }
public bool IsLoggedIn(string username) { Pages.MainPage loginPage = new Pages.MainPage(driver); string test = loginPage.GetLoggedInUserName().Trim().ToLower(); logger.Info("Is logged in successfully: " + test.Equals(username)); return test.Equals(username); }
public void Search(string name) { mainPage = new Pages.MainPage(driver); mainPage.enterTextToSearch(name); searchPage = new Pages.SearchPage(driver); searchPage.OpenInfo(); }
public IActionResult Index() { var page = new Pages.MainPage(); var element = page.GetOouiElement(); return(new ElementResult(element, "Hello from XAML!")); }
public void invaidEmail() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.inputEmail("asdfasdf"); Assert.AreEqual(mainPage.GetIncorrectFormatError(), "Неверный формат"); }
public void CreateNewRepository(string repositoryName, string repositoryDescription) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnCreateNewRepositoryButton(); Pages.CreateNewRepositoryPage createNewRepositoryPage = new Pages.CreateNewRepositoryPage(driver); createNewRepositoryPage.CreateNewRepository(repositoryName, repositoryDescription); }
public bool IsSearchLine(string name) { mainPage = new Pages.MainPage(driver); mainPage.enterTextToSearch(name); searchPage = new Pages.SearchPage(driver); return(searchPage.GetFilmName().Contains(name)); }
public void LoginSystem(string username, string password) { Pages.MainPage loginPage = new Pages.MainPage(driver); loginPage.OpenPage(); logger.Info("Page loaded"); loginPage.Login(username, password); logger.Info("Logged in successfully"); }
public void IdenticalCityToTest() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.SetMainData("Минск", "Минск"); mainPage.ClickSearchButton(); Assert.AreEqual(mainPage.GetBadSearch(), ""); }
public void InputSameCityOfDepartureAndArrival() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.EnterCityOfDeparture("RIX"); mainPage.EnterCityOfArrivalWhithoutAccept("RIX"); Assert.AreEqual(mainPage.GetErrorCityChoosing(), "Unfortunately, we do not fly to/from RIX"); }
public void UnsetAgreeCheckBox() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.SetMainData("Moscow", "Minsk"); mainPage.ClickAgreeCheckBox(); Assert.True(mainPage.IsDisabledSearchBox()); }
public void DeleteAllLetters() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToSpamFolder(); mainPage.UnmarkLettersAsSpam(); mainPage.GoToInboxFolder(); mainPage.DeleteAllLetters(); }
public void SetPass(int num, int type) { Pages.MainPage mainPage = new Pages.MainPage(driver); for (int i = 0; i < num; i++) { mainPage.IncreacePass(type); } }
public void Search(string from, string to) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnSearchButton(); Pages.SearchPage searchPage = new Pages.SearchPage(driver); //string expectedRepoName = createNewRepositoryPage.CreateNewRepository(repositoryName, repositoryDescription); //return expectedRepoName.Equals(createNewRepositoryPage.GetCurrentRepositoryName()); }
public void Register(string firstname, string lastname, string country, int birthyear, int birthdate, string birthmonth, string email, string password) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnRegisterButton(); Pages.RegistreringPage registerPage = new Pages.RegistreringPage(driver); registerPage.Register(firstname, lastname, country, birthyear, birthdate, birthmonth, email, password); //return expectedRepoName.Equals(createNewRepositoryPage.GetCurrentRepositoryName()); }
public bool CreateNewRepository(string repositoryName, string repositoryDescription) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnCreateNewRepositoryButton(); Pages.CreateNewRepositoryPage createNewRepositoryPage = new Pages.CreateNewRepositoryPage(driver); string expectedRepoName = createNewRepositoryPage.CreateNewRepository(repositoryName, repositoryDescription); return expectedRepoName.Equals(createNewRepositoryPage.GetCurrentRepositoryName()); }
public bool CreateNewRepository(string repositoryName, string repositoryDescription) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnCreateNewRepositoryButton(); Pages.CreateNewRepositoryPage createNewRepositoryPage = new Pages.CreateNewRepositoryPage(driver); string expectedRepoName = createNewRepositoryPage.CreateNewRepository(repositoryName, repositoryDescription); return(expectedRepoName.Equals(createNewRepositoryPage.GetCurrentRepositoryName())); }
public void InputYesterdayDepartureDate() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); mainPage.EnterCityOfDeparture("RIX"); mainPage.EnterCityOfArrival("MSQ"); mainPage.EnterDepartureDate(yesterdayDate); Assert.AreEqual(mainPage.GetErrorMes(), "Your selected flight has already departed."); }
public bool IsSearchActoreByExtendedSearch(string name, string birth) { mainPage = new Pages.MainPage(driver); mainPage.ClickExtendedSearchButton(); navigator = new Pages.Navigator(driver); navigator.DoExtendedSearchForActor(name, birth); searchPage = new Pages.SearchPage(driver); return(searchPage.GetactorNameForExtSerch().Contains(name)); }
public bool IsSortByMark(string actoreName) { mainPage = new Pages.MainPage(driver); mainPage.OpenPage(); Search(actoreName); infoPage = new Pages.InfoPage(driver); infoPage.ClickSortByMarkBtn(); return(infoPage.IsFirstMarkElementMoreThenSecond()); }
public bool IsSearchFilmByExtendedSearch(string wordFromilm, string year) { mainPage = new Pages.MainPage(driver); mainPage.ClickExtendedSearchButton(); navigator = new Pages.Navigator(driver); navigator.DoExtendedSearchForFilm(wordFromilm, year); searchPage = new Pages.SearchPage(driver); return(searchPage.GetFilmName().Contains(wordFromilm)); }
public void IdenticalCityToTest() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.SetMainData("Minsk", "Minsk"); mainPage.ClickSearchButton(); mainPage.SwitchToActiveTab(); Assert.AreEqual(mainPage.GetBadSearchParams(), "Упс, что-то пошло не так :-("); }
public void SetReturnsDateEmpty() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.SetMainData("Минск", "Москва"); mainPage.ClickSearchButton(); mainPage.ClearReturnsDate(); Assert.AreEqual(mainPage.GetReturnsDate(), ""); }
public void SetReturnsDateEmpty() { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.GoToThisUrl(); mainPage.SetMainData("Minsk", "Moscow"); mainPage.ClickSearchButton(); mainPage.SwitchToActiveTab(); mainPage.ClearReturnsDate(); Assert.AreEqual(mainPage.GetReturnsDate(), ""); }
// delete public bool Delete() { log.Info("Into Delete() method of Steps."); Console.WriteLine("Into Delete() method of Steps."); Pages.MainPage mainPage = new Pages.MainPage(driver); string deletedName = mainPage.GetNameOfFileWhichWasDelete(); mainPage.Delete(); Pages.DeletePage deletePage = new Pages.DeletePage(driver); return deletePage.WasFileDelete(deletedName); }
// create new folder public bool CreateNewFolder(string folderName) { Pages.MainPage mainPage = new Pages.MainPage(driver); mainPage.ClickOnCreateNewFolderButton(); log.Info("Into CreateNewFolder() method of Steps."); Console.WriteLine("Into CreateNewFolder() method of Steps."); Pages.CreateNewFolderPage createNewFolderPage = new Pages.CreateNewFolderPage(driver); string expectedRepoName = createNewFolderPage.CreateNewFolder(folderName); log.Info("ExpectedRepoName is " + expectedRepoName); Console.WriteLine("ExpectedRepoName is " + expectedRepoName); //return expectedRepoName.Equals(createNewFolderPage.GetCurrentFolderName()); // fix it return expectedRepoName != null; }
public void RenameFile(string newName) { log.Info("Into RenameFile() method of Steps."); Console.WriteLine("Into RenameFile() method of Steps."); Pages.MainPage mainPage = new Pages.MainPage(driver); log.Info("Click on the file which want to be renamed."); Console.WriteLine("Click on the file which want to be renamed."); mainPage.ClickOnTheFileWantToBeRename(); Pages.RenamePage renamePage = new Pages.RenamePage(driver); renamePage.Rename(newName); }
public void ShareFile(string userEmail, string message) { log.Info("Into ShareFile() method of Steps."); Console.WriteLine("Into ShareFile() method of Steps."); Pages.MainPage mainPage = new Pages.MainPage(driver); log.Info("Click on file which want to be share."); Console.WriteLine("Click on file which want to be share."); mainPage.ClickOnFileWantToBeShare(); Pages.ShareFileViaEmail shareFile = new Pages.ShareFileViaEmail(driver); shareFile.Share(userEmail, message); }