Commits

Wolfram Garten [wg]  committed e520293

i115273,[Automation]: shift old documentation to new style using printlogs

  • Participants
  • Parent commits 94c2c28

Comments (0)

Files changed (16)

File testautomation/graphics/optional/includes/global/g_arrangealign.inc

     '/// This function creates the document, that will be used as reference and working object inthe following cases :-) ///'
     '///'Dim Datei ' somewhere global :-) defined in calling sub! :sub im_107c_ ///
     call hNewDocument
-    DocumentImpress.UseMenu
+    if gApplication = "DRAW" then
+        kontext "DocumentDraw"
+        DocumentDraw.UseMenu
+    else
+        kontext "DocumentImpress"
+        DocumentImpress.UseMenu
+    end if
+    
     hMenuSelectNr(4)
     hMenuSelectNr(13)
     call sSelectEmptyLayout								'/// new document  ///'

File testautomation/graphics/optional/includes/global/g_character.inc

     next y
 
     Kontext
-    printlog "Changes the active tab to "Position"
+    printlog "Changes the active tab to Position"
     Active.SetPage TabFontPosition        
     Kontext "TabFontPosition"
     printlog "TabFontPosition"
     SuperScript.Check
     Super.Check
-    printlog "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
     next y
 
     Automatic.Check
-    printlog "Testing the "Scale With"-Listbox
+    printlog "Testing the Scale With-Listbox"
     ScaleWith.ToMin          
     ThisIsMyTextFromControl = ScaleWith.GetText
     printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl
 
     printlog "Testing the Reliative Font Size-Listbox again but this time"
     RelativeFontSize.ToMin
-    printlog "with Subscript and Normal Checked
+    printlog "with Subscript and Normal Checked"
     ThisIsMyTextFromControl = RelativeFontSize.GetText      
     printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
     for y = 1 to 99
 
     Automatic.Check
 
-    printlog "Testing the "ScaleWith"-Listbox
+    printlog "Testing the ScaleWith-Listbox"
     ScaleWith.ToMin          
     ThisIsMyTextFromControl = ScaleWith.GetText
     printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
 '        printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
     next y
 
-    printlog "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
-        printlog "Testing the "Spacing By"-Scrollbox
+        printlog "Testing the Spacing By-Scrollbox"
         ThisIsMyTextFromControl = SpacingBy.GetText      
 '        printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl
         SpacingBy.ToMin

File testautomation/graphics/optional/includes/global/g_clipboard.inc

     Kontext "TabPositionAndSize"
     printlog "defining variable for original position of object"
     Ueber_Text_1=PositionX.GetText
+    printlog "Position X is: " & Ueber_Text_1
     printlog "Canceling dialog."
     TabPositionAndSize.Cancel
     sleep 2
     Kontext
     Messagebox.SetPage TabPositionAndSize
     Kontext "TabPositionAndSize"
-    if PositionX=0 Then Warnlog "Command was not completely executed, and it could not be undone."
+    printlog "Position X is: " & PositionX.GetText
+    if (PositionX.GetText)=0 Then Warnlog "Command was not completely executed, and it could not be undone."
     TabPositionAndSize.Cancel
     sleep 2
     gMouseClick 60,60
 
     Printlog " insert every possibility"
     for i = 1 to x
-    Printlog " - processing number: "+i
-    EditPasteSpecial
-    sleep 1
-    Kontext "InhaltEinfuegen"
-    Auswahl.Select i
-    sleep 1
-    InhaltEinfuegen.OK
-    sleep 1
+        Printlog " - processing number: "+i
+        EditPasteSpecial
+        sleep 1
+        Kontext "InhaltEinfuegen"
+        Auswahl.Select i
+        sleep 1
+        InhaltEinfuegen.OK
+        sleep 1
     next i
     printlog "close document"
     Call hCloseDocument

File testautomation/graphics/optional/includes/global/g_crossfading.inc

     EditCrossFading                                     
     Kontext "Ueberblenden"
     if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung /    was NOT checked again."    
-    printlog "Check "same orientation""   -????
+    printlog "Check same orientation"
     GleicheOrientierung.Check
     printlog "Close CrossFading-window with OK"
     Ueberblenden.OK									  

File testautomation/graphics/optional/includes/global/g_demoguide.inc

     Sleep 1
     TransitionSound.Select 4
 
-    printlog "Close the document
     Printlog "Close the document"
     Call hCloseDocument
     
      Printlog "    Verify that the slide was moved correctly"
      Kontext "Slides"
      sleep (5)
-     SlidesControl.TypeKeys "<PAGEUP>"
+   
      SlidesControl.TypeKeys "<SHIFT F10>"
      if hMenuFindSelect(27268, true, 3) = false then
         Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."

File testautomation/graphics/optional/includes/global/g_edit.inc

         Kontext "Duplizieren"
         printlog " Number of copies = 30"
         AnzahlAnKopien.SetText "30"
