summaryrefslogtreecommitdiff
path: root/testautomation
diff options
context:
space:
mode:
authorHelge Delfs [hde] <hde@openoffice.org>2010-10-20 13:28:54 +0200
committerHelge Delfs [hde] <hde@openoffice.org>2010-10-20 13:28:54 +0200
commit5d71179653bf0e248fd129a3a4edbde6099fe9f9 (patch)
tree7c5d1140d4ebb2488c39650005b1747dd76aaacc /testautomation
parent23f54801224614ba17605157f9556a34cc99229e (diff)
automationdev300m87#i115106#optimized output if slot is not found
Diffstat (limited to 'testautomation')
-rw-r--r--testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc155
1 files changed, 81 insertions, 74 deletions
diff --git a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc b/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
index 87c1d9f47082..df216304ea2e 100644
--- a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
+++ b/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
@@ -343,10 +343,10 @@ testcase tFormatStyles1
'/// Write 'Style Bold' - execute Context menu 'Style Bold'
Call wTypeKeys "Style Bold"
Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Bold", true, 1, false) 'Find 'Bold' and call the slot.
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Bold", true, 1, false) = true then 'Find 'Bold' and call the slot.
'/// Check if changes to style have been made ///
Kontext "TextObjectbar"
if Fett.Getstate(2) = 0 then
@@ -354,114 +354,121 @@ testcase tFormatStyles1
end if
Call wTypeKeys "<End><Mod1 Shift X>"
- wait 500
+ wait 500
Call wTypeKeys "<Return>"
+ endif
printlog "- Style 'Italic' "
'/// Write 'Style Italic' - execute Context menu 'Style Italic'
Call wTypeKeys "Style Italic"
Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Italic", true, 2, false) 'Find 'Italic' and call the slot.
- ' /// Check if changes to style have been made ///
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Italic", true, 2, false) = true then 'Find 'Italic' and call the slot.
+ ' /// Check if changes to style have been made ///
Kontext "TextObjectbar"
if Kursiv.Getstate(2) = 0 then
Warnlog "#58722#Style 'Italic' with context menu has not been set!"
end if
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Return>"
+ end if
printlog "- Style 'Underline' "
'/// Write 'Style Underline' - execute Context menu 'Style Underline'
Call wTypeKeys "Style Underline"
Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Underline", true, 4, false) 'Find 'Underline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Underline.GetSelIndex <> 2 then Warnlog "Style 'Underline' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
-
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Underline", true, 4, false) = true then 'Find 'Underline' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if Underline.GetSelIndex <> 2 then Warnlog "Style 'Underline' with context menu has not been set!"
+ TabFontEffects.Cancel
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Return>"
+ end if
+
printlog "- Style 'Overline' "
'/// Write 'Style Overline' - execute Context menu 'Style Strikethrough'
Call wTypeKeys "Style Overline"
Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Overline", true, 3, false) 'Find 'Overline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Overline.GetSelIndex <> 2 then Warnlog "Style 'Overline' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Overline", true, 3, false) = true then 'Find 'Overline' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if Overline.GetSelIndex <> 2 then Warnlog "Style 'Overline' with context menu has not been set!"
+ TabFontEffects.Cancel
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Return>"
+ end if
printlog "- Style 'StrikeThrough' "
'/// Write 'Style Strikethrough' - execute Context menu 'Style Strikethrough'
Call wTypeKeys "Style Strikethrough"
Call wTypeKeys "<Shift Home>"
Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Strikeout", true, 5, false) 'Find 'Strikethrough' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Style 'StrikeThrough' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Right><Return>"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Strikeout", true, 5, false) = true then 'Find 'Strikethrough' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if StrikeThrough.GetSelIndex <> 2 then Warnlog "Style 'StrikeThrough' with context menu has not been set!"
+ TabFontEffects.Cancel
+ Call wTypeKeys "<End>"
+ Call wTypeKeys "<Right><Return>"
+ end if
printlog "- Style 'Shadow' "
'/// Write 'Style Shadow' - execute Context menu 'Style Shadow'
Call wTypeKeys "Style Shadow"
Call wTypeKeys "<Shift Home>"
Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:Shadowed", true, 6, false) 'Find 'Shadowed' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Shadow.IsChecked = False then Warnlog "Style 'Shadow' with context menu has not been set!"
- TabFontEffects.Cancel
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Return>"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:Shadowed", true, 6, false) = true then 'Find 'Shadowed' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if Shadow.IsChecked = False then Warnlog "Style 'Shadow' with context menu has not been set!"
+ TabFontEffects.Cancel
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Return>"
+ end if
printlog "- Style 'Outline' "
'/// Write 'Style Outline' - execute Context menu 'Style Outline'
Call wTypeKeys "Style Outline"
Call wTypeKeys "<Shift Home>"
Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
- Call hMenuFindSelect (".uno:OutlineFont", true, 7, false) 'Find 'Outline' and call the slot.
- ' /// Check if changes to style have been made ///
- FormatCharacter
- Kontext
- Active.Setpage TabFontEffects
- Kontext "TabFontEffects"
- if Outline.IsChecked = false then Warnlog "Style 'Outline' with context menu has not been set!"
- TabFontEffects.Cancel
-
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ if hMenuFindSelect (".uno:OutlineFont", true, 7, false) = true then 'Find 'Outline' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if Outline.IsChecked = false then Warnlog "Style 'Outline' with context menu has not been set!"
+ TabFontEffects.Cancel
+ end if
+
printlog "Close Document."
Call hCloseDocument
endcase