1#!/usr/bin/python 2# -*- coding: utf-8 -*- 3if __name__ == '__main__': 4 # The following code allows this test to be invoked outside the harness and should be left unchanged 5 import os, sys 6 args = [os.path.realpath(os.path.expanduser("/Users/Shared/Raft/raft")), "-f"] + sys.argv 7 os.execv(args[0], args) 8 9""" 10KLLAcquireCredUI 11 12Contact: lha@apple.com 132009/11/07 14""" 15 16# This is a RAFT test. For more information see http://dzone200/wiki/RAFT 17testDescription = "Pop UI KerberosAgent and acquire credentials" 18testVersion = "1.0" 19testState = ProductionState # Possible values: DevelopmentState, ProductionState 20testCustomDBSpec = {} 21 22 23def runTest(params): 24 # Your testing code here 25 26 os.system("kdestroy -p ktestuser@ADS.APPLE.COM"); 27 28 pid = os.fork() 29 if pid == 0: 30 os.execv("/usr/local/libexec/heimdal/bin/test-kll", ["test-kll", "ktestuser@ADS.APPLE.COM"]); 31 32 target.processes()["SecurityAgent"].mainWindow().textFields()[0].click() 33 keyboard.typeString_("foobar"); 34 target.processes()["SecurityAgent"].mainWindow().buttons()["OK"].click() 35 36 37 res = os.waitpid(pid, 0)[1] 38 39 assert res == 0, "test-kll failed" 40 41 logPass() # This line is implicit and can be removed 42