-
+        printlog " Setting values for axis and angles"
         Select Case Zaehler
-        printlog " Setting values for axis and angles"
             Case 1:	XAchse.SetText "0,0"
             YAchse.SetText "0,45"
             Hoehe.SetText  "-0,1"
     if Schrieb = "" then
         warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
     else
-
+        printlog " new document"
         Call hNewDocument
         call sSelectEmptyLayout
-        sleep 1               printlog " new document"
-        InsertObjectOLEObject             printlog " insert writer ole object"
+        sleep 1
+        printlog " insert writer ole object"
+        InsertObjectOLEObject             
         Kontext "OLEObjektEinfuegen"
         sleep 3
         if ObjektTyp.GetItemCount = 0 Then

File testautomation/graphics/optional/includes/global/g_find_replace.inc

         case "IMPRESS"   : sExt = ".odp"
     end select
 
-    printlog "First we need some errornes words to replace. (sExpression)
+    printlog "First we need some errornes words to replace. (sExpression)"
     printlog "sExpression(1) has to be 3 times in the document"
     select case iSprache
          case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz"

File testautomation/graphics/optional/includes/global/g_imagemap.inc

     Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
     Alternativetext.SetText "Alternative, the only way to fly..."
     Description.SetText "Just a Foney-text... or whatever it's called."
-    ImageMapHyperlink.Ok        printlog "Close the Properties-Dialogue with Ok"
+    printlog "Close the Properties-Dialogue with Ok"
+    ImageMapHyperlink.Ok
     kontext "ImageMapEditor"
     Zuweisen.Click
     sleep (1)

File testautomation/graphics/optional/includes/global/g_load_save.inc

     Sleep 10
     printlog "load document 'test1'"
     hFileOpen (Dokument$ + "." + ExtensionString)
-    printlog "check if the document is writable
+    printlog "check if the document is writable"
     if fIsDocumentWritable = false then
-        printlog "make the document writable and check if it's succesfull
+        printlog "make the document writable and check if it's succesfull"
         if fMakeDocumentWritable = false then
             warnlog "The document can't be make writeable. Test stopped."
             goto endsub
     sleep 1
     Kontext "GrafikEinfuegenDlg"
     sleep 2
-    printlog " Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))"
     Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
     Oeffnen.Click
     Sleep 2

File testautomation/graphics/optional/includes/global/g_mediaplayer.inc

         endif
         sleep 2
         printlog "close document"
-        Call  hCloseDocument	printlog "close document"
+        Call  hCloseDocument	
     else
         qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian."
     endif

File testautomation/graphics/optional/includes/global/g_shaddow.inc

       ImageWidth = Width.GetText
       ImageHeight = Height.GetText
       printlog "Got values from position and size"
-   printlog "Check the "Protect Size"-button. And close dialogue. "
+   printlog "Check the Protect Size-button. And close dialogue. "
       ProtectSize.Check
       TabPositionAndSize.Ok
 
     printlog " Select Contextmenu entry Area "
     sleep(2)
    kontext "TabArea"
-   printlog "Switch to Shaddow-tabpage, do some changes, save them, close dialogue
+   printlog "Switch to Shaddow-tabpage, do some changes, save them, close dialogue"
    Kontext
    active.SetPage TabSchatten
    kontext "TabSchatten"
 
    printlog "Save the file. Then close the office and reload the file "
    sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
-   printlog "File-Save As with filter as: "user\temp\shaddow-test" "
+   printlog "File-Save As with filter as: user\temp\shaddow-test "
    try
       FileSaveAs
          Kontext "SpeichernDlg"

File testautomation/graphics/optional/includes/global/g_spellcheck.inc

     end if
     sleep 2
 
-    PrintLog "- Spellcheck with correct text"
-    select case iSprache
-    case 01   : hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
-    case 33   : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.<Return>",10,10,70,20)
-    case 34   : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20)
-    case 36   : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20)
-    case 39   : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.<Return>",10,10,70,20)
-    case 46   : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.<Return>",10,10,50,20)
-    case 49   : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.<Return>",10,10,50,20)
-    case 50   : hTextrahmenErstellen ("To je besedilo brez napake.<Return>",10,10,50,20)
-    case 55   : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?<Return>",10,10,50,20)
-    case else :
-        if bAsianLan then
-            printlog "For the language  " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed"
-            ' there was smth wrong, try to find out :
-            kontext
-            if active.exists then
-                printlog "ERROR: active: '"+active.gettext+"'"
-                active.ok
-            end if
-            hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
-        else
-            Warnlog "For the language  " + iSprache +" nothing is prepared yet: insert text here"
-            hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
-        end if
-    end select
-    ToolsSpellcheck
-    WaitSlot (2000)
-    Kontext "Active"
-    if active.exists(5) then
-        printlog "Message: spellchecking has finished?: '" + active.gettext + "'"
-        Active.OK
-    else
-        errorLog "Spellcheck started :"
-        Kontext "Spellcheck"
-        if Spellcheck.exists then
-            errorlog " - spellcheck came up and will be closed now"
-            Spellcheck.Close
-        else
-            printlog "spellcheck didn't come up"
-        end if
-    end if
-    WaitSlot (2000)
+    printlog "Close dialog 'Edit Custom Dictionary'."
+    BenutzerwoerterbuchBearbeiten.Close
+    Kontext "ExtrasOptionenDlg"
+    printlog "Close the Option dialog."
+    ExtrasOptionenDlg.OK
+
+    printlog "Close document"
     Call hCloseDocument
