def SetListbox(self, wintext,element,value,frmname): #Win Title as Param
        """ This function select an item from a listbox"""
        for i in range(self._sw.Count): ## Count windows
            if i is None:
                print 'No Open Windows Found'
                break
            time.sleep(.2) ## may have to play with this value
            wn = self._sw[i].LocationName ## Get the window Title
            print wn
            
            ## checks to see if location matches the name
            if wn == wintext: 
                print "sw[", i, "]" ## print the win number
                win = self._sw[i].LocationName ## Get the window Title
                print "Window name: ", win 
                try:
                    self._sw[i].Document.forms[frmname].elements[element].value = value
                    print 'Selected item: ', value
                except:
                    print 'SetListBox failed'
 This function select an item from a listbox
recipes/Python/302324_Browser_Automatitool__py_class/recipe-302324.py