Hi Team,
I need to get the count of elements within a container. Please let me know how can I do that.
In the following RxPath,
-------
/container[@automationid='Group_0']/element[6]/container[@automationid='ID']/text[@name='999']
-------
I know the first container (automationid=Group_0). Now I want to find a text which reside in at the above path but we dont know at which element id. I tried the following but it didn't work:
-----
Dim containerRow As Ranorex.Container = tblGrid.FindSingle (Of Ranorex.Container)("./Container[@automationid='Group_0]")
Dim idCell As Ranorex.Text = containerRow.FindSingle(of Ranorex.Text) ("./element/container[@automationid='ID']/text[@name='999']")
ttidCell.MoveTo
ttidCell.DoubleClick
-----
Q1. Is the above not correct..? Do I need to give sth like below
--
Dim idCell As Ranorex.Text = containerRow.FindSingle(of Ranorex.Text) ("./element[]/container[@automationid='ID']/text[@name='999']")
or
' i as counter
Dim idCell As Ranorex.Text = containerRow.FindSingle(of Ranorex.Text) ("./element[i]/container[@automationid='ID']/text[@name='999']")
--
Q2 How do I get the count for number of elements in the container so that I can loop in through and provide element details (like element[i]) and then try to find text.
Thanks