mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(sidecar): explicit Unit return in pressKey and waitForIdle withReconnect lambdas
This commit is contained in:
1 parent
665831ffd7
commit
8c6c8c85df
1 file changed
+2
@@ -568,6 +568,7 @@ class IosDriverBackend(private val udid: String) : DriverBackend {
|
|||||||
StubDriverBackend.KEY_MAP[key]?.let { keyCode ->
|
StubDriverBackend.KEY_MAP[key]?.let { keyCode ->
|
||||||
keyCodeToMaestro(keyCode)?.let { driver.pressKey(it) }
|
keyCodeToMaestro(keyCode)?.let { driver.pressKey(it) }
|
||||||
}
|
}
|
||||||
|
Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun screenshot(): Triple<ByteArray, Int, Int> = withReconnect {
|
override fun screenshot(): Triple<ByteArray, Int, Int> = withReconnect {
|
||||||
@@ -586,6 +587,7 @@ class IosDriverBackend(private val udid: String) : DriverBackend {
|
|||||||
|
|
||||||
override fun waitForIdle(durationMillis: Long) = withReconnect {
|
override fun waitForIdle(durationMillis: Long) = withReconnect {
|
||||||
driver.waitForAppToSettle(null, null, durationMillis.toInt())
|
driver.waitForAppToSettle(null, null, durationMillis.toInt())
|
||||||
|
Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun healthy() = runCatching { driver.contentDescriptor(false); true }.getOrElse { false }
|
override fun healthy() = runCatching { driver.contentDescriptor(false); true }.getOrElse { false }
|
||||||
|
|||||||
Reference in new issue
Block a user