0

I want to test right click on a link by using MbUnit, Gallio and WatiN. Currently I can not see what is the way to do that. It seems that there is no method for right click which I can call from the framework. I am sure that there is a workaround, which I was not able to find currently.

enter image description here

Kromster
  • 7,181
  • 7
  • 63
  • 111
Velchev
  • 49
  • 5

1 Answers1

0

In WatiN, you might need to fire event directly, such as

myElement.FireEvent("oncontextmenu")

Also look at: WatiN FireEvent not passing event properties in FireFox

In selenium WebDriver, you can Use the Actions class. In C#,

IWebElement element = driver.FindElement(By.LinkText("LinkText"));
Actions actioner = new Actions(driver);
actioner.MoveToElement(elem).ContextClick(elem).Perform();
Community
  • 1
  • 1
Faiz
  • 3,216
  • 1
  • 19
  • 25