using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
// Specify the path to the Chrome profile
ChromeOptions options = new ChromeOptions();
options.AddArgument("user-data-dir=pathtoProfile\\Profile 3");
// Create a new instance of ChromeDriver with the options
IWebDriver driver = new ChromeDriver(options);
1条答案
按热度按时间lvjbypge1#
将用户数据目录参数添加到chrome选项并提供配置文件的路径