Beispiel #1
0
 /// <summary>Clicks an element.</summary>
 /// <param name="webelement">The element to click. If None, clicks on current mouse position.</param>
 /// <returns></returns>
 public Actions click(WebElement webelement = null)
 {
     if (webelement == null)
     {
         _actions.Click();
     }
     else
     {
         _actions.Click(webelement._webElement);
     }
     return(this);
 }
        public void MouseClick(IWebDriver driver, IWebElement element)
        {
            var customWaiters = new CustomWaiters();
            var actions       = new OpenQA.Selenium.Interactions.Actions(driver);

            actions.Click(customWaiters.WaitUntilClickable(element)).Build().Perform();
        }
Beispiel #3
0
        public static void HoverAndSelect(IWebElement hoverElement, string clickElement)
        {
            Actions action = new Actions(_webDriver);
            var     el2    = Driver.FindElement(By.XPath(".//*[@title='" + clickElement + "']"));

            action.MoveToElement(hoverElement).Perform();
            action.Click(el2).Perform();
        }
 internal static void  DoubleClick(IWebElement clickElement, IWebDriver Driver)
 {
     OpenQA.Selenium.Interactions.Actions action = new OpenQA.Selenium.Interactions.Actions(Driver);
     action.Click(clickElement).Click(clickElement).Build().Perform();
 }
Beispiel #5
0
 public static void MouseClick(IWebElement element)
 {
     Console.WriteLine("Click the mouse on the element");
     var builder = new OpenQA.Selenium.Interactions.Actions(Driver);
     builder.Click(element).Perform();
 }