I'm trying to learn QTP. I have some problems while using the child objects. I'm not able to get the count for that. After getting the count only i'll be able to get inner text of those child objects.

Given below is the script. I'm having issue in finding the address of the shop.

invokeapplication "C:\Program Files\Internet Explorer\iexplore.exe"
Set wind = description.Create
wind ("application version").value = "internet explorer 8"
Set br = Browser(wind)
br.Navigate "http://www.toysrus.com/storeLocator/index.jsp"

Set input = description.Create
input("html id").value = "store-search-street"
Set radius = description.Create
radius("html id").value = "store-search-radius"
Set search = description.Create
search("html id").value = "store-search-submit"
br.WebEdit(input).Set "00501,NY"
br.WebList(radius).Select 7

'Get the Number of Shops
Set nshop= description.Create
nshop("class").value = "store-count"
nofshop = br.WebElement(nshop).GetROProperty("innertext")

'Create the property of object
Dim cc
'For i = 0 To 1
For i = 0 To nofshop-1
cc = "store-list-" &i
Set shop= description.Create
shop("html id").value = cc
'To get the Store Name
Set shop_name= description.Create
shop_name("class").value = "store-name"
st_name = br.WebElement(shop).WebElement(shop_name).GetROPro perty("innertext")
'To Split store name and store number
DataTable.GetSheet("Global").AddParameter "A", Myarr_shop(0)
DataTable.GetSheet("Global").AddParameter "B", Myarr_shop(1)

'To get the address

'Create Childobject for address
Set shop_address= description.Create
shop_address("class").value = "address"

Set co_shop_address = br.ChildObjects(shop_address)

nof_co_shop_address = co_shop_address.count()
msgbox "The Count:- " &nof_co_shop_address

For j = 0 To nof_co_shop_address-1
shp_add = shp_add & co_shop_address.Item(j).GetROProperty("innertext")
msgbox shp_add

'To get Phone number
Set shop_phone= description.Create
shop_phone("class").value = "phone"
st_phone = br.WebElement(shop).WebElement(shop_phone).GetROPr operty("innertext")
'To get the phone number alone
DataTable.GetSheet("Global").AddParameter "C", Myarr_phone(1)

'To Get the Hours
Set shop_hour= description.Create
shop_hour("class").value = "store"
Set shop_time= description.Create
shop_time("class").value = "hours-animated"
st_time = br.WebElement(shop).WebElement(shop_hour).GetROPro perty("innertext")


The script is incomplete. But it will work for the address part.

Hope someone can help me.