单击“开始”按钮时出现问题。
当我点击“开始”按钮时,谷歌浏览器窗口打开但出现错误。 我安装了 google chrome 最新版本以及 visual studio、selenium webdriver 和 chrome 驱动程序。
我期望它会自动打开 Google Chrome 窗口并在搜索选项卡中输入文本。
namespace Sel
{
class Program
{
IWebDriver driver = new ChromeDriver();
static void Main(string[] args) { }
[SetUp]
public void Initialize()
{
driver.Navigate().GoToUrl("facebook.com");
}
[Test]
public void ExecuteTest
{
driver.Manage().Window.Maximize();
IWebElement searchBox = driver.FindElement(By.Name("email"));
searchBox.SendKeys("[email protected]");
}
}