The DomListBox "Select" method does not allow the use of wildcards when selecting an item. However a function can be created to search a DomListBox for an item containing some string pattern and return the index of that item, as demonstrated below:

[-] int PartialFind(window wWin, String sItem)
 [ ] int iIndex = -1
 [ ]
 [ ] List of STRING lsItems = wWin.Items
 [ ]
 [ ] string sTemp
 [ ] int iCount = 0
 [ ] 
 [ ] //For each item in the DomListBox
 [-] for each sTemp in lsItems
  [ ] iCount ++
  [ ] 
  [ ] //Verify if the said item contains the string pattern sItem
  [-] if(MatchStr(sItem, sTemp))
   [ ] iIndex = iCount
   [ ] break
  [ ]
 [ ]
 [ ] return iIndex


Therefore to use this within a SilkTest testcase, our code would look like:

[-] testcase example() appstate none
 [ ] //Find the DomListBox in question
 [ ] window w = Desktop.Find("/BrowserApplication//BrowserWindow//SELECT[@id='MyDomListBox']")
 [ ]
 [ ] //Use the PartialFind function to return the index of item of interest
 [ ] w.Select(PartialFind(w, "*Lookup*"))