From 4233b6c9833fc42c73c5f99d998ec4ee95bebd5b Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Wed, 20 Sep 2023 07:44:43 -0400 Subject: uitest: add load properties parameters Add the option to include the load properties when invoked load_file function. Signed-off-by: Henry Castro Change-Id: I27cb31e2470bc76bcc5b760661e50f00fc334d64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157102 --- uitest/uitest/test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'uitest') diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index c07667cd621a..1d3ec2c39449 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -88,9 +88,9 @@ class UITest(object): return time.sleep(DEFAULT_SLEEP) - def load_component_from_url(self, url, eventName="OnLoad"): + def load_component_from_url(self, url, eventName="OnLoad", load_props=()): with EventListener(self._xContext, eventName) as event: - component = self.get_desktop().loadComponentFromURL(url, "_default", 0, tuple()) + component = self.get_desktop().loadComponentFromURL(url, "_default", 0, load_props) while True: if event.executed: frames = self.get_frames() @@ -101,9 +101,9 @@ class UITest(object): # Calls UITest.close_doc at exit @contextmanager - def load_file(self, url): + def load_file(self, url, load_props=()): try: - yield self.load_component_from_url(url) + yield self.load_component_from_url(url, "OnLoad", load_props) finally: self.close_doc() -- cgit v1.2.3