How would you create a function to search the listbox for a specific value.
Get the listbox count.
For I=0 to count
pick the listbox value
match the value with the expected one. If matches- click on that else get the next value.
Since everything in QTP is a window.window.listbox kind, how would you create a generic function like this without actually specifying the number of windows & name & the name of the listbox.
Re: Creating function for searching listbox values
Create the regular expression object first i.e the regexpression should contain the list value you are searching for, Now by using Test function using the while, search for that regular expression.Hope this will solve your problem
Act in haste and repent at leisure; Code too soon and debug forever