大丈夫です!だから私は助けに感謝(私は実際にそのスレッドを見ていたが、.hover()クラスは廃止されてきた、と私はそれが仕事を得ることができませんでした。私がやった、しかし、単に固体の回避策を見つける。
var phone = driver.FindElement(By.Id("phones"));
var phoneLi = phone.FindElements(By.TagName("li"));
Actions action = new Actions(driver);//simply my webdriver
action.MoveToElement(phoneLi[1]).Perform();//move to list element that needs to be hovered
var click = action.MoveToElement(phoneLi[1].FindElements(By.TagName("a"))[0];//move to actual button link after the 'Li' was hovered
click.Click();
click.Perform(); //not too sure why I needed to use both of these, but I did. Don't care, it works ;)
IAlert alert = driver.SwitchTo().Alert();
alert.Accept();
また
、あなたが含ま文を使用してカップルを持っている必要があります
using OpenQA.Selenium;
using OpenQA.Selenium.Interactions;
using OpenQA.Selenium.Interactions.Internal;
using OpenQA.Selenium.Support.UI;
ホープ、このことができます
は、あなたがこの見てきました:。!http://stackoverflow.com/questions/2973145/selenium-and- hover-css – prestomanifesto