From 13be21742199be6bf9a06cf22204e8722c2db615 Mon Sep 17 00:00:00 2001 From: Niklas Berglund Date: Thu, 22 Aug 2024 17:25:46 +0200 Subject: [PATCH] Wait for out IP address to show --- .../mullvadvpn/test/common/interactor/AppInteractor.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 bc2481e55f07..1f75580e78b7 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 @@ -89,10 +89,12 @@ class AppInteractor( fun extractIpAddress(): String { device.findObjectWithTimeout(By.res("location_info_test_tag")).click() + + // Wait for out IP address information to show up + device.wait(Until.hasObject(By.textStartsWith("Out")), CONNECTION_TIMEOUT) return device .findObjectWithTimeout( - By.res("location_info_connection_out_test_tag"), - CONNECTION_TIMEOUT + By.res("location_info_connection_out_test_tag") ) .text .extractIpAddress()