I have a code module as follows. I use a parameter in RxPath
Code: Select all
Dim _Ele As String = ""
<TestVariable("D498FD3D-F9B3-4CED-B43E-6B5E5C530484")> _
Public Property Ele As String
Get
Return _Ele
End Get
Set(ByVal value As String)
_Ele = value
End Set
End Property
Public Sub aaaa
_Ele = "1234"
Dim _RawText As Ranorex.RawText = Nothing
Dim found As Boolean = Host.Local.TryFindSingle(Of Ranorex.RawText) _
("/form[@title~'home']/rawtext[@rawtext~$_Ele]", 10000, _RawText)
report.Info(found.ToString)
End Sub
I run this code, the specified RxPath can be found.
But I call this sub in other code module, It can't find the specified RxPath.
Code: Select all
Dim _aa As New bbbb
_aa.aaaa