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.
Asked
Active
Viewed 64 times
1 Answers
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();