kazurayam / chromedriverfactory

A Java library that enables you to launch Selenium ChromeDriver using an existing user Profile. That let you to carry cookies over multiple HTTP sessions via user Profile.
0 stars 0 forks source link

refactor "PreferencesModifier" #28

Closed kazurayam closed 2 years ago

kazurayam commented 2 years ago

in v0.2.7, i have

A preferences is just a Map<String, Object>, not specific to Chrome. Therefore it should be moved to the higher level of package and renamed

This is good to avoid code duplication in Chrome and Firefox

However, the "PreferencesModifiers" are unique e to Chrome and Firefox each, so they should be renamed , in the same page, to

kazurayam commented 2 years ago

It is not a good idea to have "PreferencesModifiers" class in 2 different packages. It is better to keep them named "ChromePreferencesModifies" and "FirefoxPreferencesModifies"

kazurayam commented 2 years ago

I moved com.kazurayam.webdriverfactory.chrome.PreferencesModifier to com.kazurayam.webdriverfactory.PreferencesModifier.

When I restarted working on Firefox, I found it ugly. A single class PreferencesModifier is shared by Chrome and Firefox together, which looks ugly.

I feel, better to seperate it into 2 for Chrome and FIrefox each