简体   繁体   中英

How Can I Hover over on an invisible button using selenium webdriver?

There is an invisible button on my webpage which becomes visible when a mouse hover is done on the element. What I Have to do is

Hover over the element

when I run selenium scripts it fails when reaches to invisible element.How can I find that invisible button and how to hover

Actions actions = new Actions(driver);
IWebElement menuHoverLink = driver.FindElement(By.Id(""));
actions.MoveToElement(menuHoverLink);
actions.Build().Perform();

you can find your button by id/xpath/className and so on ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM