appium/java-client

Do you plan to provide an extended Driver like UiAutomator2Options?

dylan-kwon opened this issue · 0 comments

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")