[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2022-02-19 Thread Ilmari Lauhakangas (via logerrit)
 uitest/ui_logger_dsl/General_commands.tx  |   16 -
 uitest/ui_logger_dsl/Special_commands.tx  |   43 +++---
 uitest/ui_logger_dsl/UI_Object_commands.tx|   14 
 uitest/ui_logger_dsl/dialog_commands.tx   |   10 +++---
 uitest/ui_logger_dsl/dsl_core.py  |   12 +--
 uitest/ui_logger_dsl/starter_commands.tx  |7 +---
 uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx |   14 
 uitest/ui_logger_dsl/uno_commands.tx  |6 +--
 8 files changed, 53 insertions(+), 69 deletions(-)

New commits:
commit 94fc8eaba84a328ea064ee13efdd405e61209a50
Author: Ilmari Lauhakangas 
AuthorDate: Sat Feb 19 13:00:36 2022 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Sat Feb 19 13:36:43 2022 +0100

uilogger: improve language in comments

Change-Id: I8406bdf375cf83d504e45a5c8f27ce2ceb1f9c51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130190
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/uitest/ui_logger_dsl/General_commands.tx 
b/uitest/ui_logger_dsl/General_commands.tx
index 5f5c404402f5..2be59ce75f1a 100644
--- a/uitest/ui_logger_dsl/General_commands.tx
+++ b/uitest/ui_logger_dsl/General_commands.tx
@@ -1,9 +1,8 @@
 /*
-This file for the log statements that is general for all application
-we can use it as general commands then relate it to its application
-as we have in the starter command
-//
-also I make set zoom to be general as it will be better
+This file is for the log statements that are general for all applications.
+We can use them as general rules for commands and relate them to the
+applications found in starter_commands.tx
+Zoom is also general as it is better to treat it that way.
 */
 
 import type_options
@@ -21,9 +20,8 @@ Select_command:
 'Select ' '{"OBJECT":' name=STRING '}'
 ;
 
-//==
-//This Part if you want to type text in any of these UI elements This will be 
handled with this Grammar
+// This part is for typing text in any of these UI elements
 
 General_type_command_on_UI_Object:
-  'Type on' UI_Obj=STRING  what_to_type=Type_options 'from' parent_id=ID  
-;
\ No newline at end of file
+  'Type on' UI_Obj=STRING  what_to_type=Type_options 'from' parent_id=ID
+;
diff --git a/uitest/ui_logger_dsl/Special_commands.tx 
b/uitest/ui_logger_dsl/Special_commands.tx
index 9d37029a5e95..fb3a6e235fa9 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -1,16 +1,16 @@
-import type_options
-
 /*
-This file for the log statements that relates to each different 
applications
-Each Grammar Command here is related to his own application
+This file is for the log statements that relate to each application.
+Each grammar rule here is related to a specific application.
 */
 
+import type_options
+
 SpecialCommand:
   writer_command | calc_command | impress_command | math_command | draw_command
 ;
 
 /*
-  This part for all the writer log statements:
+  This part is for all the Writer log statements:
 
 1)  Type
 2)  Select
@@ -20,8 +20,6 @@ SpecialCommand:
 6)  Cut Text
 7)  Paste Text
 8)  Insert Break Page
-
-  then we can add whatever we need in the future
 */
 writer_command:
 writer_Type_command | writer_Select_command | writer_GOTO_command |
@@ -32,7 +30,7 @@ writer_Type_command:
   'Type on writer' what_to_type=Type_options
 ;
 writer_Select_command:
-  'Select from Pos' from_pos=INT 'to Pos' to_pos=INT 
+  'Select from Pos' from_pos=INT 'to Pos' to_pos=INT
 ;
 writer_GOTO_command:
   'GOTO page number' page_num=INT
@@ -53,9 +51,8 @@ writer_Insert_BreakPage:
   'Insert Break Page'
 ;
 
-//=//
 /*
-  This part for all the calc log statements:
+  This part is for all the Calc log statements:
 
 1)  select sheet
 2)  Select cell or range
@@ -71,13 +68,11 @@ writer_Insert_BreakPage:
 12) Unmerge Cells
 13) Open Comment
 14) Close Comment
-
-  then we can add whatever we need in the future
 */
 calc_command:
   calc_Type_command | calc_switch_sheet | calc_Select_cell | 
calc_AutoFill_filter |
   calc_SelectMenu_filter | calc_Delete_Cells | calc_Remove_Content | 
calc_insert_cells |
-  calc_Cut_Cells | calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells | 
+  calc_Cut_Cells | calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells |
   calc_Merge_Cells | calc_Rename_Sheet | calc_Insert_sheet | calc_Open_Comment 
|
   calc_Close_Comment
 ;
@@ -144,17 +139,14 @@ select_options:
 one_cell | range_of_cells
 ;
 
-//=//
 /*
-  This part for all the impress log statements:
+  This part is for all the Impress log statements:
 
 1)  Type
 2)  Insert New Slide
 3)  Delete Slide
 4)  Duplicate Slide
 5)  

[Libreoffice-commits] core.git: uitest/ui_logger_dsl vcl/source

2022-02-18 Thread Ilmari Lauhakangas (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |   24 +---
 vcl/source/control/ivctrl.cxx  |5 ++---
 vcl/source/uitest/logger.cxx   |2 +-
 3 files changed, 16 insertions(+), 15 deletions(-)

New commits:
commit bcc83732f906bb7e89f8d67e4817fe0f4bf09b0e
Author: Ilmari Lauhakangas 
AuthorDate: Thu Feb 17 18:25:20 2022 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Sat Feb 19 08:03:31 2022 +0100

uilogger: make vertical tab handling more robust

For example hyperlink dialog does not have numeric ids for tabs.
Now the rule matches both integers and "common identifiers" as per
https://textx.github.io/textX/stable/grammar/#textx-base-types

Parent argument was removed as it does not seem to be used and
it was empty in the case of the hyperlink dialog, causing the DSL
parser to fail.

More work is needed as self.xUITest.getTopFocusWindow() in a
hyperlink dialog opening test does not contain the child "tabcontrol"
and thus it errors out.

Change-Id: I1637f7300884881ee4d869e8f04700e56935f2d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130111
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 04f975a39066..f3d5d42903e5 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -1,7 +1,7 @@
 import type_options
 
 /*
-this file is for The Grammar of: 
+this file is for The Grammar of:
 1)  ButtonUIObject : ( Click event )
 2)  EditUIObject   : ( Type event - Clear event - Select Text 
event )
 3)  CheckBoxUIObject   : ( Toggle the value  )
@@ -16,26 +16,28 @@ import type_options
 */
 
 UIObjectCommand:
-  ButtonUIObject | CheckBoxUIObject | EditUIObject | 
-  RadioButtonUIObject | ListBoxUIObject | ComboBoxUIObject | 
+  ButtonUIObject | CheckBoxUIObject | EditUIObject |
+  RadioButtonUIObject | ListBoxUIObject | ComboBoxUIObject |
   SpinFieldUIObject | TabControlUIObject | ToolBoxUIObject |
   ValueSetUIObject | MenuBtnUIObject
 ;
-
+TabPageNumber:
+  INT | ID
+;
 ButtonUIObject:
   'Click on' ui_button=STRING  ('from' parent_id=ID)?
-;  
+;
 CheckBoxUIObject:
-  'Toggle' Check_box_id=STRING 'CheckBox' ('from' parent_id=ID)?   
-;  
+  'Toggle' Check_box_id=STRING 'CheckBox' ('from' parent_id=ID)?
+;
 RadioButtonUIObject:
-  'Select' Radio_button_id=STRING 'RadioButton' ('from' parent_id=ID)? 
-;  
+  'Select' Radio_button_id=STRING 'RadioButton' ('from' parent_id=ID)?
+;
 ComboBoxUIObject:
-   'Select in' Combo_box_id=STRING 'ComboBox' 'item number' item_num=INT 
('from' parent_id=ID)?  
+   'Select in' Combo_box_id=STRING 'ComboBox' 'item number' item_num=INT 
('from' parent_id=ID)?
 ;
 TabControlUIObject:
-   'Choose Tab number' tab_page_number=INT 'in' tab_id=STRING ('from' 
parent_id=ID)? 
+   'Choose Tab number' tab_page_number=TabPageNumber 'in' tab_id=STRING 
('from' parent_id=ID)?
 ;
 EditUIObject:
action=action_on_UIObject ('from' parent_id=ID)?
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index dc55deed29d4..54b64373cde0 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -36,13 +36,12 @@ using namespace ::com::sun::star::accessibility;
 
 namespace
 {
-void collectUIInformation( const OUString& aID, const OUString& aPos , const 
OUString& aParent )
+void collectUIInformation( const OUString& aID, const OUString& aPos)
 {
 EventDescription aDescription;
 aDescription.aID = aID;
 aDescription.aParameters = {{ "POS" ,  aPos}};
 aDescription.aAction = "SELECT";
-aDescription.aParent = aParent;
 aDescription.aKeyWord = "VerticalTab";
 UITestLogger::getInstance().logEvent(aDescription);
 }
@@ -544,7 +543,7 @@ void VerticalTabControl::SetCurPageId(const OString& rId)
 ActivatePage();
 pNewData->xPage->Show();
 }
-
collectUIInformation(get_id(),OStringToOUString(m_sCurrentPageId,RTL_TEXTENCODING_UTF8),
 GetPageParent()->get_id());
+
collectUIInformation(get_id(),OStringToOUString(m_sCurrentPageId,RTL_TEXTENCODING_UTF8));
 }
 
 const OString & VerticalTabControl::GetPageId(sal_uInt16 nIndex) const
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 4eef2ee0ebb1..29520fd61331 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -598,7 +598,7 @@ void UITestLogger::logEvent(const EventDescription& 
rDescription)
 else if (rDescription.aKeyWord == "VerticalTab")
 {
 aLogLine = "Choose Tab number " + 
GetValueInMapWithIndex(rDescription.aParameters, 0)
-   + " in '" + rDescription.aID + "' from " + 
rDescription.aParent;
+   + " in '" + rDescription.aID + "'";
 }
 else
 {


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2021-12-02 Thread Xisco Fauli (via logerrit)
 uitest/ui_logger_dsl/dsl_core.py |   78 ++-
 1 file changed, 36 insertions(+), 42 deletions(-)

New commits:
commit 4fc44b5f911e6518fc9e8a315531ca852d19c642
Author: Xisco Fauli 
AuthorDate: Thu Dec 2 11:10:02 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 2 17:39:11 2021 +0100

uilogger: Adapt code to the new syntax of uitests

also fix the license header

Change-Id: Icc759c695f192e1768210f66bff57a936df5fc4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126219
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 95f41c27df46..0629a2597da4 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -19,8 +19,6 @@ except ImportError:
 sys.exit(1)
 
 tab = ""
-double_tab = ""
-
 
 def parse_args():
 """
@@ -73,7 +71,14 @@ class ul_Compiler:
 )
 sys.exit(1)
 line = (
-"# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 
-*-\n\n"
+"# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 
-*-\n"
++ "#\n"
++ "# This file is part of the LibreOffice project.\n"
++ "#\n"
++ "# This Source Code Form is subject to the terms of the Mozilla 
Public\n"
++ "# License, v. 2.0. If a copy of the MPL was not distributed 
with this\n"
++ "# file, You can obtain one at http://mozilla.org/MPL/2.0/\n;
++ "#\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"
@@ -161,7 +166,7 @@ class ul_Compiler:
 else:
 self.objects[self.current_app] = 1
 line = (
-double_tab
+tab * 4
 + self.current_app
 + ' = MainWindow.getChild("'
 + self.current_app
@@ -176,7 +181,7 @@ class ul_Compiler:
 else:
 self.objects[Id_of_Object] = 1
 line = (
-double_tab
+tab * 4
 + Id_of_Object
 + " = "
 + Obj_parent
@@ -189,7 +194,7 @@ class ul_Compiler:
 
 def write_line_without_parameters(self, Action_holder, Action, 
Action_type):
 line = (
-double_tab
+tab * 4
 + Action_holder
 + '.executeAction("'
 + Action
@@ -203,7 +208,7 @@ class ul_Compiler:
 self, Action_holder, Action, Parameter_name, parameter_value
 ):
 line = (
-double_tab
+tab * 4
 + Action_holder
 + '.executeAction("'
 + Action
@@ -226,7 +231,7 @@ class ul_Compiler:
 ):
 
 line = (
-double_tab
+tab * 3
 + Action_holder
 + '.executeAction("'
 + Action
@@ -245,7 +250,7 @@ class ul_Compiler:
 def handle_uno(self, UNOCommand):
 if UNOCommand.parameters == None:
 line = (
-double_tab
+tab * 3
 + 'self.xUITest.executeCommand("'
 + UNOCommand.uno_command_name
 + '")\n'
@@ -257,7 +262,7 @@ class ul_Compiler:
 parameters = parameters[:-1]
 
 line = (
-double_tab
+tab * 3
 + 'self.xUITest.executeCommandWithParameters("'
 + UNOCommand.uno_command_name
 + '", mkPropertyValues({'
@@ -270,14 +275,14 @@ class ul_Compiler:
 
 def handle_start(self, StarterCommand):
 line = (
-double_tab
-+ 'MainDoc = self.ui_test.create_doc_in_start_center("'
+tab * 2
++ 'with self.ui_test.create_doc_in_start_center("'
 + StarterCommand.program_name
-+ '")\n'
++ '") as document:\n'
 )
 self.variables.append(line)
 
-line = double_tab + "MainWindow = self.xUITest.getTopFocusWindow()\n"
+line = tab * 3 + "MainWindow = self.xUITest.getTopFocusWindow()\n"
 self.variables.append(line)
 app = {
 "writer": "writer_edit",
@@ -315,18 +320,14 @@ class ul_Compiler:
 
 if key_word == "Dialog":
 old_line = (
-double_tab
-+ 'self.ui_test.execute_dialog_through_command("'
+tab * 3
++ 'with self.ui_test.execute_dialog_through_command("'
 + self.prev_command.uno_command_name
-+ '")\n'
++ '") as '
++ DialogCommand.dialog_name
++ ':\n'
 )
 

[Libreoffice-commits] core.git: uitest/ui_logger_dsl vcl/source

2020-09-03 Thread Ahmed ElShreif (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |   16 +++
 uitest/ui_logger_dsl/dsl_core.py   |   60 +
 vcl/source/control/menubtn.cxx |   21 ++
 vcl/source/uitest/logger.cxx   |   11 +
 4 files changed, 107 insertions(+), 1 deletion(-)

New commits:
commit cdb9c24b45ce7c35cf507430bd5ee1d9c3d5ea72
Author: Ahmed ElShreif 
AuthorDate: Fri Aug 28 05:35:22 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Fri Sep 4 00:58:21 2020 +0200

uilogger : Add support in the Logger and DSL for MenuBtn

For example the DSL syntax will be:
>>Open List From menugearbtn
>>Select item no 6 From List of menugearbtn
>>Close List From menugearbtn

Change-Id: I767948d9bc124a119632825d437746ea38c40ad3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101514
Tested-by: Jenkins
Reviewed-by: Ahmed ElShreif 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 7770bc1ee581..04f975a39066 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -12,13 +12,14 @@ import type_options
 8)  TabControlUIObject ( Change tab event )
 9)  ToolBoxUIObject ( Click on item event )
 10) ValueSetUIObject (Choose item)
+10)  MenuBtnUIObject ( Select - Open - Close )
 */
 
 UIObjectCommand:
   ButtonUIObject | CheckBoxUIObject | EditUIObject | 
   RadioButtonUIObject | ListBoxUIObject | ComboBoxUIObject | 
   SpinFieldUIObject | TabControlUIObject | ToolBoxUIObject |
-  ValueSetUIObject
+  ValueSetUIObject | MenuBtnUIObject
 ;
 
 ButtonUIObject:
@@ -52,6 +53,19 @@ ValueSetUIObject:
'Choose element with position ' POS=INT 'in' value_set_id=STRING 'from' 
parent_id=STRING
 ;
 //=
+MenuBtnUIObject:
+  MenuBtnUIObjectOpen | MenuBtnUIObjectSelect | MenuBtnUIObjectClose
+;
+MenuBtnUIObjectOpen:
+'Open List From' + MenuBtn_ID=ID
+;
+MenuBtnUIObjectClose:
+'Close List From' + MenuBtn_ID=ID
+;
+MenuBtnUIObjectSelect:
+'Select item no' + item_num=INT + 'From List of' + MenuBtn_ID=ID
+;
+//=
 //helper grammar for EditUIObject
 action_on_UIObject:
 Type_action | SELECT | Clear
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index fa17391eafa7..95f41c27df46 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -105,6 +105,9 @@ class ul_Compiler:
 "EditUIObject": self.handle_Edit_uiObject,
 "ToolBoxUIObject": self.handle_ToolBox_uiObject,
 "ValueSetUIObject": self.handle_ValueSet_uiObject,
+"MenuBtnUIObjectOpen":self.handle_MenuBtnUIObjectOpen,
+"MenuBtnUIObjectSelect":self.handle_MenuBtnUIObjectSelect,
+"MenuBtnUIObjectClose":self.handle_MenuBtnUIObjectClose,
 "writer_Type_command": self.handle_writer_type,
 "writer_Select_command": self.handle_writer_select,
 "writer_GOTO_command": self.handle_writer_goto,
@@ -667,6 +670,63 @@ class ul_Compiler:
 
 self.prev_command = ValueSetUIObject
 
+def handle_MenuBtnUIObjectOpen(self, MenuBtnUIObjectOpen):
+name_of_obj = ""
+if keyword.iskeyword(MenuBtnUIObjectOpen.MenuBtn_ID):
+name_of_obj = "x" + MenuBtnUIObjectOpen.MenuBtn_ID
+else:
+name_of_obj = MenuBtnUIObjectOpen.MenuBtn_ID
+
+self.init_Object(
+name_of_obj,
+MenuBtnUIObjectOpen.MenuBtn_ID,
+self.last_parent[self.parent_hierarchy_count],
+)
+
+self.write_line_with_one_parameters(
+name_of_obj, "OPENLIST", "", ""
+)
+
+self.prev_command = MenuBtnUIObjectOpen
+
+def handle_MenuBtnUIObjectClose(self, MenuBtnUIObjectClose):
+name_of_obj = ""
+if keyword.iskeyword(MenuBtnUIObjectClose.MenuBtn_ID):
+name_of_obj = "x" + MenuBtnUIObjectClose.MenuBtn_ID
+else:
+name_of_obj = MenuBtnUIObjectClose.MenuBtn_ID
+
+self.init_Object(
+name_of_obj,
+MenuBtnUIObjectClose.MenuBtn_ID,
+self.last_parent[self.parent_hierarchy_count],
+)
+
+self.write_line_with_one_parameters(
+name_of_obj, "CLOSELIST", "", ""
+)
+
+self.prev_command = MenuBtnUIObjectClose
+
+def handle_MenuBtnUIObjectSelect(self, MenuBtnUIObjectSelect):
+name_of_obj = ""
+if keyword.iskeyword(MenuBtnUIObjectSelect.MenuBtn_ID):
+name_of_obj = "x" + MenuBtnUIObjectSelect.MenuBtn_ID
+else:
+name_of_obj = MenuBtnUIObjectSelect.MenuBtn_ID
+
+self.init_Object(
+name_of_obj,
+MenuBtnUIObjectSelect.MenuBtn_ID,
+

[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2020-08-29 Thread Andrea Gelmini (via logerrit)
 uitest/ui_logger_dsl/dsl_core.py |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 88e52e539eaf7981441ec3e042f321c2615919ca
Author: Andrea Gelmini 
AuthorDate: Fri Aug 28 12:15:50 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 29 11:44:46 2020 +0200

Fix typo in code

It passed "make on check" on Linux

Change-Id: Ia1d8d828eea7ca3f39559bd2554cb9778ca6bb32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101599
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index b9941c81c746..8fa7d141c2c3 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -190,7 +190,7 @@ class ul_Compiler:
 self.variables.append(line)
 
 def write_line_with_one_parameters(
-self, Action_holder, Action, Paramerter_name, parameter_value
+self, Action_holder, Action, Parameter_name, parameter_value
 ):
 line = (
 double_tab
@@ -198,7 +198,7 @@ class ul_Compiler:
 + '.executeAction("'
 + Action
 + '", mkPropertyValues({"'
-+ Paramerter_name
++ Parameter_name
 + '": "'
 + str(parameter_value)
 + '"}))\n'
@@ -209,9 +209,9 @@ class ul_Compiler:
 self,
 Action_holder,
 Action,
-Paramerter_name_1,
+Parameter_name_1,
 parameter_value_1,
-Paramerter_name_2,
+Parameter_name_2,
 parameter_value_2,
 ):
 
@@ -221,11 +221,11 @@ class ul_Compiler:
 + '.executeAction("'
 + Action
 + '", mkPropertyValues({"'
-+ Paramerter_name_1
++ Parameter_name_1
 + '": "'
 + str(parameter_value_1)
 + '", "'
-+ Paramerter_name_2
++ Parameter_name_2
 + '": "'
 + str(parameter_value_2)
 + '"}))\n'
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2020-07-03 Thread Ahmed ElShreif (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 287adbce9a6e5d045a1d6873ac312370630a922d
Author: Ahmed ElShreif 
AuthorDate: Thu Jul 2 07:11:26 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Fri Jul 3 11:46:38 2020 +0200

uitest: Fix small issue in UI Logger DSL grammar "EditUIObject"

Change-Id: I5ce8f14f4075e6d2f79b3c20ce1686b644f87d27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97691
Tested-by: Jenkins
Reviewed-by: Ahmed ElShreif 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 0f766d87a4dc..2d3724f2d11e 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -52,7 +52,7 @@ Type_action:
 ;
 SELECT:
   'Select in ' edit_button=STRING
-  '{"FROM": "' from_pos=INT '" , "TO" : "'to_pos=INT '"}'
+  '{' + '"FROM"' + ':' + '"' from_pos=INT '"' + ',' + '"TO"' + ':' + '"' 
to_pos=INT '"'+'}'
 ;
 Clear:
   'Clear' edit_button=STRING
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2020-06-03 Thread Shiko (via logerrit)
 uitest/ui_logger_dsl/dsl_core.py |   10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit a68e4fcbcfb7c78c6247d24ecb141e1d87d7c46e
Author: Shiko 
AuthorDate: Tue Jun 2 06:38:52 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Wed Jun 3 08:44:21 2020 +0200

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 

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"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2020-05-17 Thread EL-SHREIF (via logerrit)
 uitest/ui_logger_dsl/Special_commands.tx |2 +-
 uitest/ui_logger_dsl/dsl_core.py |   25 +++--
 2 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 78dc713fd7b7abe4612c740a37a22eda8fc63cd2
Author: EL-SHREIF 
AuthorDate: Sat May 16 06:52:47 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Sun May 17 13:00:14 2020 +0200

uitest: Fix some issue in the UI Logger DSL core

It solve these problems:

1) math generated test cases wasn't run because the element 
selector wasn't initialized
2) avoid variables that has variable name equal number only
3) avoid reusing UI object that reference to closed dialog

Change-Id: I21221716bfa76889b6563955f60a7f99143fe9c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94338
Tested-by: Jenkins
Reviewed-by: Ahmed ElShreif 

diff --git a/uitest/ui_logger_dsl/Special_commands.tx 
b/uitest/ui_logger_dsl/Special_commands.tx
index 1667eace0ef3..071cfb9dcbbb 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -174,7 +174,7 @@ math_command:
 math_element_selector | math_Type_command
 ;
 math_element_selector:
-'Select element no ' element_no=INT ' From ' place=ID
+'Select element no ' element_no=INT 'From' place=ID
 ;
 math_Type_command:
 'Type on math ' what_to_type=Type_options
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 074e4b871467..d4a9601f3997 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -42,6 +42,7 @@ class ul_Compiler:
 parent_hierarchy_count = 0
 last_parent = []
 flag_for_QuerySaveDialog = False
+math_element_selector_initializer= False;
 
 def __init__(self, input_address, output_address):
 self.ui_dsl_mm = metamodel_from_file("ui_logger_dsl_grammar.tx")
@@ -169,6 +170,7 @@ class ul_Compiler:
 + name_of_child
 + '")\n'
 )
+
 self.variables.append(line)
 
 def write_line_without_parameters(self, Action_holder, Action, 
Action_type):
@@ -369,6 +371,10 @@ class ul_Compiler:
 else:
 self.flag_for_QuerySaveDialog = False
 
+# This is to solve the problem of re-using the same id again in 
diffrent Dialogs
+
+self.objects.clear()
+
 self.prev_command = DialogCommand
 
 def handle_button(self, ButtonUIObject):
@@ -785,9 +791,24 @@ class ul_Compiler:
 
 def handle_math_element_selector(self, math_element_selector):
 
+if( self.math_element_selector_initializer == False ):
+# This part to initialize the element selector in math application
+self.math_element_selector_initializer = True
+line = (
+double_tab
++ "element_selector"
++ ' = MainWindow.getChild("'
++ "element_selector"
++ '")\n'
+)
+self.variables.append(line)
+
+# 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(math_element_selector.element_no)
++ str(element_name)
 + ' = element_selector.getChild("'
 + str(math_element_selector.element_no)
 + '")\n'
@@ -795,7 +816,7 @@ class ul_Compiler:
 self.variables.append(line)
 
 self.write_line_without_parameters(
-str(math_element_selector.element_no), "SELECT", "tuple"
+str(element_name), "SELECT", "tuple"
 )
 
 self.prev_command = math_element_selector
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2020-05-10 Thread EL-SHREIF (via logerrit)
 uitest/ui_logger_dsl/uno_commands.tx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit ce0933c0d8cc0d51774d0168a8be4e9bb3153463
Author: EL-SHREIF 
AuthorDate: Sun May 10 12:17:03 2020 +0200
Commit: Ahmed ElShreif 
CommitDate: Mon May 11 00:11:20 2020 +0200

uitest: Fix small issue in UI Logger DSL grammar

Change-Id: Ia9ffcd1665dad3d3d2827d40bcec345186e53aef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93927
Tested-by: Jenkins
Reviewed-by: Ahmed ElShreif 

diff --git a/uitest/ui_logger_dsl/uno_commands.tx 
b/uitest/ui_logger_dsl/uno_commands.tx
index e17d479af240..15df9ef86f7f 100644
--- a/uitest/ui_logger_dsl/uno_commands.tx
+++ b/uitest/ui_logger_dsl/uno_commands.tx
@@ -12,6 +12,9 @@ parameter:
 ;
 
 data:
- ','? key=STRING ':' value= INT|ID
+ ','? key=STRING ':' value= value_type
 ;
 
+value_type:
+INT|ID
+;
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2019-12-14 Thread Andrea Gelmini (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 68342eef5d3e183626ee0cf4a3ffe6d776089be6
Author: Andrea Gelmini 
AuthorDate: Sat Dec 14 22:17:38 2019 +0100
Commit: Julien Nabet 
CommitDate: Sat Dec 14 22:40:23 2019 +0100

Fix typo

Change-Id: Ic2423f7b2e83ca957d42392c1fba2b7d636ac136
Reviewed-on: https://gerrit.libreoffice.org/85156
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 58697a0fe216..0f766d87a4dc 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -43,7 +43,7 @@ ListBoxUIObject:
'Select element with position ' POS=INT 'in' list_id=STRING ('from' 
parent_id=ID)?
 ;
 //=
-//hellper grammar for EditUIObject
+//helper grammar for EditUIObject
 action_on_UIObject:
 Type_action | SELECT | Clear
 ;
@@ -62,4 +62,4 @@ Clear:
 //helper functions for SpinUIObject
 increase_or_ecrease:
   'Increase' | 'Decrease'
-;
\ No newline at end of file
+;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2019-08-31 Thread Julien Nabet (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c5ea75a55db0be7d528c0c580bb994f1ae88afb3
Author: Julien Nabet 
AuthorDate: Sat Aug 31 17:20:09 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 31 17:20:52 2019 +0200

Let's revert this so no confusion.

This reverts commit 367719e77747bc142ac4b7ec5ee10d7c5e519c16.

Change-Id: I36e4aef93f04fe593692edaa804512020464aa95
Reviewed-on: https://gerrit.libreoffice.org/78354
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 0f766d87a4dc..58697a0fe216 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -43,7 +43,7 @@ ListBoxUIObject:
'Select element with position ' POS=INT 'in' list_id=STRING ('from' 
parent_id=ID)?
 ;
 //=
-//helper grammar for EditUIObject
+//hellper grammar for EditUIObject
 action_on_UIObject:
 Type_action | SELECT | Clear
 ;
@@ -62,4 +62,4 @@ Clear:
 //helper functions for SpinUIObject
 increase_or_ecrease:
   'Increase' | 'Decrease'
-;
+;
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2019-08-31 Thread Andrea Gelmini (via logerrit)
 uitest/ui_logger_dsl/UI_Object_commands.tx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 367719e77747bc142ac4b7ec5ee10d7c5e519c16
Author: Andrea Gelmini 
AuthorDate: Wed Aug 21 06:50:45 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 31 14:36:40 2019 +0200

Fix typos (Please do not commit)

This commit is updated just to help Ahmed.
He is going to fix this in the next implementation.

Change-Id: I1cdebb27b5ded57694e97da7d990adce716448c0
Reviewed-on: https://gerrit.libreoffice.org/77743
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 58697a0fe216..0f766d87a4dc 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -43,7 +43,7 @@ ListBoxUIObject:
'Select element with position ' POS=INT 'in' list_id=STRING ('from' 
parent_id=ID)?
 ;
 //=
-//hellper grammar for EditUIObject
+//helper grammar for EditUIObject
 action_on_UIObject:
 Type_action | SELECT | Clear
 ;
@@ -62,4 +62,4 @@ Clear:
 //helper functions for SpinUIObject
 increase_or_ecrease:
   'Increase' | 'Decrease'
-;
\ No newline at end of file
+;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: uitest/ui_logger_dsl vcl/source

2019-08-20 Thread Ahmed ElShreif (via logerrit)
 uitest/ui_logger_dsl/General_commands.tx  |4 ++--
 uitest/ui_logger_dsl/Special_commands.tx  |   26 +-
 uitest/ui_logger_dsl/UI_Object_commands.tx|4 ++--
 uitest/ui_logger_dsl/dsl_core.py  |   16 
 uitest/ui_logger_dsl/starter_commands.tx  |4 ++--
 uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx |4 ++--
 uitest/ui_logger_dsl/uno_commands.tx  |4 ++--
 vcl/source/uitest/logger.cxx  |4 ++--
 8 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit 01af2d7122e8de8cbf96d1a04eb88817276db410
Author: Ahmed ElShreif 
AuthorDate: Tue Aug 20 22:37:17 2019 -0500
Commit: Ahmed ElShreif 
CommitDate: Tue Aug 20 22:37:17 2019 -0500

uitest: Fix typos

Change-Id: I41023dd1fd06ca48849726d3372f74a4990c27a3

diff --git a/uitest/ui_logger_dsl/General_commands.tx 
b/uitest/ui_logger_dsl/General_commands.tx
index aa3645112569..5f5c404402f5 100644
--- a/uitest/ui_logger_dsl/General_commands.tx
+++ b/uitest/ui_logger_dsl/General_commands.tx
@@ -1,6 +1,6 @@
 /*
-This file for the log statments that is general for all application
-we can use it as general commands then relate it to its application 
+This file for the log statements that is general for all application
+we can use it as general commands then relate it to its application
 as we have in the starter command
 //
 also I make set zoom to be general as it will be better
diff --git a/uitest/ui_logger_dsl/Special_commands.tx 
b/uitest/ui_logger_dsl/Special_commands.tx
index a4bf1a697504..1667eace0ef3 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -1,7 +1,7 @@
 import type_options
 
 /*
-This file for the log statments that relates to each diffrent applications
+This file for the log statements that relates to each different 
applications
 Each Grammar Command here is related to his own application
 */
 
@@ -10,8 +10,8 @@ SpecialCommand:
 ;
 
 /*
-  This part for all the writer log statments:
-   
+  This part for all the writer log statements:
+
 1)  Type
 2)  Select
 3)  GOTO page
@@ -55,7 +55,7 @@ writer_Insert_BreakPage:
 
 //=//
 /*
-  This part for all the calc log statments:
+  This part for all the calc log statements:
 
 1)  select sheet
 2)  Select cell or range
@@ -87,7 +87,7 @@ calc_Select_cell:
   'Select from calc' select_op=select_options
 ;
 calc_AutoFill_filter:
-  'Lanuch AutoFilter from Col' col_num=INT 'and Row' row_num=INT
+  'Launch AutoFilter from Col' col_num=INT 'and Row' row_num=INT
 ;
 range_of_cells:
 '{' '"RANGE":' input_range=STRING '}'
@@ -132,9 +132,9 @@ select_options:
 
 //=//
 /*
-  This part for all the impress log statments:
-   
-1)  Type 
+  This part for all the impress log statements:
+
+1)  Type
 2)  Insert New Slide
 3)  Delete Slide
 4)  Duplicate Slide
@@ -163,9 +163,9 @@ impress_Rename_Slide:
 ;
 //=//
 /*
-  This part for all the math log statments:
-   
-1)  element selector 
+  This part for all the math log statements:
+
+1)  element selector
 2)  Type
 
   then we can add whatever we need in the future
@@ -182,8 +182,8 @@ math_Type_command:
 
 //=//
 /*
-  This part for all the draw log statments:
-   
+  This part for all the draw log statements:
+
 1) Type
 2) Insert New Page
 3) Delete Page
diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 9b25e09c6efc..58697a0fe216 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -37,13 +37,13 @@ EditUIObject:
action=action_on_UIObject ('from' parent_id=ID)?
 ;
 SpinFieldUIObject:
-   change=increase_or_ecrease Spin_id=STRING ('from' parent_id=ID)? 
+   change=increase_or_ecrease Spin_id=STRING ('from' parent_id=ID)?
 ;
 ListBoxUIObject:
'Select element with position ' POS=INT 'in' list_id=STRING ('from' 
parent_id=ID)?
 ;
 //=
-//hellper grammer for EditUIObject
+//hellper grammar for EditUIObject
 action_on_UIObject:
 Type_action | SELECT | Clear
 ;
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index d0e563f99fa6..074e4b871467 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -103,7 +103,7 @@ class ul_Compiler:
 "EditUIObject": self.handle_Edit_uiObject,
 "writer_Type_command": self.handle_writer_type,
 "writer_Select_command": self.handle_writer_select,
-

[Libreoffice-commits] core.git: uitest/ui_logger_dsl

2019-08-19 Thread Ahmed ElShreif (via logerrit)
 uitest/ui_logger_dsl/dsl_core.py |  880 +--
 1 file changed, 570 insertions(+), 310 deletions(-)

New commits:
commit 471b185b8b1ce3982271bbb77261fbb5e6860d17
Author: Ahmed ElShreif 
AuthorDate: Mon Aug 19 13:09:38 2019 -0500
Commit: Ahmed ElShreif 
CommitDate: Mon Aug 19 13:09:38 2019 -0500

uitest: Reformat the python script of the Compiler

Change-Id: I502aa9e998d084a82e738c0c0c68ad634cb5c76a

diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 210713b4478b..d0e563f99fa6 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -10,572 +10,832 @@ import os
 import sys
 import argparse
 import keyword
+
 try:
 from textx.metamodel import metamodel_from_file
 except ImportError:
 print("textx is a required package.")
-print("Please install the package for example with \"pip3 install --user 
textx\"")
+print('Please install the package for example with "pip3 install --user 
textx"')
 sys.exit(1)
 
-tab=""
-double_tab=""
+tab = ""
+double_tab = ""
+
 
 def parse_args():
 """
 This function parses the command-line arguments
 to get the input and output file details
 """
-parser = argparse.ArgumentParser(description = "Generate a UI test file 
from log")
-parser.add_argument("input_address", type = str, help = "The log file 
address")
-parser.add_argument("output_address", type = str, help = "The test file 
address")
+parser = argparse.ArgumentParser(description="Generate a UI test file from 
log")
+parser.add_argument("input_address", type=str, help="The log file address")
+parser.add_argument("output_address", type=str, help="The test file 
address")
 args = parser.parse_args()
 return args
 
+
 class ul_Compiler:
-prev_command=""
-variables=[]
+prev_command = ""
+variables = []
 objects = dict()
-current_app=""
-parent_hierarchy_count=0
-last_parent=[]
-flag_for_QuerySaveDialog=False
+current_app = ""
+parent_hierarchy_count = 0
+last_parent = []
+flag_for_QuerySaveDialog = False
 
-def __init__(self , input_address , output_address):
-self.ui_dsl_mm = metamodel_from_file('ui_logger_dsl_grammar.tx')
-self.output_stream=self.initiate_test_generation(output_address)
-self.input_address=input_address
+def __init__(self, input_address, output_address):
+self.ui_dsl_mm = metamodel_from_file("ui_logger_dsl_grammar.tx")
+self.output_stream = self.initiate_test_generation(output_address)
+self.input_address = input_address
 
-def get_log_file(self , input_address):
+def get_log_file(self, input_address):
 try:
 # load the program
 content = self.ui_dsl_mm.model_from_file(input_address)
 except IOError as err:
 print("IO error: {0}".format(err))
-print("Use " + os.path.basename(sys.argv[0]) + " -h to get usage 
instructions")
+print(
+"Use " + os.path.basename(sys.argv[0]) + " -h to get usage 
instructions"
+)
 sys.exit(1)
 
 return content
 
-def initiate_test_generation(self,output_address):
+def initiate_test_generation(self, output_address):
 self.last_parent.append("MainWindow")
 try:
-f = open(output_address,"w")
+f = open(output_address, "w")
 except IOError as err:
 print("IO error: {0}".format(err))
-print("Use " + os.path.basename(sys.argv[0]) + " -h to get usage 
instructions")
+print(
+"Use " + os.path.basename(sys.argv[0]) + " -h to get usage 
instructions"
+)
 sys.exit(1)
-line="# -*- 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" + \
-"import importlib\n\n" + \
-"class TestClass(UITestCase):\n" + \
-tab+"def test_function(self):\n"
+line = (
+"# -*- 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"
++ "import importlib\n\n"
++ "class TestClass(UITestCase):\n"
++ tab
++ "def test_function(self):\n"
+)
 
 self.variables.append(line)
 
 return f
 
 def compile(self):
-self.ui_dsl_mm.register_obj_processors({
-'UNOCommand': self.handle_uno,
-'StarterCommand': self.handle_start,
-'CloseDialog': self.handle_Dialog,
-'OpenModelessDialog': self.handle_Dialog,
-'OpenModalDialog':self.handle_Dialog,
-