驱动的格式,下面是错误ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference("profile.default_content_setting_values.plugins", 1); options.AddUserProfilePreference("profile.content_settings.plugin_whitelist.adobe-flash-player", 1); options.AddUserProfilePreference("profile.content_settings.exceptions.plugins. , .per_resource.adobe-flash-player", 1); options.AddUserProfilePreference("PluginsAllowedForUrls", "http://"); options.AddUserProfilePreference("PluginsAllowedForUrls", TestDataResource.MainPageURL); 浏览器 = 新的 ChromeDriver(选项);
弹出这个错误,驱动在root,有什么想法告诉我: OpenQA.Selenium.DriverServiceNotFoundException : chromedriver文件不存在当前目录或PATH环境变量上的目录。该驱动程序可以在http://chromedriver.storage.googleapis.com/index.html下载。TearDown : System.NullReferenceException : 对象引用未设置为对象的实例。