summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-02-25 13:01:22 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-02-25 15:29:54 +0100
commit33a49a99c76ca1879dbb0202384aa939a6d44a75 (patch)
tree7a49e7eb2f1a25af9d679b6c711573484c244fa2 /uitest
parenta24eac37fbf8a325b09c3b575c568621a696a560 (diff)
uitest: introduce wait_until_file_is_available
For export - import tests See https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91 Change-Id: I3c2537a43cc69067355f18162d6463e268420090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130530 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest/test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index b718c84bee5e..5ed20add799c 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -7,6 +7,7 @@
import time
import threading
+import os.path
from contextlib import contextmanager
from uitest.uihelper.common import get_state_as_dict
@@ -64,6 +65,13 @@ class UITest(object):
else:
time.sleep(DEFAULT_SLEEP)
+ def wait_until_file_is_available(self, fileName):
+ while True:
+ if os.path.isfile(fileName):
+ return
+ else:
+ time.sleep(DEFAULT_SLEEP)
+
@contextmanager
def wait_until_component_loaded(self):
with EventListener(self._xContext, "OnLoad") as event: