Implicit conversion from 'String' to 'Double'.

Ranorex Spy, Recorder, and Studio.
subrata1
Posts: 6
Joined: Sat Jun 02, 2018 3:12 am

Implicit conversion from 'String' to 'Double'.

Post by subrata1 » Thu Aug 23, 2018 10:30 pm

Dim a As Integer
For a=0 To ccyPairTable.Rows.Count-1
Dim thisRow As Ranorex.Row
thisRow = /form[@title='NPB1~PB']/table[@name='paCurrencyPairsSpreads']/row[@index="+a+"]"
MsgBox(thisRow.Element.GetAttributeValueText("Selected"))
Next

Note: I can not use "+a+" to replace with hard coded value.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Implicit conversion from 'String' to 'Double'.

Post by Support Team » Fri Aug 24, 2018 8:39 am

Hello subrata1,

Thank you for your post.

Please find a sample code below:
Dim a As Integer
			For a=0 To ccyPairTable.Rows.Count-1
				
				Dim path As String = "/form[@title='NPB1~PB']/table[@name='paCurrencyPairsSpreads']/row[@index="
				Dim pathEnding As String = "]"
				
				Dim thisRow As Ranorex.Row
				thisRow = String.Format("{0}{1}{2}", path, a.ToString(), pathEnding)
				
				thisRow.MoveTo()
			Next a
I hope this will help you.

Sincerely,
Robert
.
Image