Closed kazurayam closed 2 years ago
v0.2.4, in the ChromeOptionsModifiers, it simple "appends" options into a ChromeOptions object.
This is bad.
It should check if user-data-dir
option is already there or not. If is already there, it should replace it. If is not yet there, it should append it.
v0.2.4, in the ChromeDriverFactoryImpl, we have the following snippet
private ChromeDriver launchChrome(Path userDataDir,
ProfileDirectoryName profileDirectoryName,
UserDataAccess instruction) {
...
// use the specified UserProfile with which Chrome browser is launched
ChromeOptionsModifier com =
ChromeOptionsModifiers.withUserProfile(
targetUserDataDir,
profileDirectoryName.getName())
this.addChromeOptionsModifier(com)
this causes duplicating "user-data-dir" and "profile-directory.
I saw this:
Notice, there are 2
user-data-dir
and 2profile-directory
. This is bad. Which of profile-directory "Profile 6" and "Default" are actually used? Nobody knows.Both of
user-data-dir
andprofile-directory
should appear only once in an instance of employed DesiredCapabilities.