【发布时间】:2019-08-02 14:54:00
【问题描述】:
这是我的代码。我使用了 nuget 包 selenium、chrome 驱动器和 chrome 驱动器 exe。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace selenium
{
class Program
{
static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.google.com");
driver.FindElement(By.Name("q")).SendKeys("test");
}
}
}
【问题讨论】:
-
not working的定义是什么? -
项目没有出现任何错误,我也使用 try catch。