[Libreoffice-commits] core.git: Branch 'private/EL-SHREIF/ui_logger' - uitest/ui_logger_dsl vcl/source
Ahmed ElShreif (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 18 17:27:06 UTC 2019
uitest/ui_logger_dsl/dsl_core.py | 4 ++-
uitest/ui_logger_dsl/example.ul | 51 ++++++++++++++++++++++-----------------
vcl/source/uitest/logger.cxx | 4 +--
vcl/source/uitest/uiobject.cxx | 2 -
4 files changed, 35 insertions(+), 26 deletions(-)
New commits:
commit c7633b8427130dc4649aef0e80e24aa1b52dacef
Author: Ahmed ElShreif <aelshreif7 at gmail.com>
AuthorDate: Thu Jul 18 12:25:05 2019 -0500
Commit: Ahmed ElShreif <aelshreif7 at gmail.com>
CommitDate: Thu Jul 18 12:25:05 2019 -0500
Solving some bugs in the ui logger
Change-Id: I39836423fad8cb361a8f007f648108618906be8a
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index a43399c190a4..0d5593081693 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -171,6 +171,7 @@ class ul_Compiler:
self.prev_command.uno_command_name+"\")\n"
self.variables.append(old_line)
line = "\t\t" + DialogCommand.dialog_name + " = self.xUITest.getTopFocusWindow()\n"
+ self.variables.append(line)
elif (DialogCommand.__class__.__name__ == "OpenModelessDialog"):
old_line = self.variables.pop()
@@ -184,14 +185,15 @@ class ul_Compiler:
self.prev_command.uno_command_name+"\")\n"
self.variables.append(old_line)
line = "\t\t" + DialogCommand.dialog_name + " = self.xUITest.getTopFocusWindow()\n"
+ self.variables.append(line)
elif (DialogCommand.__class__.__name__ == "CloseDialog"):
if (self.prev_command.__class__.__name__ == "ButtonUIObject"):
old_line = self.variables.pop()
line="\t\tself.ui_test.close_dialog_through_button("+\
self.prev_command.ui_button+")\n"
+ self.variables.append(line)
- self.variables.append(line)
self.prev_command=DialogCommand
def handle_button(self, ButtonUIObject):
diff --git a/uitest/ui_logger_dsl/example.ul b/uitest/ui_logger_dsl/example.ul
index 93bc14c59c5a..dc78ac14dcd6 100644
--- a/uitest/ui_logger_dsl/example.ul
+++ b/uitest/ui_logger_dsl/example.ul
@@ -1,22 +1,29 @@
-Start writer
-Send UNO Command (".uno:UpdateInputFields")
-Send UNO Command (".uno:FontDialog")
-Open CharacterPropertiesDialog
-Choose Tab number 0 from CharacterPropertiesDialog
-Choose Tab number 2 from CharacterPropertiesDialog
-Select "90deg" Radio Button from CharacterPropertiesDialog
-Toggle "pairkerning" CheckBox from CharacterPropertiesDialog
-Select in "weststylelb-cjk" ComboBox item number 2 from CharacterPropertiesDialog
-Increase "scalewidthsb" from CharacterPropertiesDialog
-Decrease "scalewidthsb" from CharacterPropertiesDialog
-Type on "linewidthmf" {"TEXT": "1"} from CharacterPropertiesDialog
-Select element with position 2 in "effectslb" from CharacterPropertiesDialog
-Click on "ok" from CharacterPropertiesDialog
-Close Dialog
-Type on writer {"TEXT": "s"}
-Select from Pos 5 to Pos 7
-Set Zoom to 100
-GOTO page number 1
-Open QuerySaveDialog
-Click on "ok" from QuerySaveDialog
-Close Dialog
+Start calc
+Switch to sheet number 0
+Select from calc {"CELL": "A1"}
+Select from calc {"CELL": "B5"}
+Select from calc {"CELL": "C6"}
+Switch to sheet number 1
+Select from calc {"CELL": "A1"}
+Switch to sheet number 0
+Select from calc {"CELL": "C6"}
+Switch to sheet number 1
+Select from calc {"CELL": "A1"}
+Switch to sheet number 2
+Select from calc {"CELL": "A1"}
+Select from calc {"CELL": "C5"}
+Type on current cell {"TEXT": "a"}
+Type on current cell {"TEXT": "a"}
+Select from calc {"CELL": "C7"}
+Type on current cell {"TEXT": "a"}
+Type on current cell {"TEXT": "v"}
+Select from calc {"CELL": "C5"}
+Send UNO Command (".uno:ZoomSlider")
+Send UNO Command (".uno:ZoomSlider") {}
+Send UNO Command (".uno:DataFilterAutoFilter")
+Lanuch AutoFilter from Col 0 and Row 2
+Click on 'ok' from check_list_menu
+Select from calc {"RANGE": "C1:C7"}
+Open Modal QuerySaveDialog
+Click on 'discard' from QuerySaveDialog
+Close Dialog
\ No newline at end of file
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 4b3f69245ae6..0dac10050023 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -292,7 +292,7 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
OUString aLogLine ;
//first check on general commands
if(rDescription.aAction=="SET"){
- aLogLine = "Set Zoom to be " + GetValueInMapWithIndex(rDescription.aParameters,0);
+ aLogLine = "Set Zoom to " + GetValueInMapWithIndex(rDescription.aParameters,0);
}
else if(rDescription.aAction=="SIDEBAR"){
aLogLine = "From SIDEBAR Choose " + aParameterString;
@@ -308,7 +308,7 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
else if(rDescription.aAction=="SELECT"){
OUString to = GetValueInMapWithIndex(rDescription.aParameters,0);
OUString from = GetValueInMapWithIndex(rDescription.aParameters,1);
- aLogLine = "Select from Pos " + from + " to " + to ;
+ aLogLine = "Select from Pos " + from + " to Pos" + to ;
}
}
else if(rDescription.aID=="grid_window"){
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 159a3066aa68..7a725859c2d5 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -1086,7 +1086,7 @@ OUString ComboBoxUIObject::get_action(VclEventId nEvent) const
if (nEvent == VclEventId::ComboboxSelect)
{
sal_Int32 nPos = mxComboBox->GetSelectedEntryPos();
- return "select in '" + mxComboBox->get_id() +
+ return "Select in '" + mxComboBox->get_id() +
"' ComboBox item number " + OUString::number(nPos) +
" from " + get_top_parent(mxComboBox)->get_id();
}
More information about the Libreoffice-commits
mailing list