コード例 #1
0
        /// <summary>
        /// Navigates to about me page
        /// </summary>
        public static void NavigateToAboutMe()
        {
            string dashboardUrl = Configuration.DashboardUrl;

            WebDriver.CurrentState.Navigate($"{dashboardUrl}/Home/AboutMe");

            if (!WebDriver.CurrentState.URL().StartsWith($"{dashboardUrl}/Home/AboutMe"))
            {
                // We may have to consent a second time since we are asking for a new audience
                try
                {
                    // Loading takes time, while opening the dashboard for the first time after setting the environment
                    Thread.Sleep(20000);
                    ClickNext();
                }
                catch
                {
                    // Nothing to do
                }
            }

            var aboutMePageAction = new AboutMePageAction();

            aboutMePageAction.ValidateTitle();
        }
コード例 #2
0
        /// <summary>
        /// Navigates to about me page
        /// </summary>
        public static void NavigateToAboutMe()
        {
            WebDriver.CurrentState.Navigate(Configuration.DashboardUrl);
            IWebElement aboutMeButton = WebDriver.CurrentState.GetElement(By.Id("nav-about-me"));

            aboutMeButton.Click();
            Thread.Sleep(2000);

            if (!WebDriver.CurrentState.URL().StartsWith(Configuration.DashboardUrl))
            {
                // We may have to consent a second time since we are asking for a new audience
                try
                {
                    // Loading takes time, while opening the dashboard for the first time after setting the environment
                    Thread.Sleep(20000);
                    ClickNext();
                }
                catch
                {
                    // Nothing to do
                }
            }

            var aboutMePageAction = new AboutMePageAction();
        }
コード例 #3
0
        /// <summary>
        /// Navigates to about me page
        /// </summary>
        public static void NavigateToAboutMe()
        {
            string dashboardUrl = Configuration.DashboardUrl;

            WebDriver.CurrentState.Navigate($"{dashboardUrl}/Home/AboutMe");

            if (!WebDriver.CurrentState.URL().StartsWith($"{dashboardUrl}/Home/AboutMe"))
            {
                // We may have to consent a second time since we are asking for a new audience
                try
                {
                    ClickNext();
                }
                catch
                {
                    // Nothing to do
                }
            }

            var aboutMePageAction = new AboutMePageAction();

            aboutMePageAction.ValidateTitle();
        }