+
+    ' remove the word again from the dictionary
+    delete_word_from_dictionary(sWrongWord,"IgnoreAllList")
+
+    kill (convertPath(gOfficePath+"user/work/"+"recht_"+iSprache+sExt))
 endcase 'tiToolsSpellcheckCorrect
 
 '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

File testautomation/graphics/optional/includes/global/g_tools.inc

 '   Kontext "DocumentImpress"
    printlog "   - Hyphenation with text, but without any possibility to break words"
    select case iSprache
-        printlog "Create text without a pssibility to split words"
        case 01 : hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40)	
        case 03 : hTextrahmenErstellen ("Compare a tradu" + Chr(231) + Chr(227) + "o com o original",10,10,40,40)
        case 07 : qaerrorlog "- No Hypenation for Russian available"
    hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"		
    sleep 3
    EditCopy
-printlog GetClipboardText
-=======
-    sleep 1
-    ' WA for draw, or smth else: get text part before hyphenation:
-    if iSprache = "1" OR bAsianLan = TRUE then
-        hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT RIGHT>"      '/// Select part of text and compare it with original text at this place ///'
-    else
-        hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
-    endif
-    EditCopy
-    sDraw = GetClipboardText()
-    EditSelectAll						'/// Select whole text ///'
-    ToolsLanguageHyphenationDraw					'/// Run Hyphenation ///'
-    gMouseClick 50,50
-    hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"		'/// Select part of text and compare it with original text at this place ///'
-    sleep 3
-    EditCopy
+
     printlog GetClipboardText
->>>>>>> other
     select case GetClipboardText
     case DasWort  : printlog "  - Hyphenation worked"
     case DasWort2 : printlog "  - Hyphenation worked"
 
     printlog "to get the count of all macros, the list needs to get elapsed-all"
     for j = 1 to 2
-        Zaehler=MakroAus.GetItemCoun4t
+        Zaehler=MakroAus.GetItemCount
         MakroAus.typeKeys "<end>"
         for i = 1 to Zaehler
             MakroAus.typeKeys "<+><up>"

File testautomation/graphics/optional/includes/impress/i_slidecopy.inc

     Call hCloseDocument
     printlog "Open a new presentation"
     Call  hNewDocument
-    printlog "Paste the slide from the clipboard!
+    printlog "Paste the slide from the clipboard!"
     kontext "Slides"
     hUseAsyncSlot( "EditPaste" )
     printlog "Delete the first slide"
     endif
     sleep 1
 
-    printlog "Choose "After" as specification for where"
+    printlog "Choose After as specification for where"
     Kontext "InsertPaste"
     if InsertPaste.Exists(3) then
         After.Check

File testautomation/graphics/optional/includes/impress/i_view.inc

    fGetPresentationStyle ("9")
 
    Kontext "DocumentImpressOutlineView"
-   printlog "Edit - "Select All" to go select the whole text"
+   printlog "Edit - Select All to go select the whole text"
    EditSelectAll
    printlog "type keys [shift]+[tab] eight times, to get all lines to the highest, except the one with the 'I'"
    DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 8)
     hTypeKeys "<STRG HOME>"
     EditSelectAll
     hFindeImDokument ("I")
-    printlog "expected level/style: 'Outline 1
+    printlog "expected level/style: 'Outline 1"
     fGetPresentationStyle ("1")
     
     printlog "type keys [shift]+[tab] to get the last line to the highest level, too"
     catch
         Warnlog "  Rectangle could not be created"
     endcatch
-    rintlog "close document"
-    Call hCloseDocument						p
+    printlog "close document"
+    Call hCloseDocument		
 endcase 'tViewWorkspaceDrawingView
 
 '-------------------------------------------------------------------------------

File testautomation/graphics/required/includes/global/id_006.inc

     elseif( Ucase(gApplication) = "IMPRESS" ) then
         sExt = ".odp"
     endif
-    Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt)
-    Call sMakeReadOnlyDocumentEditable()
+
     hFileOpenLocally( gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt)
     Call hTextrahmenErstellen (sWord,20,20,50,30)
     sleep 1