summaryrefslogtreecommitdiff
path: root/testautomation/graphics
diff options
context:
space:
mode:
authorwg111939 <wg111939@sr1-eham02-03>2010-09-02 13:14:15 +0200
committerwg111939 <wg111939@sr1-eham02-03>2010-09-02 13:14:15 +0200
commit39936b94512956b8ed3ad1b88311414242aefb24 (patch)
tree7061dc29aefa35a411ffbaac90691f7d9ad87d6a /testautomation/graphics
parent68a49f4527b1c7a3f662f3313d6d98583ed1d9f4 (diff)
i114271, [Automation]: Adapt export tests to new dialogs
Diffstat (limited to 'testautomation/graphics')
-rw-r--r--testautomation/graphics/tools/id_tools.inc70
1 files changed, 35 insertions, 35 deletions
diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc
index c774710c8..4226ba287 100644
--- a/testautomation/graphics/tools/id_tools.inc
+++ b/testautomation/graphics/tools/id_tools.inc
@@ -268,47 +268,47 @@ function fMakeDocumentWritable() as boolean
end function
'-------------------------------------------------------------------------------
-
-function fGetSizeXY (sX as string, sY as string, bRetrieveOnly as boolean) as Boolean
-
- const RC_FAILURE = -1
-
+function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean
dim sTx as string
dim sTy as string
+ dim bReturn as boolean
- fGetSizeXY() = True
-
- if ( hUseAsyncSlot( "ContextPositionAndSize" ) <> RC_FAILURE ) then
-
- kontext
- active.SetPage TabPositionAndSize
-
- kontext "TabPositionAndSize"
- if ( TabPositionAndSize.exists( 2 ) ) then
- sTx = Width.GetText()
- sTy = Height.GetText()
- hCloseDialog( TabPositionAndSize, "ok" )
- else
- warnlog "Couldn't switch tab page :-( "
+ bReturn = True
+ try
+ printlog "Trying to open Position and size Dialog.."
+ ContextPositionAndSize
+ catch
+ warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
+ endcatch
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ printlog "Getting some sizes from Position and Size dialog."
+ if TabPositionAndSize.exists (5) then
+ sTx = Width.GetText
+ printlog "Width, sTx=" & sTx
+ sTy = Height.GetText
+ printlog "Height, sTy=" & sTy
+ TabPositionAndSize.OK
+ else
+ warnlog "Couldn't switch tab page :-( "
+ endif
+ if bGet then ' Get the Values only
+ sY = sTy
+ printlog "sY=" & sY
+ sX = sTx
+ printlog "sX=" & sX
+ else ' Get the Values and COMPARE them
+ if (LiberalMeasurement (sX,sTx) <> TRUE) then
+ warnlog "width is different :-( XXXXXXXXXXXXX should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
+ bReturn = False
endif
-
- if ( bRetrieveOnly ) then ' Get the Values only
- sY = sTy
- sX = sTx
- else ' Get the Values and compare them
- if ( not LiberalMeasurement (sX,sTx) ) then
- warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
- fGetSizeXY() = False
- endif
- if (not LiberalMeasurement (sY,sTy) ) then
- warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
- fGetSizeXY() = False
- endif
+ if (LiberalMeasurement (sY,sTy) <> TRUE) then
+ warnlog "hight is different :-( xxxxxxxxxxxx should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
+ bReturn = False
endif
- else
- warnlog( "Failed to open <Position And Size> dialog" )
+ bGet = bReturn
endif
-
end function
'-------------------------------------------------------------------------