示例#1
0
 public void ChooseRussianLanguage()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.OpenPage();
     mainPage.ChangeSiteLanguage();
     Assert.AreEqual(mainPage.GetSiteLanguage(), "Планируйте и бронируйте");
 }
示例#2
0
 public void ChangeLanguageToItaliano()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.ChooseItaliano();
     Assert.AreEqual(mainPage.GetCurrentLanguage(), "Cercs");
 }
示例#3
0
 public void ChangeLanguageToDeutsch()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.ChooseEspanol();
     Assert.AreEqual(mainPage.GetCurrentLanguage(), "Suchen");
 }
示例#4
0
 public bool IsLogin(string login, string password)   //войти
 {
     mainPage = new Pages.MainPage(driver);
     mainPage.OpenPage();
     mainPage.Authorization(login, password);
     return(mainPage.IsLoginLabelExist(login));
 }
示例#5
0
文件: Steps.cs 项目: Saismer/Testing
 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);
 }
示例#7
0
 public void FindRouteWithoutDate(string from, string to)
 {
     mainPage = new Pages.MainPage(driver);
     mainPage.OpenPage();
     mainPage.FillAirports(from, to);
     mainPage.SearchClick();
 }
示例#8
0
 /// <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;
 }
示例#9
0
 public void ChangeLanguageToEnglish()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.ChooseEnglish();
     Assert.AreEqual(mainPage.GetCurrentLanguage(), "Search");
 }
示例#10
0
 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");
 }
示例#11
0
 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);
 }
示例#12
0
 public void Search(string name)
 {
     mainPage = new Pages.MainPage(driver);
     mainPage.enterTextToSearch(name);
     searchPage = new Pages.SearchPage(driver);
     searchPage.OpenInfo();
 }
示例#13
0
        public IActionResult Index()
        {
            var page    = new Pages.MainPage();
            var element = page.GetOouiElement();

            return(new ElementResult(element, "Hello from XAML!"));
        }
示例#14
0
 public void invaidEmail()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.inputEmail("asdfasdf");
     Assert.AreEqual(mainPage.GetIncorrectFormatError(), "Неверный формат");
 }
示例#15
0
 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);
 }
示例#16
0
 public bool IsSearchLine(string name)
 {
     mainPage = new Pages.MainPage(driver);
     mainPage.enterTextToSearch(name);
     searchPage = new Pages.SearchPage(driver);
     return(searchPage.GetFilmName().Contains(name));
 }
示例#17
0
 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");
 }
示例#18
0
文件: Tests.cs 项目: Y152/epam_test
 public void IdenticalCityToTest()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.SetMainData("Минск", "Минск");
     mainPage.ClickSearchButton();
     Assert.AreEqual(mainPage.GetBadSearch(), "");
 }
示例#19
0
 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");
 }
示例#20
0
 public void UnsetAgreeCheckBox()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.SetMainData("Moscow", "Minsk");
     mainPage.ClickAgreeCheckBox();
     Assert.True(mainPage.IsDisabledSearchBox());
 }
示例#21
0
 public void DeleteAllLetters()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToSpamFolder();
     mainPage.UnmarkLettersAsSpam();
     mainPage.GoToInboxFolder();
     mainPage.DeleteAllLetters();
 }
示例#22
0
 public void SetPass(int num, int type)
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     for (int i = 0; i < num; i++)
     {
         mainPage.IncreacePass(type);
     }
 }
示例#23
0
        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());
        }
示例#24
0
        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());
        }
示例#26
0
        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()));
        }
示例#27
0
 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.");
 }
示例#28
0
 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));
 }
示例#29
0
 public bool IsSortByMark(string actoreName)
 {
     mainPage = new Pages.MainPage(driver);
     mainPage.OpenPage();
     Search(actoreName);
     infoPage = new Pages.InfoPage(driver);
     infoPage.ClickSortByMarkBtn();
     return(infoPage.IsFirstMarkElementMoreThenSecond());
 }
示例#30
0
 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));
 }
示例#31
0
 public void IdenticalCityToTest()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.SetMainData("Minsk", "Minsk");
     mainPage.ClickSearchButton();
     mainPage.SwitchToActiveTab();
     Assert.AreEqual(mainPage.GetBadSearchParams(), "Упс, что-то пошло не так :-(");
 }
示例#32
0
文件: Tests.cs 项目: Y152/epam_test
 public void SetReturnsDateEmpty()
 {
     Pages.MainPage mainPage = new Pages.MainPage(driver);
     mainPage.GoToThisUrl();
     mainPage.SetMainData("Минск", "Москва");
     mainPage.ClickSearchButton();
     mainPage.ClearReturnsDate();
     Assert.AreEqual(mainPage.GetReturnsDate(), "");
 }
示例#33
0
 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(), "");
 }
示例#34
0
        // 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);
        }
示例#35
0
        // 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;
        }
示例#36
0
 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);
 }
示例#37
0
 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);
 }