Exemplo n.º 1
0
        public static bool IsNotZeroResults()
        {
            var allResultsBage     = DriverInstance.GetInstance().FindElements(By.XPath(AllResultsByXPath))[0];
            var foundProductsCount = int.Parse(allResultsBage.GetAttribute("innerHTML"));

            return(foundProductsCount > 0 ? true : false);
        }
Exemplo n.º 2
0
    public void TicketSearch()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB10("123456789100", "Иванов ");
    }
Exemplo n.º 3
0
    public void PromoEconomyBorder()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB7("Москва", "Санкт-Петербург", "3", "2", "2", "03.01.2018");
    }
Exemplo n.º 4
0
    public void BirthDateError()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB9("Москва", "Санкт-Петербург", "03.01.2018", "01.05.1900");
    }
Exemplo n.º 5
0
    public void PromoEconomyAbroad()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB6("Москва", "Бангкок", "3", "2", "2", "09.01.2018");
    }
Exemplo n.º 6
0
    public void PersonalInformation()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB8("Москва", "Бангкок", "09.01.2018");
    }
Exemplo n.º 7
0
        public void LangusgeRu_Deu()
        {
            var      driver   = DriverInstance.GetInstance();
            MainPage mainPage = new MainPage(driver);

            mainPage.OpenPage();

            mainPage.Test1();
        }
Exemplo n.º 8
0
    public void DepartureAbroad()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB4("Москва", "Бангкок", "3", "3", "09.01.2018");
    }
Exemplo n.º 9
0
        public void InputInvalidInputSityToWhenViewingSearchResultWithoutDateStatus()
        {
            Logger.Log.Info("Start InputInvalidInputSityToWhenViewingSearchResultWithoutDateStatus test.");
            StartPage startPage = new StartPage(DriverInstance.GetInstance())
                                  .OpenPage()
                                  .GoToSearch(Service.Service.WithSearchResultWithoutDateProperties());

            Assert.AreEqual(REQUIRED_LABEL_TO_FILL, startPage.GetErrorMessageTextToName());
        }
Exemplo n.º 10
0
    public void AnotherCity()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB3("Москва", "Москва, Москва, Шереметьево");
    }
Exemplo n.º 11
0
        public void LookInformationAboutBoeing707()
        {
            Logger.Log.Info("Start LookInformationAboutBoeing707 test.");
            AirPlanesPage airPlanesPage = new AirPlanesPage(DriverInstance.GetInstance())
                                          .OpenAirPlanesPage()
                                          .ClickOnBoeing707();

            Assert.AreEqual(SELECTED_PLANE, airPlanesPage.GetNamePlane());
        }
Exemplo n.º 12
0
        public void Status()
        {
            var        driver     = DriverInstance.GetInstance();
            OnlinePage onlinePage = new OnlinePage(driver);

            onlinePage.OpenPage();

            onlinePage.Test7("234234");
        }
Exemplo n.º 13
0
        public void NewAero()
        {
            var driver = DriverInstance.GetInstance();
            SpecialOffersPage specialOffersPage = new SpecialOffersPage(driver);

            specialOffersPage.OpenPage();

            specialOffersPage.Test5();
        }
Exemplo n.º 14
0
        public void Auto()
        {
            var      driver   = DriverInstance.GetInstance();
            MainPage mainPage = new MainPage(driver);

            mainPage.OpenPage();

            mainPage.Test4("Соединенное королевство", "manchester trafford park", "28.01.2018", "30.01.18", "Беларусь");
        }
Exemplo n.º 15
0
        public void Hotel()
        {
            var      driver   = DriverInstance.GetInstance();
            MainPage mainPage = new MainPage(driver);

            mainPage.OpenPage();

            mainPage.Test3("Манчестер, Manchester (MAN), Великобритания, United Kingdom", "28.01.2018", "30.01.18");
        }
Exemplo n.º 16
0
        public void Aeroport()
        {
            var      driver   = DriverInstance.GetInstance();
            MainPage mainPage = new MainPage(driver);

            mainPage.OpenPage();

            mainPage.Test2("Минск, Minsk (MHP, MSQ), Беларусь, Belarus", "Манчестер, Manchester (MAN), Великобритания, United Kingdom", "28.01.2018");
        }
Exemplo n.º 17
0
        public void FeedBackWithoutText()
        {
            Logger.Log.Info("Start FeedBackWithoutText test.");
            StartPage startPage = new StartPage(DriverInstance.GetInstance())
                                  .OpenPage()
                                  .CheckFeedBack();

            Assert.AreEqual(REQUIRED_LABEL_TO_FILL, startPage.GetErrorMessageTextBeforeSubmitButton());
        }
Exemplo n.º 18
0
        public void InformationPlase()
        {
            var             driver          = DriverInstance.GetInstance();
            InformationPage informationPage = new InformationPage(driver);

            informationPage.OpenPage();

            informationPage.Test8();
        }
