ArmandsBruns
13 years agoFrequent Contributor
Function (Find Object in NameMapping)
Hi,
Maybe someone can help me – why doesn't find the object in NameMapping
------------------------------------------------
Function FindObject(location, ObjectTypeValue, inerrTextValue)
location.RefreshMappingInfo
location.Refresh
Dim location1
Dim arrProp, arrVal
ObjectTypeValue = Value1
inerrTextValue = Value2
arrProp = Array("ObjectType", "inerrText")
arrVal = Array(Value1, Value2)
Set location1 = location.FindChild(arrProp, arrVal)
If location1.Exists Then
Log.message("Object - Exists")
Call location1.Click
Call page.Wait
Else
For a = 1 To 50
location.RefreshMappingInfo
location.Refresh
ObjectTypeValue = Value1
inerrTextValue = Value2
arrProp = Array("ObjectType", "inerrText")
arrVal = Array(Value1, Value2)
Set location1 = location.FindChild(arrProp, arrVal)
Call location1.Click
Call page.Wait
If FindObject = True Then
Exit For
End If
Next
End If
End Function
---------------------------------------------
Armands
Maybe someone can help me – why doesn't find the object in NameMapping
------------------------------------------------
Function FindObject(location, ObjectTypeValue, inerrTextValue)
location.RefreshMappingInfo
location.Refresh
Dim location1
Dim arrProp, arrVal
ObjectTypeValue = Value1
inerrTextValue = Value2
arrProp = Array("ObjectType", "inerrText")
arrVal = Array(Value1, Value2)
Set location1 = location.FindChild(arrProp, arrVal)
If location1.Exists Then
Log.message("Object - Exists")
Call location1.Click
Call page.Wait
Else
For a = 1 To 50
location.RefreshMappingInfo
location.Refresh
ObjectTypeValue = Value1
inerrTextValue = Value2
arrProp = Array("ObjectType", "inerrText")
arrVal = Array(Value1, Value2)
Set location1 = location.FindChild(arrProp, arrVal)
Call location1.Click
Call page.Wait
If FindObject = True Then
Exit For
End If
Next
End If
End Function
---------------------------------------------
Armands