Read all the objects under Div in Vb.Net

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
VTTS
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

Hi,

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.
Attachments
Ranorex-QUestion1.JPG
Xpath Snapshot
Ranorex-QUestion1.JPG (35.46 KiB) Viewed 846 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
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

Hi,

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