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

enum ChromeOptionsModifiers.Type is non extensible #48

Open kazurayam opened 1 year ago

kazurayam commented 1 year ago

‘ChormeOptionsModifier‘ Interface defines a method signagure:

public interface ChromeOptionsModifier {

    Type getType();

Why do we need this getType method? Any use?

ChromeOptionsModifies class contains an fixed enum Type { ... }:

public class ChromeOptionsModifiers {

    public enum Type {
        disableDevShmUsage,
        disableExtensions,
        disableGpu,
        disableInfobars,
        headless,
        incognito,
        noSandbox,
        singleProcess,
        windowSize,
        withProfileDirectoryName,
    }

This fixed enum prevents users to add their own implementation of ChromeOptionsModifier class.