summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed ElShreif <aelshreif7@gmail.com>2019-07-18 12:25:05 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2019-08-19 22:56:38 +0800
commitbf94b044a11740323853933f0aedf55ceb143ee1 (patch)
tree09917d3211c446feeb0d76de0e7975c9ec197a96
parent494bd583f5ac56dc60130f6fcde780ec27bc921e (diff)
uitest: solve some bugs in the ui logger
Change-Id: I39836423fad8cb361a8f007f648108618906be8a
-rw-r--r--uitest/ui_logger_dsl/dsl_core.py4
-rw-r--r--uitest/ui_logger_dsl/example.ul51
-rw-r--r--vcl/source/uitest/logger.cxx4
-rw-r--r--vcl/source/uitest/uiobject.cxx2
4 files changed, 35 insertions, 26 deletions
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 bd2b2185ef01..2b3d11691dc5 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 d333dd01b256..0c331aa96bba 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -1091,7 +1091,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();
}