diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/global/g_character.inc')
-rw-r--r-- | testautomation/graphics/optional/includes/global/g_character.inc | 191 |
1 files changed, 102 insertions, 89 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_character.inc b/testautomation/graphics/optional/includes/global/g_character.inc index a9d578665c5a..8d58263c74d4 100644 --- a/testautomation/graphics/optional/includes/global/g_character.inc +++ b/testautomation/graphics/optional/includes/global/g_character.inc @@ -42,44 +42,46 @@ testcase tFormatCharacter dim sTemp as string dim iTemp as integer - '/// open application ///' + printlog "open application " Call hNewDocument sleep 1 - '/// create a textframe with content ///' + printlog "create a textframe with content " hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30) - '/// type with keys [strg]+[home] [shift]+[end] to select the inserted text ///' + printlog "type with keys [strg]+[home] [shift]+[end] to select the inserted text " hTypeKeys "<MOD1 HOME><shift end>" sleep 1 - '/// Format->Character ///' + printlog "Format->Character " FormatCharacter - sleep 1 - '/// switch to tabpage 'Font' ///' - Kontext - Messagebox.SetPage TabFont - Kontext "TabFont" - sleep 1 - - '/// switch to tabpage 'Font Effects' ///' - Kontext - Messagebox.SetPage TabFontEffects - kontext "TabFontEffects" - sleep 1 - - '/// switch to tabpage 'Position' ///' - Kontext - Messagebox.SetPage TabFontPosition - Kontext "TabFontPosition" - sleep 1 - - '/// close dialog 'Character' with 'OK' ///' - TabFontPosition.OK - '/// close application ///' + sleep 1 + printlog "switch to tabpage 'Font' " + Kontext + Messagebox.SetPage TabFont + Kontext "TabFont" + sleep 1 + + printlog "switch to tabpage 'Font Effects' " + Kontext + Messagebox.SetPage TabFontEffects + kontext "TabFontEffects" + sleep 1 + + printlog "switch to tabpage 'Position' " + Kontext + Messagebox.SetPage TabFontPosition + Kontext "TabFontPosition" + sleep 1 + + printlog "close dialog 'Character' with 'OK' " + TabFontPosition.OK + printlog "close application " Call hCloseDocument endcase 'tFormatCharacter + '--------------------------------------------------------- + testcase tDialogCharacter Dim i as integer @@ -101,11 +103,13 @@ testcase tDialogCharacter ToolsOptions hToolsOptions ( "LanguageSettings", "Languages" ) - if Aktivieren.IsChecked then '/// Check in what state Asian support is ///' + printlog "Check in what state Asian support is " + if Aktivieren.IsChecked then Asiansupportsetting = TRUE else + printlog "Activate if not already activated " Asiansupportsetting = FALSE - Aktivieren.Check '/// Activate if not already activated ///' + Aktivieren.Check end if Kontext "ExtrasOptionenDlg" @@ -118,8 +122,8 @@ testcase tDialogCharacter FormatCharacter sleep 1 - Kontext '"Active" ' insert this, perhaps another - Active.SetPage TabFont ' tabpage is active at open + Kontext '"Active" + Active.SetPage TabFont Kontext "TabFont" CountOfThem = FontWest.GetItemCount for y = 1 to CountOfThem @@ -275,12 +279,14 @@ testcase tDialogCharacter next y Kontext - Active.SetPage TabFontPosition '/// Changes the active tab to "Position" + printlog "Changes the active tab to Position" + Active.SetPage TabFontPosition Kontext "TabFontPosition" printlog "TabFontPosition" SuperScript.Check Super.Check - RelativeFontSize.ToMin '/// Testing the "Relative Font Size"-Listbox + printlog "Testing the Relative Font Size-Listbox" + RelativeFontSize.ToMin ThisIsMyTextFromControl = RelativeFontSize.GetText ' printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl for y = 1 to 99 @@ -290,7 +296,8 @@ testcase tDialogCharacter next y Automatic.Check - ScaleWith.ToMin '/// Testing the "Scale With"-Listbox + printlog "Testing the Scale With-Listbox" + ScaleWith.ToMin ThisIsMyTextFromControl = ScaleWith.GetText printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl ' ScaleWith.TypeKeys "<TAB>" @@ -303,8 +310,10 @@ testcase tDialogCharacter Normal.Check Subscript.Check - RelativeFontSize.ToMin '/// Testing the "Reliative Font Size"-Listbox again but this time - ThisIsMyTextFromControl = RelativeFontSize.GetText '/// with "Subscript" and "Normal" Checked + printlog "Testing the Reliative Font Size-Listbox again but this time" + RelativeFontSize.ToMin + printlog "with Subscript and Normal Checked" + ThisIsMyTextFromControl = RelativeFontSize.GetText printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl for y = 1 to 99 RelativeFontSize.TypeKeys "<UP>" @@ -314,7 +323,8 @@ testcase tDialogCharacter Automatic.Check - ScaleWith.ToMin '/// Testing the "ScaleWith"-Listbox + printlog "Testing the ScaleWith-Listbox" + ScaleWith.ToMin ThisIsMyTextFromControl = ScaleWith.GetText printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl for y = 1 to 100 @@ -323,13 +333,15 @@ testcase tDialogCharacter ' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl next y - ThisIsMyTextFromControl = Spacing.GetSelText '/// Testing the "Spacing"-ListBox + printlog "Testing the Spacing-ListBox" + ThisIsMyTextFromControl = Spacing.GetSelText printlog "The Spacing is first: " & ThisIsMyTextFromControl for y = 2 to 3 Spacing.Select y ThisIsMyTextFromControl = Spacing.GetSelText printlog "The Spacing is: " & ThisIsMyTextFromControl - ThisIsMyTextFromControl = SpacingBy.GetText '/// Testing the "Spacing By"-Scrollbox + printlog "Testing the Spacing By-Scrollbox" + ThisIsMyTextFromControl = SpacingBy.GetText ' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl SpacingBy.ToMin for z = 1 to 4 @@ -347,7 +359,8 @@ testcase tDialogCharacter kontext ToolsOptions hToolsOptions ( "LanguageSettings", "Languages" ) - Aktivieren.UnCheck '/// Deactivate if not already deactivated ///' + printlog "Deactivate if not already deactivated " + Aktivieren.UnCheck Printlog "Reseted the Asiansupport-value to it's original state" Kontext "ExtrasOptionenDlg" @@ -385,41 +398,41 @@ testcase tSetFormatCharacter end if sFile = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString) - '/// create document, if it doesn't exist, else skip this case :-) ///' + printlog "create document, if it doesn't exist, else skip this case :-) " if (dir(sFile)="") then - '/// open application ///' + printlog "open application " Call hNewDocument - '/// activate all languages in options ///' - '///+ Tools->Options ///' + printlog "activate all languages in options " + '///+ Tools->Options " ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' + '///+ select tabpage 'Languages' from set 'Language Settings' " hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ save state and check checkbox 'Asian languages support' ///' - '/// if the language is Asian, skip this part ///' + '///+ save state and check checkbox 'Asian languages support' " + printlog "if the language is Asian, skip this part " printlog "iSprache = " + iSprache if bAsianLan = FALSE then bAsian = Aktivieren.isEnabled Aktivieren.check endif - '///+ save state and check checkbox 'Complex text layout (CTL) support' ///' + '///+ save state and check checkbox 'Complex text layout (CTL) support' " bComplex = ComplexScriptEnabled.isEnabled ComplexScriptEnabled.check - '///+ close dialog 'Options' with OK ///' + '///+ close dialog 'Options' with OK " Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// get count of languages ///' - '///+ Format->Character ///' + printlog "get count of languages " + '///+ Format->Character " FormatCharacter sleep 1 Kontext - '///+ switch to tabpage 'Font' ///' + '///+ switch to tabpage 'Font' " Messagebox.SetPage TabFont kontext "TabFont" sleep 1 - '///+ get count of languages for Western/Asian/CTL fonts ///' + '///+ get count of languages for Western/Asian/CTL fonts " iWest = LanguageWest.getItemCount iAsian = LanguageEast.getItemCount iComplex = LanguageCTL.getItemCount @@ -456,39 +469,39 @@ testcase tSetFormatCharacter Printlog "CTL font languages count : " + iComplex endif endif - '///+ close dialog 'Character' with OK ///' + printlog "close dialog 'Character' with OK " TabFont.Ok WL_SD_TextEinfuegenDraw gMouseMove ( 1, 1, 100, 100 ) - '///+ print the language counts into the first line of the document ///' + printlog "print the language counts into the first line of the document " hTypeKeys(" "+iWest+" "+iAsian+" "+iComplex+"<return>") - '/// set all languages to '[None]' ///' - '///+ Format->Character ///' + printlog "set all languages to '[None]' " + printlog "Format->Character " FormatCharacter kontext "TabFont" - '///+ select '[None]' (should be the first entry in every listbox) ///' + printlog "select '[None]' (should be the first entry in every listbox) " LanguageWest.select 1 LanguageEast.select 1 LanguageCTL.select 1 - '///+ close dialog 'Character' with OK ///' + printlog "close dialog 'Character' with OK " TabFont.Ok - '/// print one line with language formated text for every language ///' + printlog "print one line with language formated text for every language " for i = 1 to iWest - '///+ Format->Character ///' + printlog "Format->Character " FormatCharacter kontext "TabFont" - '///+ select the next language ///' + printlog "select the next language " LanguageWest.select i sTemp = LanguageWest.getItemText (i) ListAppend(sLanguage(), sTemp) - '///+ close dialog 'Character' with OK ///' + printlog "close dialog 'Character' with OK " TabFont.Ok - '///+ type [return][number of language in list][Tab][Language name][Tab] ///' + printlog "type [return][number of language in list][Tab][Language name][Tab] " hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>") next i @@ -528,7 +541,7 @@ testcase tSetFormatCharacter hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>") next i - '/// save the created document & the languages list if they don't exists ///' + printlog "save the created document & the languages list if they don't exists " hFileSaveAs (sFile) qaErrorLog "Created file. Please check it and then commit it! " + sTemp sTemp = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + ".txt") @@ -536,29 +549,29 @@ testcase tSetFormatCharacter ListWrite(sLanguage(), sTemp,"utf8") endif - '/// restore the options ///' - '///+ Tools->Options ///' + printlog "restore the options " + printlog "Tools->Options " ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' + printlog "select tabpage 'Languages' from set 'Language Settings' " hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ restore state of checkbox 'Asian languages support' ///' - '/// if the language is Asian, skip this part ///' + printlog "restore state of checkbox 'Asian languages support' " + printlog "if the language is Asian, skip this part " if bAsianLan = FALSE then if (bAsian <> TRUE) then Aktivieren.UNcheck endif endif - '///+ restore state of checkbox 'Complex text layout (CTL) support' ///' + printlog "restore state of checkbox 'Complex text layout (CTL) support' " if (bComplex <> TRUE) then ComplexScriptEnabled.UNcheck endif - '///+ close dialog 'Options' with OK ///' + printlog "close dialog 'Options' with OK " Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK - '/// close application ///' + printlog "close application " Call hCloseDocument endif @@ -586,29 +599,29 @@ testcase tGetFormatCharacter ExtensionString = "odg" end if - '/// open the english document with all languages ///' + printlog "open the english document with all languages " hDateiOeffnen (convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString) ListRead(sLanguageR(), convertPath(gTesttoolpath + "graphics\required\input\spellb_1.txt"),"utf8") - '/// activate all languages in options ///' - '///+ Tools->Options ///' + printlog "activate all languages in options " + printlog " Tools->Options " ToolsOptions - '///+ select tabpage 'Languages' from set 'Language Settings' ///' + printlog "select tabpage 'Languages' from set 'Language Settings' " hToolsOptions("LANGUAGESETTINGS","Languages") kontext "TabSprachen" - '///+ save state and check checkbox 'Asian languages support' ///' + printlog "save state and check checkbox 'Asian languages support' " bAsian = Aktivieren.isEnabled Aktivieren.check - '///+ save state and check checkbox 'Complex text layout (CTL) support' ///' + printlog "save state and check checkbox 'Complex text layout (CTL) support' " bComplex = ComplexScriptEnabled.isEnabled ComplexScriptEnabled.check - '///+ close dialog 'Options' with OK ///' + printlog "close dialog 'Options' with OK " Kontext "ExtrasOptionenDlg" ExtrasOptionenDlg.OK sleep (1) - '/// get count of languages ///' + printlog "get count of languages " hTypeKeys("<tab><f2>") - '///+ first how many are in the reference document (printed in the first line)///' + printlog "first how many are in the reference document (printed in the first line)" hTypeKeys("<mod1 home><shift end>") sleep (1) editcopy @@ -619,15 +632,15 @@ testcase tGetFormatCharacter iAsian(1) = mid(sTemp, iTemp+1, iTemp-i) iComplex(1) = right(sTemp, Len(sTemp) - i) sleep (1) - '///+ Format->Character ///' + printlog "Format->Character " FormatCharacter sleep 1 Kontext - '///+ switch to tabpage 'Font' ///' + printlog "switch to tabpage 'Font' " Messagebox.SetPage TabFont kontext "TabFont" sleep 1 - '///+ get count of languages for Western/Asian/CTL fonts ///' + printlog "get count of languages for Western/Asian/CTL fonts " iWest(2) = LanguageWest.getItemCount iAsian(2) = LanguageEast.getItemCount iComplex(2) = LanguageCTL.getItemCount @@ -646,10 +659,10 @@ testcase tGetFormatCharacter else Printlog "CTL font languages count : " + iComplex(2) endif - '///+ close dialog 'Character' with OK ///' + printlog "close dialog 'Character' with OK " TabFont.Ok - '/// write the language for every line in the current language ///' + printlog "write the language for every line in the current language " hTypeKeys("<mod1 home><down><home>") for i = 1 to iWest(2) FormatCharacter @@ -659,7 +672,7 @@ testcase tGetFormatCharacter sTemp = LanguageWest.getSelText ListAppend(sLanguage(), sTemp) TabFont.Ok - '///+ type [end][number of language in list][Tab][Language name][down][home] ///' + printlog "type [end][number of language in list][Tab][Language name][down][home] " hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>") next i @@ -685,7 +698,7 @@ testcase tGetFormatCharacter hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>") next i - '/// save the created document & the languages list ///' + printlog "save the created document & the languages list " sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache) hFileSaveAsKill (sTemp) sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache + ".txt") @@ -709,6 +722,6 @@ testcase tGetFormatCharacter endif next i - '/// close application ///' + printlog "close application " Call hCloseDocument endcase 'tGetFormatCharacter |