加载chrome用户配置
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:
\\Users
\\test
\\AppData
\\Local
\\Google
\\Chrome
\\User Data
\\Default");
WebDriever driver = new ChromeDriver(options );
加载firefox用户配置
ProfilesIni allProfiles =
new ProfilesIni();
FirefoxProfile profile = allProfiles.getProfile(
"default");
WebDriever driver =
new FirefoxDriver(profile);