diff options
Diffstat (limited to 'testautomation/graphics')
-rw-r--r-- | testautomation/graphics/tools/id_tools.inc | 70 |
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 '------------------------------------------------------------------------- |