예제 #1
0
        /// <summary>
        /// Focuses a link before actually clicking it.
        /// </summary>
        /// <param name="scope">The <see cref="ElementScope"/> on which the action is performed.</param>
        public static void FocusClick([NotNull] this ElementScope scope)
        {
            ArgumentUtility.CheckNotNull("scope", scope);

            scope.Focus();
            scope.Click();
        }
예제 #2
0
        public void Click()
        {
            if (_more)
            {
                _browser.ClickLink("More");    // only used for header sub-options
                Thread.Sleep(1000);
            }
            element.Click();

            Thread.Sleep(2000);
        }
        public static void DragAndDrop(BrowserWindow currentBrowser, ElementScope elementFrom, ElementScope elementTo, bool clickAfter = true)
        {
            Actions action = new Actions((OpenQA.Selenium.Remote.RemoteWebDriver)((BrowserSession)currentBrowser).Native);

            action.DragAndDrop((IWebElement)elementFrom.Native, (IWebElement)elementTo.Native).Build().Perform();

            if (clickAfter)
            {
                elementTo.Click();
            }
        }
예제 #4
0
        public void ThenIHaveLoggedOutOfTheApplication()
        {
            ElementScope userDropdown = this.BrowserSession.FindId("userDropdown");

            userDropdown.Click();

            ElementScope logout = this.BrowserSession.FindId("logout");

            logout.Click();

            ElementScope logoutButton = this.BrowserSession.FindButton("Logout");

            logoutButton.Click();
        }
 public InfoWorksElement Click(int sleepTimeInSeconds = 0)
 {
     Element.Click();
     Thread.Sleep(sleepTimeInSeconds * 1000);
     return(this);
 }
        public void WhenIClickOnTheCreateTournamentButton()
        {
            ElementScope section = this.BrowserSession.FindButton("Create Tournament");

            section.Click();
        }
 public UIElement Click()
 {
     _element.Click();
     return(this);
 }
예제 #8
0
        /// <inheritdoc/>
        protected override void ExecuteInteraction(ElementScope scope)
        {
            ArgumentUtility.CheckNotNull("scope", scope);

            scope.Click();
        }