01-20-2011, 11:29 AM
Hey Juan, I don't have any good answers for most of those questions but I do see something in #1 that you are doing in a very inefficient manner. The Description object can take more properties than just "micclass." If you add the "name" property, the ChildObjects method will only return those objects that match the specified "micclass" and "name" saving you TONS of loop time. If you give it the "name" property, and if it is valid HTML on the page, it will only return one object. I would suggest adding html tag as well, but it's not necessary.
Code:
Set oDescription = Description.Create()
oDescription("micclass").Value = micClass
oDescription("name").Value = sDTControlName
'add html tag if you can -->
'oDescription("html tag").Value = "TD"
Set oObject = oBrowser.ChildObjects(oDescription)
If oObject.Count = 1 Then
oObject.Item(0).Set sDTControlValue
ElseIf oObject.Count > 1 Then
Reporter.ReportEvent micFail, "Set Custom Object Value", "Object description is not unique"
Else
Reporter.ReportEvent micFail, "Set Custom Object Value", "Object not found"
End If