diff options
author | sb <sb@openoffice.org> | 2010-11-15 09:25:32 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-11-15 09:25:32 +0100 |
commit | e6a6893c5e2c3d031eb9926a82586cb352956280 (patch) | |
tree | 835130c33d747645c178c4a57670117c6df674ae /testautomation/writer | |
parent | 47aa979025ec81189f0b40aab122d912ccdc3072 (diff) | |
parent | fd8af45f19e3d0acc4887f3b07239875485647b5 (diff) |
sb135: merged in DEV300_m93
Diffstat (limited to 'testautomation/writer')
-rw-r--r-- | testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc | 13 | ||||
-rw-r--r-- | testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc | 37 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields1.inc | 12 | ||||
-rw-r--r-- | testautomation/writer/required/includes/w_001b_.inc | 1 | ||||
-rwxr-xr-x | testautomation/writer/tools/includes/w_tools.inc | 24 |
5 files changed, 66 insertions, 21 deletions
diff --git a/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc b/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc index 75db278c25ef..729659dfc54d 100644 --- a/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc +++ b/testautomation/writer/optional/includes/contextmenu/w_contextmenu1.inc @@ -194,7 +194,14 @@ testcase tPickGraphic Call wOpenContextMenu(true) printlog " Select 'ImageMap' in context menu" - Call hMenuSelectNr(9) + try + CALL hMenuFindSelect (".uno:ImageMapDialog", true, 11, true) 'Find "ImageMap" and call the slot. + wait 500 + catch + Warnlog "Unable to open context menu" + Call hCloseDocument + goto endsub + endcatch Printlog " The graphic has to be selected and the context menu has to show graphics related commands" Kontext "ImageMapEditor" if Not ImageMapEditor.Exists(3) then @@ -240,13 +247,13 @@ testcase tPickHyperlink printlog " Empty clipboard" SetClipBoard = "" printlog " Insert a hyperlink in document" - Call wTypeKeys "www.sun.com" + Call wTypeKeys "www.oracle.com" Call wTypeKeys " " Call wTypeKeys "<HOME>" printlog " Open context menu on hyperlink" Call wTypeKeys "<SHIFT F10>" printlog " Last entry in menu has to be 'Open hyperlink' ...." - CALL hMenuFindSelect (10955, true, 17, true) 'Find "Hyperlink-dialog" and call the slot. + CALL hMenuFindSelect (10955, false, 17, true) 'Find "Hyperlink-dialog" and call the slot. kontext "TabHyperlinkInternet" if TabHyperlinkInternet.Exists(3) then Warnlog "Hyperlink-Dialog opened!" diff --git a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc index 25a762297df7..08ebbfed45d4 100644 --- a/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc +++ b/testautomation/writer/optional/includes/drawing/w_drawing_tools2.inc @@ -283,7 +283,7 @@ testcase tGroup_6 Sleep 2 Call gMouseClick(80,80) - Call wObjektSelektieren ( 28, 28, 70, 80 ) + Call wObjektSelektieren ( 31, 31, 70, 80 ) Sleep 2 FormatGroupGroup Sleep 1 @@ -351,7 +351,7 @@ testcase tGroup_7 Sleep 2 Call gMouseClick(80,80) - Call wObjektSelektieren ( 28, 28, 70, 80 ) + Call wObjektSelektieren ( 31, 31, 70, 80 ) Sleep 2 FormatGroupGroup Sleep 1 @@ -667,7 +667,7 @@ testcase tEncapsulatedGroup_1 Sleep 1 Call wZeichenobjektEinfuegen("ELLIPSE", 40, 45, 60, 70, false) Sleep 1 - Call wObjektSelektieren ( 28, 28, 70, 80 ) + Call wObjektSelektieren ( 31, 31, 70, 80 ) Sleep 1 FormatGroupGroup @@ -677,20 +677,37 @@ testcase tEncapsulatedGroup_1 PrintLog "- insert 2 drawing objects (rectangle and ellipse) in the group" Call wZeichenobjektEinfuegen("RECHTECK", 35, 40, 38, 45, false) - Call wZeichenobjektEinfuegen("ELLIPSE", 52, 40, 78, 45, false) - Call wObjektSelektieren ( 28, 38, 80, 48 ) + Call wZeichenobjektEinfuegen("ELLIPSE", 40, 40, 58, 45, false, true) + Call wObjektSelektieren ( 31, 31, 80, 80 ) + + Sleep 1 + PrintLog "- generate a new group" try - PrintLog "- generate a new group" FormatGroupGroup - PrintLog "- edit the new group" + catch + Warnlog "Unable to execute Format / Group" + endcatch + + PrintLog "- edit the new group" + try FormatGroupEditGroup - PrintLog "- leave the new group" + catch + Warnlog "Unable to execute Group / Enter Group" + endcatch + + PrintLog "- leave the new group" + try FormatGroupExitGroup - PrintLog "- Undo the new group" + catch + Warnlog "Unable to exceute Format / Exit Group" + endcatch + + PrintLog "- Undo the new group" + try FormatGroupUnGroup catch - Warnlog "Something wrong where operating the Encapsulated group!" + Warnlog "Unable to execute Format / Ungroup" endcatch Call hCloseDocument diff --git a/testautomation/writer/optional/includes/fields/w_fields1.inc b/testautomation/writer/optional/includes/fields/w_fields1.inc index 2f727260b6c2..c6caf2c5fade 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields1.inc +++ b/testautomation/writer/optional/includes/fields/w_fields1.inc @@ -151,13 +151,23 @@ testcase tInsertFieldsTime if NOT Len(sTime2) > 7 then Warnlog "Time-format is wrong !" printlog "Stop for a while ..." + '/// Stop for a while , check if the time is still correct Sleep 2 + ' update fields + Call wTypeKeys "<F9>" + ' read field content Call wTypeKeys "<MOD1 Home>" Call wTypeKeys "<Shift Right>" EditCopy if GetClipboard <> sTime1 then Warnlog "Fixed time is wrong !" - + + '/// Stop for a while , check if the time is still correct + Sleep 2 + ' update fields + Call wTypeKeys "<F9>" + ' read field content + Call wTypeKeys "<MOD1 Home>" Call wTypeKeys "<Down><Home>" Call wTypeKeys "<Shift Right>" EditCopy diff --git a/testautomation/writer/required/includes/w_001b_.inc b/testautomation/writer/required/includes/w_001b_.inc index 297d04b579bb..4d8e6883891a 100644 --- a/testautomation/writer/required/includes/w_001b_.inc +++ b/testautomation/writer/required/includes/w_001b_.inc @@ -198,6 +198,7 @@ testcase tFileSendOutlineToClipboard PrintLog "Paste outline in new document" hUseAsyncSlot( "EditPaste" ) + WaitSlot(1000) Call wTypeKeys("<Up>", 6) Call wTypeKeys("<Home><Shift End>") hUseAsyncSlot( "EditCopy" ) diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc index e6bd4f92afa0..cfe0aa6e07f3 100755 --- a/testautomation/writer/tools/includes/w_tools.inc +++ b/testautomation/writer/tools/includes/w_tools.inc @@ -141,11 +141,14 @@ end function ' ----------------------------------------------------------------------- -sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optional sCloseToolbar as boolean ) +sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optional sCloseToolbar as boolean, optional bLeaveSelected as boolean ) Kontext "DrawBar" if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true) Sleep 2 + if IsMissing(bLeaveSelected) then + bLeaveSelected = false + endif Objekt = UCase( Objekt ) select case Objekt @@ -187,8 +190,10 @@ sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optiona end if if Objekt <> "TEXT" and Objekt <> "VTEXT" then Kontext "DocumentWriter" - Call gMouseClick (10, 10) - wait 100 + if bLeaveSelected = false then + Call gMouseClick (10, 10) + wait 100 + endif end if Case "MASTERDOCUMENT" @@ -205,8 +210,10 @@ sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optiona end if if Objekt <> "TEXT" and Objekt <> "VTEXT" then Kontext "DocumentMasterDoc" - Call gMouseClick (10, 10) - wait 100 + if bLeaveSelected = false then + Call gMouseClick (10, 10) + wait 100 + endif end if end select sleep (1) @@ -215,18 +222,21 @@ end sub ' ----------------------------------------------------------------------- sub wObjektSelektieren ( xStart%, yStart%, xEnde%, yEnde% ) - ' Call gMouseClick(90,90) Call hToolbarSelect("DRAWING",true) - Auswahl.Click + if Auswahl.Getstate(2) = 0 then + Auswahl.Click + endif Select Case gApplication Case "WRITER" Kontext "DocumentWriter" DocumentWriter.MouseDown xStart%, yStart% + wait 500 DocumentWriter.MouseMove xEnde%, yEnde% DocumentWriter.MouseUp xEnde%, yEnde% Case "MASTERDOCUMENT" Kontext "DocumentMasterDoc" DocumentMasterDoc.MouseDown xStart%, yStart% + wait 500 DocumentMasterDoc.MouseMove xEnde%, yEnde% DocumentMasterDoc.MouseUp xEnde%, yEnde% end select |