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 th
You need to use - using OpenQA.Selenium.Interactions;
yeah the question you posted is about tool tip
perform mouse hover the then capture its attribute value
closely observe your HTML code manually move your mouse pointer on the element & observe in which attribute value your hidden text present
Actions builder = new Actions(driver)
builder.MoveToElement(driver.FindElement(By.Id("Content_AdvertiserMenu1_LeadsBtn")))
.Click().Build().Perform();
String value=driver.FindElement(By.Id("Content_AdvertiserMenu1_LeadsBtn")).getAttribute("attribute value in which hidden text presents");
Just wanted to mention that a last resort workaround could be to try javascript mouse over simulation.
Solutions for that in various languages are posted here: http://code.google.com/p/selenium/issues/detail?id=2067
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();