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(..)
}
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
Extended code