How to do a mouse over using selenium webdriver to see the hidden menu without performing any mouse clicks?
automated-tests, c#, selenium-webdriver
Solution
Try this?
// this makes sure the element is visible before you try to do anything
// for slow loading pages
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
var element = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(elementId)));
Actions action = new Actions(driver);
action.MoveToElement(element).Perform();
Problem
How to do a mouse hover/over using selenium webdriver to see the hidden menu without performing any mouse clicks? There is a hidden menu on website which i am testing that only appears on mouse hover/over. Note: if any clicks is performed, page is redirected so please suggest a solution without click I tried: ``` IWebDriver driver = new FirefoxDriver() Actions builder = new Actions(driver) builder.MoveToElement(driver.FindElement(By.Id("Content_AdvertiserMenu1_LeadsBtn"))) .Click().Build().Perform(); ```