vitomation01: #i109562 - try to get the entryfiled of the property browser filled with a new string as fast as possible

This commit is contained in:
Joerg Skottke [jsk]
2010-03-18 13:40:53 +01:00
parent 2ec6fe59bc
commit dcec009286
2 changed files with 19 additions and 14 deletions

View File

@@ -43,8 +43,6 @@ testcase tAllControlsOnDialog( cMajor as string )
dim iApplication as Integer ' numeric expression for gApplication dim iApplication as Integer ' numeric expression for gApplication
dim cApplication as string ' Name of the current application dim cApplication as string ' Name of the current application
dim lsControlNames( 30 ) as string ' list containing the names of the controls
' number of controls and the name of the current control ' number of controls and the name of the current control
dim iCurrentControl as integer dim iCurrentControl as integer
dim sCurrentControl as string dim sCurrentControl as string
@@ -83,7 +81,6 @@ testcase tAllControlsOnDialog( cMajor as string )
for iCurrentControl = 1 to ICONTROLCOUNT for iCurrentControl = 1 to ICONTROLCOUNT
sCurrentControl = hDrawControlOnDialog( iCurrentControl ) sCurrentControl = hDrawControlOnDialog( iCurrentControl )
listappend( lsControlNames() , sCurrentControl )
hUseAsyncSlot( "ContextProperties" ) hUseAsyncSlot( "ContextProperties" )
kontext "ControlPropertiesTabControl" kontext "ControlPropertiesTabControl"
if ( ControlPropertiesTabControl.exists( 1 ) ) then if ( ControlPropertiesTabControl.exists( 1 ) ) then
@@ -138,7 +135,7 @@ testcase tAllControlsOnDialog( cMajor as string )
kontext "ControlPropertiesTabControl" kontext "ControlPropertiesTabControl"
if ( ControlPropertiesTabControl.exists( 5 ) ) then if ( ControlPropertiesTabControl.exists( 5 ) ) then
wait( 300 ) wait( 300 )
sCurrentControl = lsControlNames( iCurrentControl ) sCurrentControl = hGetControlName( iCurrentControl )
hPBGetControlName( sCurrentControl ) hPBGetControlName( sCurrentControl )
hUseAsyncSlot( "ContextProperties" ) hUseAsyncSlot( "ContextProperties" )
kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 ) kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 )
@@ -150,9 +147,6 @@ testcase tAllControlsOnDialog( cMajor as string )
endif endif
next iCurrentControl next iCurrentControl
' we need to delete the list-content otherwise we run into index-problems
ListAllDelete( lsControlNames() )
printlog( "Cleanup: Close the BASIC-IDE" ) printlog( "Cleanup: Close the BASIC-IDE" )
hCloseBasicIde() hCloseBasicIde()
@@ -209,7 +203,7 @@ testcase tAllControlsOnDialog( cMajor as string )
kontext "ControlPropertiesTabControl" kontext "ControlPropertiesTabControl"
if ( ControlPropertiesTabControl.exists( 5 ) ) then if ( ControlPropertiesTabControl.exists( 5 ) ) then
wait( 300 ) wait( 300 )
sCurrentControl = lsControlNames( iCurrentControl ) sCurrentControl = hGetControlName( iCurrentControl )
hPBGetControlName( sCurrentControl ) hPBGetControlName( sCurrentControl )
hUseAsyncSlot( "ContextProperties" ) hUseAsyncSlot( "ContextProperties" )
kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 ) kontext "ControlPropertiesTabControl" : ControlPropertiesTabControl.notExists( 3 )
@@ -221,10 +215,7 @@ testcase tAllControlsOnDialog( cMajor as string )
endif endif
next iCurrentControl next iCurrentControl
' we need to delete the list-content otherwise we run into index-problems
ListAllDelete( lsControlNames() )
printlog( "Cleanup: Close the BASIC-IDE" ) printlog( "Cleanup: Close the BASIC-IDE" )
hCloseBasicIde() hCloseBasicIde()

View File

@@ -111,12 +111,12 @@ function hPBSetControlName( cControl as string ) as boolean
kontext "TabGeneralControl" kontext "TabGeneralControl"
if ( NameText.exists() ) then if ( NameText.exists() ) then
'///+<li>Set the new name</li> '///+<li>Set the new name</li>
WaitSlot() hDeleteEntryFieldContent( NameText )
' Name the control and append some Spaces which should be truncated. ' Name the control and append some Spaces which should be truncated.
printlog( CFN & "Naming control: " & cControl ) printlog( CFN & "Naming control: " & cControl )
NameText.setText( cControl ) NameText.setText( cControl )
TabGeneralControl.typeKeys( " <RETURN>" ) TabGeneralControl.typeKeys( "<RETURN>" )
WaitSlot() WaitSlot()
printlog( CFN & "Verifying rename..." ) printlog( CFN & "Verifying rename..." )
@@ -301,3 +301,17 @@ function hSetPBTabPage( iPage as integer ) as boolean
'///</ul> '///</ul>
end function end function
function hDeleteEntryFieldContent( oControl as object ) as boolean
oControl.typeKeys( "<HOME>" )
oControl.typeKeys( "<SHIFT END>" )
oControl.typeKeys( "<DELETE>" )
if ( oControl.getText() = "" ) then
hDeleteEntryFieldContent() = true
else
hDeleteEntryFieldContent() = false
endif
exit function