且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过 Selenium、ChromeDriver 和 GoogleChrome 打开默认 Chrome 配置文件

更新时间:2022-12-05 19:23:16

我知道这是一个老问题,但对我有用的是删除C:"并将所有反斜杠替换为正斜杠.因此,从原始问题来看,这应该可以加载默认配置文件:

I know this is an old question, but what worked for me is to do remove the "C:" and replace all of the backslashes with forward slashes. So, with that from the original question, this should work to load the default profile:

options.AddArgument("user-data-dir=/Users/User/AppData/Local/Google/Chrome/User Data");