java-client icon indicating copy to clipboard operation
java-client copied to clipboard

Do you plan to provide an extended Driver like UiAutomator2Options?

Open dylan-kwon opened this issue 1 year ago • 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")

dylan-kwon avatar Apr 18 '24 20:04 dylan-kwon