Forum Discussion
YMinaev
Staff
16 years agoHi Pushpa,
The getElementsByTagName method returns a native enumerator with native objects whose methods and properties are different for IE and FF. That is why, native objects of FF don't have the Click method as opposed to IE.
You can use the Find method instead of the getElementsByTagName method (see the "Find Method" help topic):
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "outerHTML")
ValuesArray = Array("A", "*xyz*")
Set obj = gamesPage.Panel("page").Panel("MyContent").Find(PropArray, ValuesArray, 500)
If obj.Exists Then
obj.Click()
Else
Log.Error "The object was not found."
End If
The getElementsByTagName method returns a native enumerator with native objects whose methods and properties are different for IE and FF. That is why, native objects of FF don't have the Click method as opposed to IE.
You can use the Find method instead of the getElementsByTagName method (see the "Find Method" help topic):
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "outerHTML")
ValuesArray = Array("A", "*xyz*")
Set obj = gamesPage.Panel("page").Panel("MyContent").Find(PropArray, ValuesArray, 500)
If obj.Exists Then
obj.Click()
Else
Log.Error "The object was not found."
End If