Read all the objects under Div in Vb.Net

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 1
Joined: Mon Jul 06, 2015 9:31 pm

Read all the objects under Div in Vb.Net

Post by VTTS » Mon Jul 06, 2015 9:44 pm


I have 4 Div's , Each Parent Div have a childindex starting from 0 through 3.

The first Div (childindex = 0) have 3 objects under them - One is Span, The rest two is a Label.

My Xpath - myDom/div[@class='x-box-inner']/div[@class='x-box-target']/div[@childindex=$StrFieldindex]
StrFieldindex = will be 0, 1,2,3 which i pass through code,

When i pass 0 - I want to get the count of objects under Div, then gets its corresponding Tagname. In this case for Childindex = 0, i have 3 objects.

I tried Xpath object.children.count, it always returns value 1. I am not sure what is wrong. COuld you please help.

Please see attached screenshot.
You do not have the required permissions to view the files attached to this post.

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Read all the objects under Div in Vb.Net

Post by odklizec » Tue Jul 07, 2015 6:08 pm


It would be much easier to help you if you post Ranorex snapshot, instead of plain screenshot. Could you please post the snapshot?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration