06-24-2017, 10:19 AM
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
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