コード例 #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);
        }
コード例 #2
0
    public void TicketSearch()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();
        page.TestB10("123456789100", "Иванов ");
    }
コード例 #3
0
    public void PromoEconomyBorder()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

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

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

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

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

            mainPage.OpenPage();

            mainPage.Test1();
        }
コード例 #8
0
    public void DepartureAbroad()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB4("Москва", "Бангкок", "3", "3", "09.01.2018");
    }
コード例 #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());
        }
コード例 #10
0
    public void AnotherCity()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

        page.TestB3("Москва", "Москва, Москва, Шереметьево");
    }
コード例 #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());
        }
コード例 #12
0
        public void Status()
        {
            var        driver     = DriverInstance.GetInstance();
            OnlinePage onlinePage = new OnlinePage(driver);

            onlinePage.OpenPage();

            onlinePage.Test7("234234");
        }
コード例 #13
0
        public void NewAero()
        {
            var driver = DriverInstance.GetInstance();
            SpecialOffersPage specialOffersPage = new SpecialOffersPage(driver);

            specialOffersPage.OpenPage();

            specialOffersPage.Test5();
        }
コード例 #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", "Беларусь");
        }
コード例 #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");
        }
コード例 #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");
        }
コード例 #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());
        }
コード例 #18
0
        public void InformationPlase()
        {
            var             driver          = DriverInstance.GetInstance();
            InformationPage informationPage = new InformationPage(driver);

            informationPage.OpenPage();

            informationPage.Test8();
        }
コード例 #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());
        }
コード例 #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));
    }
コード例 #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());
        }
コード例 #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());
        }
コード例 #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());
        }
コード例 #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);
        }
コード例 #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));
    }
コード例 #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));
        }
コード例 #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);
 }
コード例 #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());
 }
コード例 #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());
 }
コード例 #30
0
    public void LackOfaCity()
    {
        var      driver = DriverInstance.GetInstance();
        MainPage page   = new MainPage(driver);

        page.OpenPage();

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


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