array to be captured and displayed - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: array to be captured and displayed (/Thread-array-to-be-captured-and-displayed) |
array to be captured and displayed - Anu209 - 06-24-2017 I want to capture the price of all the products in the website that matches the description. But the code below is giving error as Type Mismatch. What is wrong in the code..please help. Error: Type mismatch: 'Browser(...).Page(...).ChildObjects' Line (16): "obj_price = Browser("creationtime:=0").Page("title:=.*").ChildObjects(desc)". Code: Set desc= description.Create desc("micClass").value= "WebElement" desc("class").value= "lfloat product-price" desc("htmltag").value= "SPAN" Dim obj_price obj_price = Browser("creationtime:=0").Page("title:=.*").ChildObjects(desc) Print obj_price.count Output expected: obj_price = 25000 , 45000 , 12000, ...etc obj_price.count = 35 |