From c74e13ee6bc9cdf2615227593773b2f62b4fecb4 Mon Sep 17 00:00:00 2001 From: Niklas Berglund Date: Fri, 23 Aug 2024 09:35:52 +0200 Subject: [PATCH] Wait for login button to be enabled --- .../mullvadvpn/test/common/interactor/AppInteractor.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt index d170e1463296..19de2ac789b0 100644 --- a/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt +++ b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt @@ -57,7 +57,9 @@ class AppInteractor( device.findObjectWithTimeout(By.clazz("android.widget.EditText")).apply { text = accountNumber } - loginObject.parent.findObject(By.clazz(Button::class.java)).click() + val loginButton = loginObject.parent.findObject(By.clazz(Button::class.java)) + loginButton.wait(Until.enabled(true), DEFAULT_INTERACTION_TIMEOUT) + loginButton.click() } fun attemptCreateAccount() {