0
我想疯狂地点击一个出现的菜单项。我读了关于使用的Actions类鼠标悬停的操作类?
Actions builder = new Actions(driver);
但是它不适用于我,因为我没有找到类型或名称空间。 我进口
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
感谢帮助,但现在类似的问题进一步下降。说它不能解决moveToElement或执行。 var builder = new Actions(_driver);操作悬停= builder.moveToElement(settingMenu); hover.perform; – Brian121212
这是因为moveToElement是Java绑定方法。在.NET中,它是MoveToElement。请注意最初的大写字母。 .NET API使用PascalCase方法名与其他库和框架本身保持一致。 Java绑定使用camelCase,这在该语言中很常见。 – JimEvans
非常感谢,我现在能够悬停 – Brian121212