appium / java-client

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

Do you plan to provide an extended Driver like UiAutomator2Options? #2161

Open dylan-kwon opened 2 months ago

dylan-kwon commented 2 months ago

Is there a reason why you do not provide extended drivers such as UiAutomator2Driver? executeScript is flexible, but it is inconvenient to use multiple times.

For example, as follows

Current code

val result = driver.executeScript("mobile: {method-name}" mapOf(
    "key1": "value1"
    "key1": "value2"
))

Extended code

class UiAutomator2Driver(..): AndroidDriver(..) {
    fun methodName(value1: String, value2: String) = executeScript(..)
}
UiAutomator2Driver().methodName("value1", "value2")