summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorShiko <aelshreif7@gmail.com>2020-06-02 06:38:52 +0200
committerAhmed ElShreif <aelshreif7@gmail.com>2020-06-03 08:44:21 +0200
commita68e4fcbcfb7c78c6247d24ecb141e1d87d7c46e (patch)
tree5e274563fda3d1dae1a2a5274778ae39ac6fc393 /uitest
parent9073a47b99e22585c6d1603dd747cb14f081fca1 (diff)
uitest: avoid defining the same object multiple time in in math
Change-Id: I1ee5cde133390ca285bb154e6a373e0e5bc1cbed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95334 Tested-by: Jenkins Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/ui_logger_dsl/dsl_core.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 7390ec03f46a..644fc06e73dd 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -76,6 +76,7 @@ class ul_Compiler:
"# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-\n\n"
+ "from uitest.framework import UITestCase\n"
+ "from libreoffice.uno.propertyvalue import mkPropertyValues\n"
+ + "from uitest.uihelper.common import get_state_as_dict\n"
+ "import importlib\n\n"
+ "class TestClass(UITestCase):\n"
+ tab
@@ -806,14 +807,7 @@ class ul_Compiler:
# this put a prefix of char 'x' to avoid variable with name equal to number only
element_name="x"+str(math_element_selector.element_no)
- line = (
- double_tab
- + str(element_name)
- + ' = element_selector.getChild("'
- + str(math_element_selector.element_no)
- + '")\n'
- )
- self.variables.append(line)
+ self.init_Object(element_name,str(math_element_selector.element_no),"element_selector")
self.write_line_without_parameters(
str(element_name), "SELECT", "tuple"