From 73a06cb9cd01948986a76989d970d2b4808d62bc 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 clickable --- .../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 7fe8da1ef232..c61da99c673f 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.clickable(true), DEFAULT_INTERACTION_TIMEOUT) + loginButton.click() } fun attemptCreateAccount() {