Thanks in advance... I have attached the screen shot for better understanding...
I am very new to this Ranorex and VB.Net world. I appreciate any feed back towards this
issue.
Problem Description -
I have javalist (total 29 items) to go thru and read its 'Live Element' attributes.
I can loop thru the entire list item (I got 29 of them). However, I am not quite sure how to get Live element of an attribute. I am using vb.net.
Private Sub Init()
' Your recording specific initialization code goes here.
Dim RanorexList As Ranorex.List
RanorexList = "/form[@title='GAR1']/container[@name='m_introPanel']//container[@name='cmConversionRatePanel']/container[@name='cmConversionRatesMaintenance']/?/?/list[@name='cmConversionRatesMaintenance']"
Dim count As Integer
Dim i As Integer
count = RanorexList.Items.Count
Delay.Milliseconds(10)
For i=0 To count-1
Dim myItem As String
myItem = RanorexList.Items(i).Text
MsgBox(myItem)
'myItem is returning (com.ebsdr.bn.bp.subsystems.credit.untrusted.CurrencyRateC@cbdef5)
'However, I need to capture attribute value of 'Name' property.
Next
End Sub
Need to retrieve List attribute of Live Elements (JavaList)
Need to retrieve List attribute of Live Elements (JavaList)
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Need to retrieve List attribute of Live Elements (JavaList)
Hello subrata1,
I hope you found my email earlier today was able to help you get the values from the list of items you have. If not, please reply to the open support ticket and I will be happy to further assist you. In the meantime, I have copied my emailed response below to help any other users experiencing the same issues.
Ned
I hope you found my email earlier today was able to help you get the values from the list of items you have. If not, please reply to the open support ticket and I will be happy to further assist you. In the meantime, I have copied my emailed response below to help any other users experiencing the same issues.
Cheers,You can get the attribute value through a simple Get value action as depicted below.
Since you are working in code, you can convert this to user code and implement this auto-generated code into your own code.
This uses the following API call and should help you get the attribute value of an object.
https://www.ranorex.com/Documentation/R ... ueText.htm
Sample:Code: Select all
Dim varName As String = buttonInfo.FindAdapter(Of Button)().Element.GetAttributeValueText("Name")
Ned
You do not have the required permissions to view the files attached to this post.
Re: Need to retrieve List attribute of Live Elements (JavaList)
Thank you Ned...
It works when I have the following code.....
Dim ccyPairName As String = thisList.Items(i).Element.GetAttributeValueText("Name")
It works when I have the following code.....
Dim ccyPairName As String = thisList.Items(i).Element.GetAttributeValueText("Name")