public void ExpandContextMenu() { IWebElement button = Driver.FindElement(By.XPath("//span[text()='right click me']")); Assert.IsFalse(IsContextMenuDisplayed()); button.AdvancedAction().RightClick(); Assert.IsTrue(IsContextMenuDisplayed()); }