コード例 #1
0
        private async void RenderTabContent(object obj)
        {
            if (obj is int index)
            {
                TabHeaderMode = TabDisplayMode.ImageWithText;
                switch (index)
                {
                case 0:     //Profile Tab
                    if (!this.IsProfilePageRendered)
                    {
                        await ProfilePage.InitializeAsync(null);
                    }
                    break;

                case 1:     //Job Tab
                    if (!this.IsJobPageRendered)
                    {
                        await JobPage.InitializeAsync(null);
                    }
                    break;

                case 2:     //Explore Tab
                    if (!this.IsExplorePageRendered)
                    {
                        await ExplorePage.InitializeAsync(null);
                    }
                    break;
                }
            }
        }
コード例 #2
0
        public void IsRelatedQueryExistsTest()
        {
            log.Info("Starting 'IsRelatedQueryExistsTest' in FireFox WebDriver");
            try
            {
                driver.Navigate().GoToUrl("https://trends.google.com");
                HomePage trendsHomePage = new HomePage(ngDriver, wait);
                trendsHomePage.SearchText("Selenium");

                ExplorePage explorePage = new ExplorePage(ngDriver, wait);
                explorePage.SelectCountry("Israel");
                explorePage.SelectSubregionsListView();
                explorePage.SelectSubregion("Tel Aviv District").Should().BeTrue();
                explorePage.CheckRelatedQueries().Should().BeTrue();
            }
            catch (NoSuchElementException e)
            {
                log.Error(e);
                driver.Quit();
            }
        }
コード例 #3
0
 public ExplorePageSteps(IWebDriver driver, ExplorePage explorePage)
 {
     _driver      = driver;
     _explorePage = explorePage;
 }
コード例 #4
0
 public void GivenIHaveEnteredIntoTheSearchBarAndSelectedAnOptionFromTheSuggestionList(string searchQuery, string category)
 {
     explorePage = trendsPage.SelectSuggestedOptionFromDropList(searchQuery, category);
     explorePage.GetPageTitle().Should().Be("Explore");
 }