appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.2k stars 755 forks source link

[Feat}: patch AutomationName interface with Chromium for Chromium Driver. #1991

Closed AlessandroMiccoli closed 1 year ago

AlessandroMiccoli commented 1 year ago

When I use Chromium Driver, the only value allowed for AutomationName is Chromium. I checked the list of AutomationName, but it is not present.

Please, could we add it? Current AutomationName below:

package io.appium.java_client.remote;

public interface AutomationName {
    // Officially supported drivers
    @Deprecated
    String APPIUM = "Appium";
    // https://github.com/appium/appium-xcuitest-driver
    String IOS_XCUI_TEST = "XCuiTest";
    // https://github.com/appium/appium-uiautomator2-driver
    String ANDROID_UIAUTOMATOR2 = "UIAutomator2";
    // https://github.com/appium/appium-espresso-driver
    String ESPRESSO = "Espresso";
    // https://github.com/appium/appium-mac2-driver
    String MAC2 = "Mac2";
    // https://github.com/appium/appium-windows-driver
    String WINDOWS = "Windows";
    // https://github.com/appium/appium-safari-driver
    String SAFARI = "Safari";
    // https://github.com/appium/appium-geckodriver
    String GECKO = "Gecko";

    // Third-party drivers
    // https://github.com/YOU-i-Labs/appium-youiengine-driver
    String YOUI_ENGINE = "youiengine";
}

Code to add:

    // https://github.com/appium/appium-chromium-driver
    String CHROMIUM = "Chromium";

At the moment, I extend the interface into my code with the missed value. It will be more efficient to be in the parent class.

public interface ExtendedAutomationName extends AutomationName {

    // https://github.com/appium/appium-chromium-driver
    String CHROMIUM = "Chromium";
}
mykola-mokhnach commented 1 year ago

Feel free to propose a PR