/// <summary>Performs a context-click (right click) on an element.</summary> /// <param name="webelement"> The element to context-click. If None, clicks on current mouse position.</param> /// <returns></returns> public Actions contextClick(WebElement webelement = null) { if (webelement == null) { _actions.ContextClick(); } else { _actions.ContextClick(webelement._webElement); } return(this); }
public void rightClick(IWebElement elementToRightClick) { var action = new OpenQA.Selenium.Interactions.Actions(this.driver); action.ContextClick(elementToRightClick); action.Perform(); }
/// <summary> /// Execute the action /// </summary> /// <param name="actor"></param> /// <param name="ability"></param> protected override void ExecuteWhen(IActor actor, WebBrowser ability) { var seleniumActions = new OpenQA.Selenium.Interactions.Actions(ability.Driver); var element = _target.ResolveFor(ability.Driver); seleniumActions.ContextClick(element) .Build() .Perform(); }
protected static void RightClick(PageElement pageElement, TimeSpan?maxWaitTime = null) { pageElement.GoToFrame(); var actions = new OpenQA.Selenium.Interactions.Actions(SeleniumDriver.Driver); actions.ContextClick(SeleniumUtility.WebDriverWait(ExpectedConditions.ElementIsVisible(pageElement.Locator), maxWaitTime ?? Default5Seconds)).Build().Perform(); }
public bool rightclick(By by, string locatorName) { bool flag = false; try { WebElement elementToRightClick = driver.FindElement(by); Actions clicker = new Actions(driver); clicker.ContextClick(elementToRightClick).Perform(); flag = true; return(flag); // driver.findElement(by1).sendKeys(Keys.DOWN); } catch (Exception) { return(flag); } }
public void RightClick() { OpenQA.Selenium.Interactions.Actions action = new OpenQA.Selenium.Interactions.Actions(Driver); action.ContextClick(WebElement).Build().Perform(); }
public static void RegisterRightClick(IWebDriver browser, IWebElement element) { var action = new OpenQA.Selenium.Interactions.Actions(browser); action.ContextClick(element).Perform(); }