del*_*lex 7 c# selenium google-chrome selenium-chromedriver
我正在使用 selenium C#,我正在尝试禁用“崩溃”chrome 的弹出窗口:

我尝试设置配置文件首选项,但似乎它根本没有改变,代码:
ChromeOptions options = new ChromeOptions();
options.AddUserProfilePreference("exit_type", "Normal");
options.AddUserProfilePreference("exited_cleanly", "true");
IWebDriver driver = new ChromeDriver(options);
Run Code Online (Sandbox Code Playgroud)
我尝试将退出类型的值更改为“none”和“None”,但在首选项文档中没有任何更改。
小智 0
使用下面的代码来处理这个弹出窗口:
ChromeOptions options = new ChromeOptions();
options.AddArguments("--disable-extensions");
options.AddArguments("--disable-application-cache");
driver = new ChromeDriver(options);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5847 次 |
| 最近记录: |