Read all the objects under Div in Vb.Net
Posted: 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.
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.