Exemplo n.º 19
0
        public void SignInToAccount()
        {
            Logger.Log.Info("Start SignInToAccount test.");
            StartPage startPage = new StartPage(DriverInstance.GetInstance())
                                  .OpenPage()
                                  .ClickSignInAccountButton()
                                  .FillInLoginAndPassword(Service.Service.WithUserPropertiesForSignIn());

            Assert.AreEqual(REQUIRED_LABEL_AFTER_AUTHORIZATION, startPage.GetTextSignInButton());
        }
Exemplo n.º 20
0
    public void TravelAbroadByFamily()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB5("Москва", "Бангкок", "3", "2", "2", "09.01.2018");
        Assert.IsTrue(page.GetListPassengers(geocity1, geocity2));
    }
Exemplo n.º 21
0
        public void TestMethod4()
        {
            var      driver = DriverInstance.GetInstance();
            MainPage page   = new MainPage(driver);

            page.OpenPage();
            page.Test3("Berlin", new DateTime(2018, 01, 04), new DateTime(2018, 01, 07));

            Assert.IsTrue(page.IsErrorDestination());
        }
Exemplo n.º 22
0
        public void TestMethod7()
        {
            var      driver = DriverInstance.GetInstance();
            MainPage page   = new MainPage(driver);

            page.OpenPage();
            page.Test5("Berlin", new DateTime(2018, 01, 04), new DateTime(2018, 01, 12));

            Assert.IsTrue(page.IsErrorOrigin());
        }
Exemplo n.º 23
0
        public void TestMethod3()
        {
            var      driver = DriverInstance.GetInstance();
            MainPage page   = new MainPage(driver);

            page.OpenPage();
            page.Test1("Berlin", "Paris", new DateTime(2018, 01, 04), new DateTime(2018, 01, 04));

            Assert.IsTrue(page.IsErrorExist());
        }
Exemplo n.º 24
0
        public void OpenBrowser()
        {
            driver = DriverInstance.GetInstance();
//            driver = new FirefoxDriver();
//            driver.Url = "http://www.seleniumhq.org/";
//            driver.Manage().Window.Maximize();
//            general timeouts
//            driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(5);
//            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
        }
Exemplo n.º 25
0
    public void AmountOfChildren()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB2("Москва", "Санкт-Петербург", "1", "9");
        Assert.IsTrue(page.GetErrorPassengers(missing_airport_error_message));
    }
Exemplo n.º 26
0
        public void ReverseTicket()
        {
            var        driver     = DriverInstance.GetInstance();
            OnlinePage onlinePage = new OnlinePage(driver);

            onlinePage.OpenPage();

            onlinePage.Test6("0786542", "Kohnovich");

            Assert.IsTrue(onlinePage.GetErrorPassengers(reverse_ticket_error_message));
        }
Exemplo n.º 27
0
 public static bool IsNoResults()
 {
     try
     {
         var noResultsMessage = DriverInstance.GetInstance().FindElement(By.XPath(NoResultsMessageByXPath));
     }
     catch (NoSuchElementException ex)
     {
         return(false);
     }
     return(NoResultsMessageByXPath == null ? false : true);
 }
Exemplo n.º 28
0
 public void ChangePassword()
 {
     Logger.Log.Info("Start ChangePassword test.");
     StartPage startPage = new StartPage(DriverInstance.GetInstance())
                           .OpenPage()
                           .ClickSignInAccountButton()
                           .FillInLoginAndPassword(Service.Service.WithUserPropertiesForSignIn())
                           .ClickMyTicket();
     MyTicketsPage myTicketsPage = new MyTicketsPage(DriverInstance.GetInstance())
                                   .ChangePassword(Service.Service.WithUserPropertiesRepeatNewPassword());
     //Assert.AreEqual(BASE_MESSAGE, myTicketsPage.GetMessageAlertAboutPassword());
 }
Exemplo n.º 29
0
 public void ResaveValuesInBuyerDataWithoutChanges()
 {
     Logger.Log.Info("Start ResaveValuesInBuyerDataWithoutChanges test.");
     StartPage startPage = new StartPage(DriverInstance.GetInstance())
                           .OpenPage()
                           .ClickSignInAccountButton()
                           .FillInLoginAndPassword(Service.Service.WithUserPropertiesForSignIn())
                           .ClickMyTicket();
     MyTicketsPage myTicketsPage = new MyTicketsPage(DriverInstance.GetInstance())
                                   .ClickToResaveBuyerData();
     //Assert.AreEqual(BASE_MESSAGE, myTicketsPage.GetErrorMessageAlertAboutResave());
 }
Exemplo n.º 30
0
    public void LackOfaCity()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB1("Минск", "Москва");


        //
        // TODO: добавьте здесь логику теста
        //
    }