git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2069 fd906abe-77d9-0310-91a1-e0d9ade77398
		
			
				
	
	
		
			27 lines
		
	
	
		
			No EOL
		
	
	
		
			758 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			No EOL
		
	
	
		
			758 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from watsup.winGuiAuto import findControl,setEditText, findTopWindow,clickButton
 | 
						|
import os
 | 
						|
import os.path
 | 
						|
 | 
						|
FILENAME='atestfile.txt'
 | 
						|
 | 
						|
def main():
 | 
						|
    # delete any occurrence of this file from the disk
 | 
						|
    if os.path.exists(FILENAME):
 | 
						|
        os.remove(FILENAME)
 | 
						|
        
 | 
						|
    form=findTopWindow(wantedText='Simple Form')
 | 
						|
    button=findControl(form,wantedText='Create file')
 | 
						|
    editbox=findControl(form,wantedClass='TEdit')
 | 
						|
    
 | 
						|
    # enter a filename:
 | 
						|
    setEditText(editbox,[FILENAME])
 | 
						|
    clickButton(button)
 | 
						|
    
 | 
						|
    # now check that the file is there
 | 
						|
    if os.path.exists(FILENAME):
 | 
						|
        print 'file %s is present' %FILENAME
 | 
						|
    else:
 | 
						|
        print "file %s isn't there" % FILENAME     
 | 
						|
 | 
						|
if __name__=='__main__':
 | 
						|
    main() |