dfontanesi
14 years agoContributor
Find vs FindAll - One works, one doesn't
I'm trying to locate a div with a given id (sID). The FindAll command below works fine, except it takes a long time and I'd rather use Find. But Find gives me a "Object doesn't support this property or method" error. Am I doing something wrong? This API seems pretty inconsistent if not.
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "idStr")
ValuesArray = Array("DIV", sID)
obj = GetInternetBrowser.Application.Page("*").FindAll(PropArray, ValuesArray, 500)
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "idStr")
ValuesArray = Array("DIV", sID)
obj = GetInternetBrowser.Application.Page("*").Find(PropArray, ValuesArray, 500)
I'm still using TestComplete 7.52.678.7
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "idStr")
ValuesArray = Array("DIV", sID)
obj = GetInternetBrowser.Application.Page("*").FindAll(PropArray, ValuesArray, 500)
Dim PropArray, ValuesArray, obj
PropArray = Array("tagName", "idStr")
ValuesArray = Array("DIV", sID)
obj = GetInternetBrowser.Application.Page("*").Find(PropArray, ValuesArray, 500)
I'm still using TestComplete 7.52.678.7
- FindAll returns an array while Find returns a specific object.
I think you need to use "set" when you're using the Find method.