Choosing element from array - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Choosing element from array (/Thread-Choosing-element-from-array) |
Choosing element from array - marvson - 05-11-2016 Hi friends! I have array which take elements from combobox in page (which has webelements, one of them i want to choose and click) Dunno even if its good: Code: Public Function FnGetWebEdits() When i check elements number by: Code: Set objInList = FnGetWebEdits() It shows properly number of them which is 38. Now is my question. How can i choose one element from it which im interested in and click it? I suspect i must use "for" but don't know how :/ RE: Choosing element from array - Ankesh - 06-29-2016 Do you know the object name that you wish to work on? or is there any unique value for the web element that is available? IF yes, you can use a for loop to iterate through each item in objInList. Code: For Each oEdit in objInList |