I have a text field in the application which I identify by name at runtime. Now I want to read some other attribute's value (ChildIndex in this case). I tried few options but did not work, please help.
This is text object (txtOption)
Dim tabIntl As Ranorex.TabPage = repo.MUSHome.TabPageInternational
Dim txtOption As Ranorex.Text = tabIntl.FindSingle (Of Ranorex.Text) ("./text[@name='Australasia']")
Tried to get ChildIndex at runtime:
Dim elem As WebElement = New WebElement(txtOption)
Dim chIndx As String = elem.ChildIndex.ToString()
Ranorex.CapabilityNotSupportedException: The element does not support the required capability webelement'.
ThenI tried like:
Dim txtControl As Ranorex.Control = new Ranorex.Control(txtOption)
Dim chIndx = txtControl.GetPropertyValue("ChildIndex")
Ranorex.CapabilityNotSupportedException: The element does not support the required capability 'control'.
I also tried like below but no luck, seems to be not a valid stmt:
Dim chIndx = Attribute.GetCustomAttribute(txtOption, "ChildIndex")
Also, do we have to do it differently for different types of adapters..? or is there a generic way of getting runtime attribute values for any type of adapters? Please advice.
Class library usage, coding and language questions.
3 posts • Page 1 of 1