示例#1
0
文件: Events.cs 项目: mhakimov/energy
        public void Events_02_AdvancedSearch()
        {
            UiTest(() =>
            {
                _eventsPage = _myProfilePage.NavigateToEventsPage();

                _advancedSearchPage = _eventsPage.ClickAdvancedSearch();

                _advancedSearchPage.TypeInDateFrom(string.Format("{0:d}", DateTime.Now.AddYears(-1)));
                _advancedSearchPage.TypeInDateTo(string.Format("{0:d}", DateTime.Now.AddYears(1)));

                _advancedSearchPage.ChooseCategoriesAndRegions(new IWebElement[] { _advancedSearchPage.ConnectionsChb, _advancedSearchPage.ReliabilityChb, _advancedSearchPage.EnvironmentChb,
                                                                                   _advancedSearchPage.EnglandChb });

                _advancedSearchPage.ClickSearch();
                Assert.That(_advancedSearchPage.EventNameTx.Displayed);
                Assert.That(_advancedSearchPage.EventDateTx.Displayed);
                Assert.That(_advancedSearchPage.EventDescriptionTx.Displayed);
                Assert.That(_advancedSearchPage.ContactOrganiserBtn.Displayed);
                Assert.That(_advancedSearchPage.ContactOrganiserBtn.Enabled);
            });
        }
示例#2
0
文件: Events.cs 项目: mhakimov/energy
        public void Events_01_EventsCalendar()
        {
            UiTest(() =>
            {
                _eventsPage = _myProfilePage.NavigateToEventsPage();

                Assert.That(_eventsPage.Calendar.Displayed);
                Assert.That(_eventsPage.Calendar.Enabled);

                _eventsPage.ClickFutureEvent();
                Assert.That(_eventsPage.GetStartDate().Displayed);
                Assert.That(_eventsPage.GetStartDate().Text, Is.Not.Empty);

                _eventRegisterationPage = _eventsPage.ClickRegisterNow();
                Assert.That(_eventRegisterationPage.RegisterYourDetailsTx.Displayed);

                driver.Navigate().Back();
                _advancedSearchPage = _eventsPage.ClickAdvancedSearch();
                Assert.That(_advancedSearchPage.SearchResultsTx.Displayed);

                driver.Navigate().Back();
                Assert.That(_eventsPage.Calendar.Displayed);
            });
        }